I_SalesOrderCube

DDL: I_SALESORDERCUBE Type: view COMPOSITE

Sales Order - Cube

I_SalesOrderCube (Composite)

Package: Explore, extend and adapt the SAP S/4HANA Cloud Private Edition with built-in and side-by-side extension capabilities.

Sales

I_SalesOrderCube is a Composite CDS View (Cube) that provides data about "Sales Order - Cube" in SAP S/4HANA. It reads from 1 data source (I_SalesDocument) and exposes 174 fields with key field SalesOrder. It has 7 associations to related views.

SAP API Hub

StateC1
Line of BusinessSales
Application ComponentSD-ANA
CapabilitiesData Provider for Analytical Queries, Data Source in SQL Select, Data Source for Defining CDS Entities
PackageSales for SAP S/4HANA Cloud Private Edition
Description <p>This CDS view provides the prerequisites for answering questions about sales orders at header level. Example business questions include:</p> <ul> <li><p>What's the sold-to party of the sales order?</p></li> <li><p>What's the overall processing status of the sales order?</p></li> <li><p>How many sales orders are in the system and how many are still open?</p></li> <li><p>What are the open values of the sales orders?</p></li> </ul>

Documentation

Data Sources (1)

SourceAliasJoin Type
I_SalesDocument SDH from

Parameters (2)

NameTypeDefault
P_ExchangeRateType kurst
P_DisplayCurrency vdm_v_display_currency

Associations (7)

CardinalityTargetAliasCondition
[0..1] I_SalesOrderType _SalesOrderType $projection.SalesOrderType = _SalesOrderType.SalesOrderType
[0..1] I_EngagementProject _CustomerProject $projection.CustomerProject = _CustomerProject.EngagementProject
[0..1] I_CustomerClassification _SoldToPartyClassification $projection.SoldToPartyClassification = _SoldToPartyClassification.CustomerClassification
[0..1] I_Customer _ShipToParty $projection.ShipToParty = _ShipToParty.Customer
[0..1] I_Customer _BillToParty $projection.BillToParty = _BillToParty.Customer
[0..1] I_Customer _PayerParty $projection.PayerParty = _PayerParty.Customer
[0..1] E_SalesDocumentBasic _Extension SDH.SalesDocument = _Extension.SalesDocument

Annotations (13)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Sales Order - Cube view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ISDSALESORDERHC view
AbapCatalog.compiler.compareFilter true view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
Metadata.ignorePropagatedAnnotations true view
Metadata.allowExtensions true view
Analytics.dataCategory #CUBE view
ObjectModel.modelingPattern #ANALYTICAL_CUBE view

Fields (174)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder Sales Order
SalesOrderType I_SalesDocument SalesDocumentType Sales Document Type
_SalesOrderType _SalesOrderType
CreatedByUser I_SalesDocument CreatedByUser Name of Person Responsible for Creating the Object
_CreatedByUser I_SalesDocument _CreatedByUser
CreatedByUserName User Description
CreationDate I_SalesDocument CreationDate Record Created On
CreationTime I_SalesDocument CreationTime Time at Which Record Was Created
LastChangeDate I_SalesDocument LastChangeDate Last Changed On
CreationDateYear Year of Creation
CreationDateYearQuarter Year/Quarter of Creation
CreationDateYearMonth Year/Month of Creation
SalesOrderDateYear Year of Order
SalesOrderDateYearQuarter Quarter of Order
SalesOrderDateYearMonth Month of Order
SalesOrganization I_SalesDocument SalesOrganization Sales Organization
_SalesOrganization I_SalesDocument _SalesOrganization
DistributionChannel I_SalesDocument DistributionChannel Distribution Channel
_DistributionChannel I_SalesDocument _DistributionChannel
OrganizationDivision Organization Division
_OrganizationDivision I_SalesDocument _OrganizationDivision
SalesGroup I_SalesDocument SalesGroup Sales Group
_SalesGroup I_SalesDocument _SalesGroup
SalesOffice I_SalesDocument SalesOffice Sales Office
_SalesOffice I_SalesDocument _SalesOffice
PartnerCompany Company ID of Trading Partner
_GlobalCompany
SoldToParty I_SalesDocument SoldToParty Sold-to Party
_SoldToParty I_SalesDocument _SoldToParty
SoldToPartyClassification Customer Classification
_SoldToPartyClassification _SoldToPartyClassification
ShipToParty Ship-to Party
_ShipToParty _ShipToParty
PayerParty Payer
_PayerParty _PayerParty
BillToParty Bill-to Party
_BillToParty _BillToParty
CustomerGroup I_SalesDocument CustomerGroup Customer Group
_CustomerGroup I_SalesDocument _CustomerGroup
AdditionalCustomerGroup1 I_SalesDocument AdditionalCustomerGroup1 Customer Group 1
_AdditionalCustomerGroup1 I_SalesDocument _AdditionalCustomerGroup1
AdditionalCustomerGroup2 I_SalesDocument AdditionalCustomerGroup2 Customer Group 2
_AdditionalCustomerGroup2 I_SalesDocument _AdditionalCustomerGroup2
AdditionalCustomerGroup3 I_SalesDocument AdditionalCustomerGroup3 Customer Group 3
_AdditionalCustomerGroup3 I_SalesDocument _AdditionalCustomerGroup3
AdditionalCustomerGroup4 I_SalesDocument AdditionalCustomerGroup4 Customer Group 4
_AdditionalCustomerGroup4 I_SalesDocument _AdditionalCustomerGroup4
AdditionalCustomerGroup5 I_SalesDocument AdditionalCustomerGroup5 Customer Group 5
_AdditionalCustomerGroup5 I_SalesDocument _AdditionalCustomerGroup5
CustomerRebateAgreement Customer Rebate Agreement
SalesOrderDate I_SalesDocument SalesDocumentDate Document Date (Date Received/Sent)
SDDocumentReason I_SalesDocument SDDocumentReason Order Reason (Reason for the Business Transaction)
_SDDocumentReason I_SalesDocument _SDDocumentReason
SDDocumentCollectiveNumber I_SalesDocument SDDocumentCollectiveNumber Collective Number (SD)
PurchaseOrderByCustomer I_SalesDocument PurchaseOrderByCustomer Purchase Order Number
CustomerPurchaseOrderType I_SalesDocument CustomerPurchaseOrderType Customer Purchase Order Type
CustomerPurchaseOrderDate I_SalesDocument CustomerPurchaseOrderDate Customer Reference Date
CustomerPurchaseOrderSuplmnt I_SalesDocument CustomerPurchaseOrderSuplmnt Purchase order number supplement
SalesDistrict I_SalesDocument SalesDistrict Sales District
_SalesDistrict I_SalesDocument _SalesDistrict
ProductCatalog Product Catalog Number
ServicesRenderedDate I_SalesDocument ServicesRenderedDate Date on which services are rendered
TransactionCurrency I_SalesDocument TransactionCurrency Transaction Currency
_TransactionCurrency I_SalesDocument _TransactionCurrency
DisplayCurrency Display Currency
PricingDate I_SalesDocument PricingDate Date for Pricing and Exchange Rate
RetailPromotion Retail Promotion
SalesOrderCondition Sales Order Condition
NumberOfIncomingSalesOrders Number of Incoming Sales Orders
IncomingSalesOrdersNetAmount Incoming Sales Orders Net Value in Transaction Currency
OpnSOForOrdReltdInvcsNetAmtDC Open Sales Orders for Ord.Reltd Billing Net Amount IDC
OpnSlsOrdsForDelivAmtInDspCrcy Open Sales Orders for Deliveries Net Amt in Displ. Crcy
OpnSlsOrdsForInvcPlansNetAmtDC Open Sls Orders for Billing Plans Net Amt in Displ. Crcy
RequestedDeliveryDate I_SalesDocument RequestedDeliveryDate Requested Delivery Date
ShippingType I_SalesDocument ShippingType Shipping Type
_ShippingType I_SalesDocument _ShippingType
ShippingCondition I_SalesDocument ShippingCondition Shipping Conditions
_ShippingCondition I_SalesDocument _ShippingCondition
IncotermsClassification I_SalesDocument IncotermsClassification Incoterms (Part 1)
_IncotermsClassification I_SalesDocument _IncotermsClassification
IncotermsTransferLocation I_SalesDocument IncotermsTransferLocation Incoterms (Part 2)
IncotermsLocation1 I_SalesDocument IncotermsLocation1 Incoterms Location 1
IncotermsLocation2 I_SalesDocument IncotermsLocation2 Incoterms Location 2
IncotermsVersion I_SalesDocument IncotermsVersion Incoterms Version
_IncotermsVersion I_SalesDocument _IncotermsVersion
CompleteDeliveryIsDefined I_SalesDocument CompleteDeliveryIsDefined Complete Delivery Defined for Each Sales Order
DeliveryBlockReason I_SalesDocument DeliveryBlockReason Delivery Block (Document Header)
_DeliveryBlockReason I_SalesDocument _DeliveryBlockReason
BillingDocumentDate I_SalesDocument BillingDocumentDate Billing Date
BillingCompanyCode I_SalesDocument BillingCompanyCode Company Code to Be Billed
_BillingCompanyCode I_SalesDocument _BillingCompanyCode
HeaderBillingBlockReason I_SalesDocument HeaderBillingBlockReason Billing Block in SD Document
_HeaderBillingBlockReason I_SalesDocument _HeaderBillingBlockReason
CustomerPaymentTerms I_SalesDocument CustomerPaymentTerms Terms of Payment Key
_CustomerPaymentTerms I_SalesDocument _CustomerPaymentTerms
PaymentMethod I_SalesDocument PaymentMethod Payment Method
FixedValueDate I_SalesDocument FixedValueDate Fixed Value Date
CustomerProject CustomerProjectItem EngagementProject Commercial Project ID
_CustomerProject _CustomerProject
FiscalYear I_SalesDocument FiscalYear G/L Fiscal Year
FiscalPeriod I_SalesDocument FiscalPeriod Posting Period
ExchangeRateType I_SalesDocument ExchangeRateType Exchange Rate Type
_ExchangeRateType I_SalesDocument _ExchangeRateType
BusinessArea I_SalesDocument BusinessArea Business Area
_BusinessArea I_SalesDocument _BusinessArea
CustomerAccountAssignmentGroup I_SalesDocument CustomerAccountAssignmentGroup Account Assignment Group for Customer
_CustomerAccountAssgmtGroup I_SalesDocument _CustomerAccountAssgmtGroup
CostCenterBusinessArea Business Area from Cost Center
_CostCenterBusinessArea I_SalesDocument _CostCenterBusinessArea
CostCenter I_SalesDocument CostCenter Cost Center
_CostCenter I_SalesDocument _CostCenter
ControllingArea I_SalesDocument ControllingArea Controlling Area
_ControllingArea I_SalesDocument _ControllingArea
OrderID I_SalesDocument OrderID Order Number
ControllingObject Controlling Object
ReferenceSDDocument I_SalesDocument ReferenceSDDocument Document Number of Reference Document
ReferenceSDDocumentCategory I_SalesDocument ReferenceSDDocumentCategory Document Category of Preceding SD Document
_ReferenceSDDocumentCategory I_SalesDocument _ReferenceSDDocumentCategory
BusinessSolutionOrder I_SalesDocument BusinessSolutionOrder Solution Order
_SolutionOrder
OverallSDProcessStatus Overall Processing Status (Header/All Items)
_OverallSDProcessStatus I_SalesDocument _OverallSDProcessStatus
OverallPurchaseConfStatus Purchasing Confirmation Status (All Items)
_OverallPurchaseConfStatus I_SalesDocument _OverallPurchaseConfStatus
OverallSDDocumentRejectionSts Rejection Status (All Items)
_OverallSDDocumentRejectionSts I_SalesDocument _OverallSDDocumentRejectionSts
TotalBlockStatus I_SalesDocument TotalBlockStatus Overall Block Status (Header)
_TotalBlockStatus I_SalesDocument _TotalBlockStatus
OverallDelivConfStatus Delivery Confirmation Status (All Items)
_OverallDelivConfStatus I_SalesDocument _OverallDelivConfStatus
OverallTotalDeliveryStatus Overall Delivery Status (All Items)
_OverallTotalDeliveryStatus I_SalesDocument _OverallTotalDeliveryStatus
OverallDeliveryStatus Delivery Status (All Items)
_OverallDeliveryStatus I_SalesDocument _OverallDeliveryStatus
OverallDeliveryBlockStatus Overall Delivery Block Status (All Items)
_OverallDeliveryBlockStatus I_SalesDocument _OverallDeliveryBlockStatus
OverallOrdReltdBillgStatus Order-Related Billing Status (All Items)
_OverallOrdReltdBillgStatus I_SalesDocument _OverallOrdReltdBillgStatus
OverallBillingBlockStatus Billing Block Status (All Items)
_OverallBillingBlockStatus I_SalesDocument _OverallBillingBlockStatus
OverallTotalSDDocRefStatus Overall Reference Status (All Items)
_OverallTotalSDDocRefStatus I_SalesDocument _OverallTotalSDDocRefStatus
OverallSDDocReferenceStatus Reference Status (All Items)
_OverallSDDocReferenceStatus I_SalesDocument _OverallSDDocReferenceStatus
TotalCreditCheckStatus I_SalesDocument TotalCreditCheckStatus Overall Status of Credit Checks
_TotalCreditCheckStatus I_SalesDocument _TotalCreditCheckStatus
MaxDocValueCreditCheckStatus I_SalesDocument MaxDocValueCreditCheckStatus Status of Credit Check Against Maximum Document Value
_MaxDocValueCreditCheckStatus I_SalesDocument _MaxDocValueCreditCheckStatus
PaymentTermCreditCheckStatus Status of Credit Check Against Terms of Payment
_PaymentTermCreditCheckStatus I_SalesDocument _PaymentTermCreditCheckStatus
FinDocCreditCheckStatus I_SalesDocument FinDocCreditCheckStatus Status of Credit Check Against Financial Document
_FinDocCreditCheckStatus I_SalesDocument _FinDocCreditCheckStatus
ExprtInsurCreditCheckStatus I_SalesDocument ExprtInsurCreditCheckStatus Status of Credit Check Against Export Credit Insurance
_ExprtInsurCreditCheckStatus I_SalesDocument _ExprtInsurCreditCheckStatus
PaytAuthsnCreditCheckSts I_SalesDocument PaytAuthsnCreditCheckSts Status of Credit Check Against Payment Card Authorization
_PaytAuthsnCreditCheckSts I_SalesDocument _PaytAuthsnCreditCheckSts
CentralCreditCheckStatus Central Credit Check Status
_CentralCreditCheckStatus I_SalesDocument _CentralCreditCheckStatus
CentralCreditChkTechErrSts Status of Technical Error SAP Credit Management
_CentralCreditChkTechErrSts I_SalesDocument _CentralCreditChkTechErrSts
HdrGeneralIncompletionStatus Incompletion Status (Header)
_HdrGeneralIncompletionStatus I_SalesDocument _HdrGeneralIncompletionStatus
OverallPricingIncompletionSts Pricing Incompletion Status (All Items)
_OverallPricingIncompletionSts I_SalesDocument _OverallPricingIncompletionSts
HeaderDelivIncompletionStatus Delivery Incompletion Status (Header)
_HeaderDelivIncompletionStatus I_SalesDocument _HeaderDelivIncompletionStatus
HeaderBillgIncompletionStatus Billing Incompletion Status (Header)
_HeaderBillgIncompletionStatus I_SalesDocument _HeaderBillgIncompletionStatus
OvrlItmGeneralIncompletionSts Incompletion Status (All Items)
_OvrlItmGeneralIncompletionSts I_SalesDocument _OvrlItmGeneralIncompletionSts
OvrlItmBillingIncompletionSts Billing Incompletion Status (All Items)
_OvrlItmBillingIncompletionSts I_SalesDocument _OvrlItmBillingIncompletionSts
OvrlItmDelivIncompletionSts Delivery Incompletion Status (All Items)
_OvrlItmDelivIncompletionSts I_SalesDocument _OvrlItmDelivIncompletionSts

Derived SQL interpretation, reconstructed from the parsed view metadata (data sources, associations, and field mappings). SAP annotations are omitted and the structure is reformulated as SQL — this is a functional approximation, not the verbatim SAP source.

-- Derived SQL interpretation of CDS view I_SalesOrderCube.
-- Reconstructed from parsed metadata (data sources, associations, fields).
-- SAP annotations are omitted and the structure is reformulated as SQL;
-- this is a functional approximation, not the verbatim SAP source. Some join
-- conditions may be unavailable and a few CDS constructs are kept as-is.
-- Parameters: P_ExchangeRateType : kurst, P_DisplayCurrency : vdm_v_display_currency

CREATE VIEW I_SalesOrderCube AS
SELECT
  cast(SDH.SalesDocument as vdm_sales_order preserving type) AS SalesOrder,
  SDH.SalesDocumentType AS SalesOrderType,
  SDH.CreatedByUser AS CreatedByUser,
  SDH._CreatedByUser AS _CreatedByUser,
  cast(SDH._CreatedByUser.UserDescription as created_by_user_name) AS CreatedByUserName,
  SDH.CreationDate AS CreationDate,
  SDH.CreationTime AS CreationTime,
  SDH.LastChangeDate AS LastChangeDate,
  cast(CalendarDate.CalendarYear as creation_date_year) AS CreationDateYear,
  cast(CalendarDate.YearQuarter as creation_date_year_quarter) AS CreationDateYearQuarter,
  cast(CalendarDate.YearMonth as creation_date_year_month) AS CreationDateYearMonth,
  cast(CalendarDateSalesOrder.CalendarYear as sales_order_date_year) AS SalesOrderDateYear,
  cast(CalendarDateSalesOrder.YearQuarter as sales_order_date_year_quarter) AS SalesOrderDateYearQuarter,
  cast(CalendarDateSalesOrder.YearMonth as sales_order_date_year_month) AS SalesOrderDateYearMonth,
  SDH.SalesOrganization AS SalesOrganization,
  SDH._SalesOrganization AS _SalesOrganization,
  SDH.DistributionChannel AS DistributionChannel,
  SDH._DistributionChannel AS _DistributionChannel,
  cast(SDH.OrganizationDivision as organization_division preserving type) AS OrganizationDivision,
  SDH._OrganizationDivision AS _OrganizationDivision,
  SDH.SalesGroup AS SalesGroup,
  SDH._SalesGroup AS _SalesGroup,
  SDH.SalesOffice AS SalesOffice,
  SDH._SalesOffice AS _SalesOffice,
  SDH._SoldToParty.TradingPartner AS PartnerCompany,
  SDH._SoldToParty._GlobalCompany AS _GlobalCompany,
  SDH.SoldToParty AS SoldToParty,
  SDH._SoldToParty AS _SoldToParty,
  SDH._SoldToParty.CustomerClassification AS SoldToPartyClassification,
  cast(StandardPartner.ShipToParty as kunwe) AS ShipToParty,
  cast(StandardPartner.PayerParty as kunrg) AS PayerParty,
  cast(StandardPartner.BillToParty as kunre) AS BillToParty,
  SDH.CustomerGroup AS CustomerGroup,
  SDH._CustomerGroup AS _CustomerGroup,
  SDH.AdditionalCustomerGroup1 AS AdditionalCustomerGroup1,
  SDH._AdditionalCustomerGroup1 AS _AdditionalCustomerGroup1,
  SDH.AdditionalCustomerGroup2 AS AdditionalCustomerGroup2,
  SDH._AdditionalCustomerGroup2 AS _AdditionalCustomerGroup2,
  SDH.AdditionalCustomerGroup3 AS AdditionalCustomerGroup3,
  SDH._AdditionalCustomerGroup3 AS _AdditionalCustomerGroup3,
  SDH.AdditionalCustomerGroup4 AS AdditionalCustomerGroup4,
  SDH._AdditionalCustomerGroup4 AS _AdditionalCustomerGroup4,
  SDH.AdditionalCustomerGroup5 AS AdditionalCustomerGroup5,
  SDH._AdditionalCustomerGroup5 AS _AdditionalCustomerGroup5,
  cast(SDH.CustomerRebateAgreement as customer_rebate_agreement) AS CustomerRebateAgreement,
  SDH.SalesDocumentDate AS SalesOrderDate,
  SDH.SDDocumentReason AS SDDocumentReason,
  SDH._SDDocumentReason AS _SDDocumentReason,
  SDH.SDDocumentCollectiveNumber AS SDDocumentCollectiveNumber,
  SDH.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
  SDH.CustomerPurchaseOrderType AS CustomerPurchaseOrderType,
  SDH.CustomerPurchaseOrderDate AS CustomerPurchaseOrderDate,
  SDH.CustomerPurchaseOrderSuplmnt AS CustomerPurchaseOrderSuplmnt,
  SDH.SalesDistrict AS SalesDistrict,
  SDH._SalesDistrict AS _SalesDistrict,
  cast(SDH.ProductCatalog as product_catalog) AS ProductCatalog,
  SDH.ServicesRenderedDate AS ServicesRenderedDate,
  SDH.TransactionCurrency AS TransactionCurrency,
  SDH._TransactionCurrency AS _TransactionCurrency,
  cast(:P_DisplayCurrency as vdm_v_display_currency) AS DisplayCurrency,
  SDH.PricingDate AS PricingDate,
  cast(SDH.RetailPromotion as retail_promotion) AS RetailPromotion,
  cast(SDH.SalesDocumentCondition as sales_order_condition) AS SalesOrderCondition,
  cast(1 as nmbr_of_incg_sls_ords) AS NumberOfIncomingSalesOrders,
  cast(SDH.TotalNetAmount as incg_sls_ords_net_amt) AS IncomingSalesOrdersNetAmount,
  cast(OpnSOForOrdReltdInvcsNetAmtDC as opn_ords_for_ordrelinv_amt_idc) AS OpnSOForOrdReltdInvcsNetAmtDC,
  cast(OpnSlsOrdsForDelivAmtInDspCrcy as opn_ord_for_del_amt_idc) AS OpnSlsOrdsForDelivAmtInDspCrcy,
  cast(OpnSlsOrdsForInvcPlansNetAmtDC as opn_ord_for_iplan_amt_idc) AS OpnSlsOrdsForInvcPlansNetAmtDC,
  SDH.RequestedDeliveryDate AS RequestedDeliveryDate,
  SDH.ShippingType AS ShippingType,
  SDH._ShippingType AS _ShippingType,
  SDH.ShippingCondition AS ShippingCondition,
  SDH._ShippingCondition AS _ShippingCondition,
  SDH.IncotermsClassification AS IncotermsClassification,
  SDH._IncotermsClassification AS _IncotermsClassification,
  SDH.IncotermsTransferLocation AS IncotermsTransferLocation,
  SDH.IncotermsLocation1 AS IncotermsLocation1,
  SDH.IncotermsLocation2 AS IncotermsLocation2,
  SDH.IncotermsVersion AS IncotermsVersion,
  SDH._IncotermsVersion AS _IncotermsVersion,
  SDH.CompleteDeliveryIsDefined AS CompleteDeliveryIsDefined,
  SDH.DeliveryBlockReason AS DeliveryBlockReason,
  SDH._DeliveryBlockReason AS _DeliveryBlockReason,
  SDH.BillingDocumentDate AS BillingDocumentDate,
  SDH.BillingCompanyCode AS BillingCompanyCode,
  SDH._BillingCompanyCode AS _BillingCompanyCode,
  SDH.HeaderBillingBlockReason AS HeaderBillingBlockReason,
  SDH._HeaderBillingBlockReason AS _HeaderBillingBlockReason,
  SDH.CustomerPaymentTerms AS CustomerPaymentTerms,
  SDH._CustomerPaymentTerms AS _CustomerPaymentTerms,
  SDH.PaymentMethod AS PaymentMethod,
  SDH.FixedValueDate AS FixedValueDate,
  CustomerProjectItem.EngagementProject AS CustomerProject,
  SDH.FiscalYear AS FiscalYear,
  SDH.FiscalPeriod AS FiscalPeriod,
  SDH.ExchangeRateType AS ExchangeRateType,
  SDH._ExchangeRateType AS _ExchangeRateType,
  SDH.BusinessArea AS BusinessArea,
  SDH._BusinessArea AS _BusinessArea,
  SDH.CustomerAccountAssignmentGroup AS CustomerAccountAssignmentGroup,
  SDH._CustomerAccountAssgmtGroup AS _CustomerAccountAssgmtGroup,
  cast(SDH.CostCenterBusinessArea as business_area_cost_center preserving type) AS CostCenterBusinessArea,
  SDH._CostCenterBusinessArea AS _CostCenterBusinessArea,
  SDH.CostCenter AS CostCenter,
  SDH._CostCenter AS _CostCenter,
  SDH.ControllingArea AS ControllingArea,
  SDH._ControllingArea AS _ControllingArea,
  SDH.OrderID AS OrderID,
  cast(SDH.ControllingObject as controlling_object) AS ControllingObject,
  SDH.ReferenceSDDocument AS ReferenceSDDocument,
  SDH.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
  SDH._ReferenceSDDocumentCategory AS _ReferenceSDDocumentCategory,
  SDH.BusinessSolutionOrder AS BusinessSolutionOrder,
  cast(SDH.OverallSDProcessStatus as overall_sd_process_status preserving type) AS OverallSDProcessStatus,
  SDH._OverallSDProcessStatus AS _OverallSDProcessStatus,
  cast(SDH.OverallPurchaseConfStatus as overall_purchase_conf_status preserving type) AS OverallPurchaseConfStatus,
  SDH._OverallPurchaseConfStatus AS _OverallPurchaseConfStatus,
  cast(SDH.OverallSDDocumentRejectionSts as ovrl_sd_doc_rejection_status preserving type) AS OverallSDDocumentRejectionSts,
  SDH._OverallSDDocumentRejectionSts AS _OverallSDDocumentRejectionSts,
  SDH.TotalBlockStatus AS TotalBlockStatus,
  SDH._TotalBlockStatus AS _TotalBlockStatus,
  cast(SDH.OverallDelivConfStatus as overall_delivery_conf_status preserving type) AS OverallDelivConfStatus,
  SDH._OverallDelivConfStatus AS _OverallDelivConfStatus,
  cast(SDH.OverallTotalDeliveryStatus as itms_ovrl_delivery_status preserving type) AS OverallTotalDeliveryStatus,
  SDH._OverallTotalDeliveryStatus AS _OverallTotalDeliveryStatus,
  cast(SDH.OverallDeliveryStatus as overall_delivery_status preserving type) AS OverallDeliveryStatus,
  SDH._OverallDeliveryStatus AS _OverallDeliveryStatus,
  cast(SDH.OverallDeliveryBlockStatus as overall_delivery_block_status preserving type) AS OverallDeliveryBlockStatus,
  SDH._OverallDeliveryBlockStatus AS _OverallDeliveryBlockStatus,
  cast(SDH.OverallOrdReltdBillgStatus as ovrl_ord_rel_billg_status preserving type) AS OverallOrdReltdBillgStatus,
  SDH._OverallOrdReltdBillgStatus AS _OverallOrdReltdBillgStatus,
  cast(SDH.OverallBillingBlockStatus as overall_billing_block_status preserving type) AS OverallBillingBlockStatus,
  SDH._OverallBillingBlockStatus AS _OverallBillingBlockStatus,
  cast(SDH.OverallTotalSDDocRefStatus as ovrl_reference_status preserving type) AS OverallTotalSDDocRefStatus,
  SDH._OverallTotalSDDocRefStatus AS _OverallTotalSDDocRefStatus,
  cast(SDH.OverallSDDocReferenceStatus as ovrl_sd_doc_reference_status preserving type) AS OverallSDDocReferenceStatus,
  SDH._OverallSDDocReferenceStatus AS _OverallSDDocReferenceStatus,
  SDH.TotalCreditCheckStatus AS TotalCreditCheckStatus,
  SDH._TotalCreditCheckStatus AS _TotalCreditCheckStatus,
  SDH.MaxDocValueCreditCheckStatus AS MaxDocValueCreditCheckStatus,
  SDH._MaxDocValueCreditCheckStatus AS _MaxDocValueCreditCheckStatus,
  cast(SDH.PaymentTermCreditCheckStatus as payt_terms_credit_check_status preserving type) AS PaymentTermCreditCheckStatus,
  SDH._PaymentTermCreditCheckStatus AS _PaymentTermCreditCheckStatus,
  SDH.FinDocCreditCheckStatus AS FinDocCreditCheckStatus,
  SDH._FinDocCreditCheckStatus AS _FinDocCreditCheckStatus,
  SDH.ExprtInsurCreditCheckStatus AS ExprtInsurCreditCheckStatus,
  SDH._ExprtInsurCreditCheckStatus AS _ExprtInsurCreditCheckStatus,
  SDH.PaytAuthsnCreditCheckSts AS PaytAuthsnCreditCheckSts,
  SDH._PaytAuthsnCreditCheckSts AS _PaytAuthsnCreditCheckSts,
  cast(SDH.CentralCreditCheckStatus as central_credit_check_status preserving type) AS CentralCreditCheckStatus,
  SDH._CentralCreditCheckStatus AS _CentralCreditCheckStatus,
  cast(SDH.CentralCreditChkTechErrSts as centrl_crdt_chck_tech_err_sts preserving type) AS CentralCreditChkTechErrSts,
  SDH._CentralCreditChkTechErrSts AS _CentralCreditChkTechErrSts,
  cast(SDH.HdrGeneralIncompletionStatus as hdr_general_incompltn_status preserving type) AS HdrGeneralIncompletionStatus,
  SDH._HdrGeneralIncompletionStatus AS _HdrGeneralIncompletionStatus,
  cast(SDH.OverallPricingIncompletionSts as ovrl_pricing_incompletion_sts preserving type) AS OverallPricingIncompletionSts,
  SDH._OverallPricingIncompletionSts AS _OverallPricingIncompletionSts,
  cast(SDH.HeaderDelivIncompletionStatus as hdrdelivincompletionstatus preserving type) AS HeaderDelivIncompletionStatus,
  SDH._HeaderDelivIncompletionStatus AS _HeaderDelivIncompletionStatus,
  cast(SDH.HeaderBillgIncompletionStatus as hdrbillgincompletionstatus preserving type) AS HeaderBillgIncompletionStatus,
  SDH._HeaderBillgIncompletionStatus AS _HeaderBillgIncompletionStatus,
  cast(SDH.OvrlItmGeneralIncompletionSts as itms_ovrl_incompletion_status preserving type) AS OvrlItmGeneralIncompletionSts,
  SDH._OvrlItmGeneralIncompletionSts AS _OvrlItmGeneralIncompletionSts,
  cast(SDH.OvrlItmBillingIncompletionSts as ovrl_itms_incompltn_sts_billg preserving type) AS OvrlItmBillingIncompletionSts,
  SDH._OvrlItmBillingIncompletionSts AS _OvrlItmBillingIncompletionSts,
  cast(SDH.OvrlItmDelivIncompletionSts as ovrl_items_dlv_incompltn_sts preserving type) AS OvrlItmDelivIncompletionSts,
  SDH._OvrlItmDelivIncompletionSts AS _OvrlItmDelivIncompletionSts
FROM I_SalesDocument AS SDH
LEFT OUTER JOIN I_SalesOrderType AS _SalesOrderType ON SalesOrderType = _SalesOrderType.SalesOrderType  -- association [0..1]
LEFT OUTER JOIN I_EngagementProject AS _CustomerProject ON CustomerProject = _CustomerProject.EngagementProject  -- association [0..1]
LEFT OUTER JOIN I_CustomerClassification AS _SoldToPartyClassification ON SoldToPartyClassification = _SoldToPartyClassification.CustomerClassification  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _ShipToParty ON ShipToParty = _ShipToParty.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _BillToParty ON BillToParty = _BillToParty.Customer  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _PayerParty ON PayerParty = _PayerParty.Customer  -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SDH.SalesDocument = _Extension.SalesDocument  -- association [0..1]
;