I_SALESORDER

CDS View

Sales Order

I_SALESORDER is a CDS View in S/4HANA. Sales Order. It contains 166 fields. 39 CDS views read from this table.

CDS Views using this table (39)

ViewTypeJoinVDMDescription
/VSCEW/C_Disposition_VC view_entity from Disposition VC (Customer Order)
A_SalesOrder view from COMPOSITE Sales Order Header
A_SalesOrderCreditSimulation view from COMPOSITE Sales Order Credit Simulation (API)
A_SalesOrderPricingSimulation view from COMPOSITE Sales Order Pricing Simulation (API)
A_SalesOrderSimulation view from COMPOSITE Sales Order Simulation
A_SalesOrderSimulation_2 view_entity from CONSUMPTION Sales Order Header Simulation
C_BSOrdProcFlwSalesOrder view from CONSUMPTION Sales Order Attrib for BSOrd Prgrs
C_CreditMemoReqRefSalesOrderVH view_entity from CONSUMPTION Credit Memo Req Reference Sales Order
C_Customer360SalesOrder view_entity from CONSUMPTION Customer 360 Sales Order
C_DebitMemoReqRefSalesOrderVH view_entity from CONSUMPTION Debit Memo Req Reference Sales Order
C_ESJISalesOrderQuery view from CONSUMPTION Incoming Sales Orders
C_OpenSalesOrder view from CONSUMPTION Open Sales Orders
C_OpenSalesOrders_F2200 view from CONSUMPTION open sales orders
C_RejectedSalesOrder view from CONSUMPTION Rejected Sales Orders
C_ReturnsReferenceSalesOrderVH view_entity from CONSUMPTION Return Reference Sales Order
C_RFDYSalesOrder view_entity from CONSUMPTION Release for Delivery Sales Order
C_SalesOrderEnhancedValueHelp view_entity from CONSUMPTION Sales Order
C_Salesorderfs view from CONSUMPTION Sales Order
C_SalesOrderOverview view from CONSUMPTION Additional Filters
C_SalesOrderWl_F1873 view from CONSUMPTION Sales Orders
C_SalesOrderWorkflowTaskCard view_entity from CONSUMPTION Sales Order Workflow Task Card
C_SalesOrderWrkflwInbox view from CONSUMPTION Sales Order Workflow Inbox
C_So_F0804_Pbs_Cds view inner CONSUMPTION Maintain Sales order PBS - Fiori F0804
C_SubsqntSalesOrder view from CONSUMPTION Subsequent Sales Order
ESH_N_SALESORDER view from Anchor view -SALESORDER
I_CustProjSlsOrd view inner COMPOSITE Sales Order for Customer Project
I_EDCSalesOrderRecords view_entity inner BASIC EDC Relevant Sales Order Records
I_InternalOrderSalesOrderVH view_entity from COMPOSITE Sales Order
I_SalesOrderImport view from BASIC Header Fields for Sales Order Import
I_SalesOrderSoldToVH view from COMPOSITE Sales Order Value Help
I_SalesOrderStdVH view from COMPOSITE Sales Order
I_SlsOrdPaytCardInfo view inner COMPOSITE Sales Order with Payment Card Data
I_VMSVehicleStdSalesOrder view from BASIC Sales order details
P_DCD_4 view from COMPOSITE Documented Credit Decision 4
P_DCD4_2 view_entity from COMPOSITE Credit Decision Document 4 - V2
P_RejectedSalesOrder view from CONSUMPTION Rejected Sales Order Date Calculation
P_SalesOrderCnvrtdAmount view from CONSUMPTION Sales Order Converted Net Amount
P_SalesOrderDateCalc view from CONSUMPTION Sales Order Date Calculation
R_SalesOrderTP view_entity from TRANSACTIONAL Sales Order - TP

Fields (166)

KeyField CDS FieldsUsed in Views
KEY SalesOrder SalesOrder,SalesOrderForEdit,UI5NetworkGraphAttributeValue 18
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1 1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2 1
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3 1
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4 1
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5 1
_BillingCompanyCode _BillingCompanyCode 1
_ControllingArea _ControllingArea 1
_CreatedByUser _CreatedByUser 1
_CreditControlArea _CreditControlArea 2
_CustomerAccountAssgmtGroup _CustomerAccountAssgmtGroup 1
_CustomerCreditAccount _CustomerCreditAccount 1
_CustomerGroup _CustomerGroup 1
_CustomerPaymentTerms _CustomerPaymentTerms 1
_CustomerPriceGroup _CustomerPriceGroup 1
_CustomerPurchaseOrderType _CustomerPurchaseOrderType 1
_DeliveryBlockReason _DeliveryBlockReason 2
_DeliveryDateTypeRule _DeliveryDateTypeRule 1
_DistributionChannel _DistributionChannel 3
_DownPaymentStatus _DownPaymentStatus 2
_HdrGeneralIncompletionStatus _HdrGeneralIncompletionStatus 1
_HeaderBillingBlockReason _HeaderBillingBlockReason 2
_IncotermsClassification _IncotermsClassification 1
_IncotermsVersion _IncotermsVersion 1
_LastChangedByUser _LastChangedByUser 1
_OmniChnlSalesPromotionStatus _OmniChnlSalesPromotionStatus 1
_OrganizationDivision _OrganizationDivision 4
_OverallBillingBlockStatus _OverallBillingBlockStatus 2
_OverallChmlCmplncStatus _OverallChmlCmplncStatus 2
_OverallDangerousGoodsStatus _OverallDangerousGoodsStatus 2
_OverallDeliveryBlockStatus _OverallDeliveryBlockStatus 1
_OverallDeliveryStatus _OverallDeliveryStatus 1
_OverallOrdReltdBillgStatus _OverallOrdReltdBillgStatus 1
_OverallPurchaseConfStatus _OverallPurchaseConfStatus 1
_OverallSDDocReferenceStatus _OverallSDDocReferenceStatus 1
_OverallSDDocumentRejectionSts _OverallSDDocumentRejectionSts 2
_OverallSDProcessStatus _OverallSDProcessStatus 3
_OvrlItmGeneralIncompletionSts _OvrlItmGeneralIncompletionSts 1
_OvrlSftyDataSheetSts _OvrlSftyDataSheetSts 2
_OvrlTradeCmplncEmbargoStatus _OvrlTradeCmplncEmbargoStatus 2
_OvrlTrdCmplncLegalCtrlChkSts _OvrlTrdCmplncLegalCtrlChkSts 2
_OvTrdCmplncSnctndListChkSts _OvTrdCmplncSnctndListChkSts 2
_PaytAuthsnCreditCheckSts _PaytAuthsnCreditCheckSts 1
_PriceListType _PriceListType 1
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory 1
_SalesDistrict _SalesDistrict 1
_SalesDocApprovalStatus _SalesDocApprovalStatus 2
_SalesGroup _SalesGroup 2
_SalesOffice _SalesOffice 2
_SalesOrderApprovalReason _SalesOrderApprovalReason 1
_SalesOrderType _SalesOrderType 3
_SalesOrganization _SalesOrganization 4
_SDDocumentReason _SDDocumentReason 2
_SDPricingProcedure _SDPricingProcedure 1
_ShippingCondition _ShippingCondition 1
_ShippingType _ShippingType 1
_SoldToParty _SoldToParty 3
_SolutionOrder _SolutionOrder 1
_TaxDepartureCountry _TaxDepartureCountry 1
_TotalBlockStatus _TotalBlockStatus 1
_TotalCreditCheckStatus _TotalCreditCheckStatus 1
_TransactionCurrency _TransactionCurrency 3
_VATRegistrationCountry _VATRegistrationCountry 1
AccountingDocExternalReference AccountingDocExternalReference 2
AdditionalCustomerGroup1 AdditionalCustomerGroup1 2
AdditionalCustomerGroup2 AdditionalCustomerGroup2 2
AdditionalCustomerGroup3 AdditionalCustomerGroup3 2
AdditionalCustomerGroup4 AdditionalCustomerGroup4 2
AdditionalCustomerGroup5 AdditionalCustomerGroup5 2
AssignmentReference AssignmentReference 2
BillingCompanyCode BillingCompanyCode 3
BillingDocumentDate BillingDocumentDate 2
BillingPlan BillingPlan 1
BusinessSolutionOrder BusinessSolutionOrder 2
CompleteDeliveryIsDefined CompleteDeliveryIsDefined 2
ControllingArea ControllingArea 3
CorrespncExternalReference CorrespncExternalReference 2
CorrespncExtRefByShipToParty CorrespncExtRefByShipToParty 2
CostCenter CostCenter 3
CreatedByUser CreatedByUser 6
CreationDate CreationDate,OrderCreationDate 7
CreationTime CreationTime 2
CreditControlArea CreditControlArea 2
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup 3
CustomerCreditAccount CustomerCreditAccount 2
CustomerGroup CustomerGroup 3
CustomerPaymentTerms CustomerPaymentTerms 3
CustomerPriceGroup CustomerPriceGroup 2
CustomerPurchaseOrderDate CustomerPurchaseOrderDate 3
CustomerPurchaseOrderType CustomerPurchaseOrderType 2
CustomerTaxClassification1 CustomerTaxClassification1 1
CustomerTaxClassification2 CustomerTaxClassification2 1
CustomerTaxClassification3 CustomerTaxClassification3 1
CustomerTaxClassification4 CustomerTaxClassification4 1
CustomerTaxClassification5 CustomerTaxClassification5 1
CustomerTaxClassification6 CustomerTaxClassification6 1
CustomerTaxClassification7 CustomerTaxClassification7 1
CustomerTaxClassification8 CustomerTaxClassification8 1
CustomerTaxClassification9 CustomerTaxClassification9 1
DeliveryBlockReason DeliveryBlockReason 5
DeliveryDateTypeRule DeliveryDateTypeRule 2
DistributionChannel DistributionChannel 18
FiscalPeriod FiscalPeriod 1
FiscalYear FiscalYear 1
FixedValueDate FixedValueDate 2
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus 1
HeaderBillingBlockReason HeaderBillingBlockReason 7
IncotermsClassification IncotermsClassification 2
IncotermsLocation1 IncotermsLocation1 2
IncotermsLocation2 IncotermsLocation2 2
IncotermsVersion IncotermsVersion 2
IsEUTriangularDeal IsEUTriangularDeal 2
LastChangeDate LastChangeDate 3
LastChangedByUser LastChangedByUser 5
OrderCombinationIsAllowed OrderCombinationIsAllowed 1
OrganizationDivision Division,OrganizationDivision 18
OverallBillingBlockStatus OverallBillingBlockStatus 4
OverallChmlCmplncStatus OverallChmlCmplncStatus 4
OverallDangerousGoodsStatus OverallDangerousGoodsStatus 4
OverallDeliveryBlockStatus OverallDeliveryBlockStatus 3
OverallDeliveryStatus OverallDeliveryStatus 3
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus 3
OverallPurchaseConfStatus OverallPurchaseConfStatus 2
OverallSafetyDataSheetStatus OverallSafetyDataSheetStatus 4
OverallSDDocReferenceStatus OverallSDDocReferenceStatus 2
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts 5
OverallSDProcessStatus OverallSDProcessStatus 13
OverallTotalDeliveryStatus OverallTotalDeliveryStatus 1
OverallTrdCmplncEmbargoSts OverallTrdCmplncEmbargoSts 2
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts 1
OvrlTrdCmplncLegalCtrlChkSts OvrlTrdCmplncLegalCtrlChkSts 2
OvrlTrdCmplncSnctndListChkSts OvrlTrdCmplncSnctndListChkSts 1
PaymentMethod PaymentMethod 3
PaytAuthsnCreditCheckSts PaytAuthsnCreditCheckSts 1
PriceListType PriceListType 2
PricingDate PricingDate 2
PurchaseOrderByCustomer PurchaseOrderByCustomer 12
PurchaseOrderByShipToParty PurchaseOrderByShipToParty 2
ReceivingPoint ReceivingPoint 2
ReferenceSDDocument ReferenceSDDocument 4
ReferenceSDDocumentCategory ReferenceSDDocumentCategory 2
RequestedDeliveryDate RequestedDeliveryDate 4
SalesDistrict SalesDistrict 3
SalesDocApprovalStatus SalesDocApprovalStatus 5
SalesGroup SalesGroup 9
SalesOffice SalesOffice 7
SalesOrderApprovalReason SalesOrderApprovalReason 5
SalesOrderDate DocumentDate,SalesOrderDate 15
SalesOrderDownPaymentStatus SalesOrderDownPaymentStatus 5
SalesOrderProcessingType SalesOrderProcessingType 3
SalesOrderType OrderType,SalesOrderType 18
SalesOrganization SalesOrganization 18
SDDocumentReason SDDocumentReason 4
SDPricingProcedure SDPricingProcedure 2
ServicesRenderedDate ServicesRenderedDate 2
ShippingCondition ShippingCondition 2
ShippingType ShippingType 3
SlsContrAutoAssgmtIDForSlsOrd SlsContrAutoAssgmtIDForSlsOrd 2
SlsDocIsRlvtForProofOfDeliv SlsDocIsRlvtForProofOfDeliv 2
SoldToParty SoldToParty 18
TaxDepartureCountry TaxDepartureCountry 2
TotalBlockStatus TotalBlockStatus 2
TotalCreditCheckStatus TotalCreditCheckStatus 5
TotalNetAmount TotalNetAmount 12
TransactionCurrency TransactionCurrency 12
VATRegistrationCountry VATRegistrationCountry 2
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Sales Order'
@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA'),
  privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser', '_BusinessAreaText','_CostCenterBusinessAreaText','_CreditControlAreaText' ]
}
@AbapCatalog: {
  preserveKey: true,
  sqlViewName: 'ISDSALESORDER',
  compiler.compareFilter: true
}
@ObjectModel: {
   compositionRoot:   true,
   representativeKey: 'SalesOrder',
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #L
   },
   supportedCapabilities: [ #ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE, #EXTRACTION_DATA_SOURCE ],
   modelingPattern: [ #ANALYTICAL_DIMENSION ]
}
@Metadata.ignorePropagatedAnnotations: true
@Analytics.dataCategory: #DIMENSION 
@Metadata.allowExtensions:true
@ObjectModel.sapObjectNodeType.name: 'SalesOrder'       

@Analytics: {
    dataExtraction: {
        enabled: true,
        delta.changeDataCapture: {
            mapping:[
                {
                    table: 'vbak', role: #MAIN,
                    viewElement: ['SalesOrder'],
                    tableElement: ['vbeln']  },
                    
                {   filter: [{operator: #EQ, tableElement: 'posnr', value: '000000'}],
                    table: 'vbkd', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['SalesOrder'],
                    tableElement: ['vbeln']
                },   
                
                {   filter: [{operator: #EQ, tableElement: 'vposn', value: '000000'}],
                    table: 'veda', role: #LEFT_OUTER_TO_ONE_JOIN,
                    viewElement: ['SalesOrder'],
                    tableElement: ['vbeln']
                }              
            ]
        }
    }
 }

define view I_SalesOrder
  as select from I_SalesDocument as SalesDocument
  //Associations


  //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

  association [0..*] to I_BusinessAreaText          as _BusinessAreaText           on  $projection.BusinessArea = _BusinessAreaText.BusinessArea
  association [0..*] to I_BusinessAreaText          as _CostCenterBusinessAreaText on  $projection.CostCenterBusinessArea = _CostCenterBusinessAreaText.BusinessArea
  association [0..*] to I_CreditControlAreaText     as _CreditControlAreaText      on  $projection.CreditControlArea = _CreditControlAreaText.CreditControlArea
  // ]--GENERATED

  association [0..*] to I_SalesOrderItem            as _Item                       on  $projection.SalesOrder = _Item.SalesOrder
  association [0..1] to I_SalesOrderType            as _SalesOrderType             on  $projection.SalesOrderType = _SalesOrderType.SalesOrderType
  association [1..*] to I_SalesOrderPartner         as _Partner                    on  $projection.SalesOrder = _Partner.SalesOrder
  association [0..*] to I_SalesOrderPricingElement  as _PricingElement             on  $projection.SalesOrder = _PricingElement.SalesOrder

  association [0..1] to I_SalesOrderBillingPlan     as _BillingPlan                on  $projection.SalesOrder  = _BillingPlan.SalesOrder
                                                                                   and $projection.BillingPlan = _BillingPlan.BillingPlan

  association [0..1] to I_SalesOrderApprovalReason  as _SalesOrderApprovalReason   on  $projection.SalesOrderApprovalReason = _SalesOrderApprovalReason.SalesOrderApprovalReason

  association [0..*] to I_SalesOrderPrecdgProcFlow  as _PrecedingProcFlowDoc       on  _PrecedingProcFlowDoc.SalesOrder = $projection.SalesOrder

  association [0..*] to I_SalesOrderSubsqntProcFlow as _SubsequentProcFlowDoc      on  _SubsequentProcFlowDoc.SalesOrder = $projection.SalesOrder

  //Extensibility

  association [0..1] to E_SalesDocumentBasic        as _Extension                  on  SalesDocument.SalesDocument = _Extension.SalesDocument

{
      //Key

  key cast(SalesDocument as vdm_sales_order preserving type)        as SalesOrder,

      //Category

      @ObjectModel.foreignKey.association: '_SalesOrderType'
      cast( SalesDocumentType as sales_order_type preserving type ) as SalesOrderType,
      SalesDocumentProcessingType                                   as SalesOrderProcessingType,

      //Admin

      CreatedByUser,
      LastChangedByUser,
      @Semantics.systemDate.createdAt: true
      CreationDate,
      @Semantics.systemTime.createdAt: true
      CreationTime,
      @Semantics.systemDate.lastChangedAt: true
      LastChangeDate,
      @Semantics.systemDateTime.lastChangedAt: true
      LastChangeDateTime,
      SenderBusinessSystemName,
      ExternalDocumentID,
      ExternalDocLastChangeDateTime,

      // Organization

      @ObjectModel.foreignKey.association: '_SalesOrganization'
      SalesOrganization,
      @ObjectModel.foreignKey.association: '_DistributionChannel'
      DistributionChannel,
      @ObjectModel.foreignKey.association: '_OrganizationDivision'
      OrganizationDivision,
      @ObjectModel.foreignKey.association: '_SalesGroup'
      SalesGroup,
      @ObjectModel.foreignKey.association: '_SalesOffice'
      SalesOffice,

      //Sales

      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_CustomerGroup'
      CustomerGroup,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup1'
      AdditionalCustomerGroup1,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup2'
      AdditionalCustomerGroup2,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup3'
      AdditionalCustomerGroup3,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup4'
      AdditionalCustomerGroup4,
      @ObjectModel.foreignKey.association: '_AdditionalCustomerGroup5'
      AdditionalCustomerGroup5,
      SlsDocIsRlvtForProofOfDeliv,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CreditControlAreaStdVH',
                     element: 'CreditControlArea' }
        }]
      @ObjectModel.text.association: '_CreditControlAreaText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_CreditControlArea'
      CreditControlArea,
      CustomerRebateAgreement,
      SalesDocumentDate                                             as SalesOrderDate,
      ServicesRenderedDate,
      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      SDDocumentReason,
      PurchaseOrderByCustomer,
      PurchaseOrderByShipToParty,
      SDDocumentCollectiveNumber,
      @ObjectModel.foreignKey.association: '_CustomerPurchaseOrderType'
      CustomerPurchaseOrderType,
      CustomerPurchaseOrderDate,
      CustomerPurchaseOrderSuplmnt,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      SalesDistrict,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_StatisticsCurrency'
      StatisticsCurrency,
      ProductCatalog,
      NextCreditCheckDate,
      LastCustomerContactDate,

      //Pricing

      @DefaultAggregation: #SUM
      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalNetAmount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      TransactionCurrency,
      PricingDate,
      PriceDetnExchangeRate,
      RetailPromotion,
      SalesDocumentCondition                                        as SalesOrderCondition,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SDPricingProcedure'
      SDPricingProcedure,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      CustomerPriceGroup,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_PriceListType'
      PriceListType,

      BillingPlan,

      CustomerTaxClassification1,
      CustomerTaxClassification2,
      CustomerTaxClassification3,
      CustomerTaxClassification4,
      CustomerTaxClassification5,
      CustomerTaxClassification6,
      CustomerTaxClassification7,
      CustomerTaxClassification8,
      CustomerTaxClassification9,

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_TaxDepartureCountry'
      TaxDepartureCountry,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_VATRegistrationCountry'
      VATRegistrationCountry,

      //Shipping

      RequestedDeliveryDate,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_DeliveryDateTypeRule'
      DeliveryDateTypeRule,
      @ObjectModel.foreignKey.association: '_ShippingType'
      ShippingType,
      @ObjectModel.foreignKey.association: '_ShippingCondition'
      ShippingCondition,
      ReceivingPoint,
      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      IncotermsClassification,
      IncotermsTransferLocation,
      IncotermsLocation1,
      IncotermsLocation2,
      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      IncotermsVersion,
      CompleteDeliveryIsDefined,
      OrderCombinationIsAllowed,
      @ObjectModel.foreignKey.association: '_DeliveryBlockReason'
      DeliveryBlockReason,

      //Fashion

      FashionCancelDate,

      //Approval Management

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SalesOrderApprovalReason'
      SalesDocApprovalReason                                        as SalesOrderApprovalReason,

      //Billing

      BillingDocumentDate,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CompanyCodeStdVH',
                     element: 'CompanyCode' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_BillingCompanyCode'
      BillingCompanyCode,
      @ObjectModel.foreignKey.association: '_HeaderBillingBlockReason'
      HeaderBillingBlockReason,

      //Payment

      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      CustomerPaymentTerms,
      PaymentMethod,
      FixedValueDate,

      //Accounting

      FiscalYear,
      FiscalPeriod,
      ExchangeRateDate,
      @ObjectModel.foreignKey.association: '_ExchangeRateType'
      ExchangeRateType,
      AccountingExchangeRate,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.text.association: '_BusinessAreaText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,
      @ObjectModel.foreignKey.association: '_CustomerAccountAssgmtGroup'
      CustomerAccountAssignmentGroup,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.text.association: '_CostCenterBusinessAreaText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_CostCenterBusinessArea'
      CostCenterBusinessArea,
      CostCenter,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingAreaStdVH',
                     element: 'ControllingArea' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,
      OrderID,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingObjectStdVH',
                     element: 'ControllingObject' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_ControllingObject'
      ControllingObject,
      AssignmentReference,
      PaymentPlan,
      ContractAccount,
      AdditionalValueDays,

      //Credit Block

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_CustomerCreditAccount'
      CustomerCreditAccount,

      //Reference

      ReferenceSDDocument,
      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      ReferenceSDDocumentCategory,
      CorrespncExternalReference,
      CorrespncExtRefByShipToParty,
      @Analytics.internalName: #LOCAL
      AccountingDocExternalReference,

      @Analytics.internalName: #LOCAL
      @Consumption.valueHelpDefinition: [
       { entity:  { name:    'I_BusinessSolutionOrderStdVH',
                    element: 'BusinessSolutionOrder' }
       }]
      @ObjectModel.foreignKey.association: '_SolutionOrder'
      BusinessSolutionOrder,

      SlsContrAutoAssgmtIDForSlsOrd,

      //Status

      @ObjectModel.foreignKey.association: '_OverallSDProcessStatus'
      OverallSDProcessStatus,
      @ObjectModel.foreignKey.association: '_OverallPurchaseConfStatus'
      OverallPurchaseConfStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocumentRejectionSts'
      OverallSDDocumentRejectionSts,
      @ObjectModel.foreignKey.association: '_TotalBlockStatus'
      TotalBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallDelivConfStatus'
      OverallDelivConfStatus,
      @ObjectModel.foreignKey.association: '_OverallTotalDeliveryStatus'
      OverallTotalDeliveryStatus,
      @ObjectModel.foreignKey.association: '_OverallDeliveryStatus'
      OverallDeliveryStatus,
      @ObjectModel.foreignKey.association: '_OverallDeliveryBlockStatus'
      OverallDeliveryBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallOrdReltdBillgStatus'
      OverallOrdReltdBillgStatus,
      @ObjectModel.foreignKey.association: '_OverallBillingBlockStatus'
      OverallBillingBlockStatus,
      @ObjectModel.foreignKey.association: '_OverallTotalSDDocRefStatus'
      OverallTotalSDDocRefStatus,
      @ObjectModel.foreignKey.association: '_OverallSDDocReferenceStatus'
      OverallSDDocReferenceStatus,
      @ObjectModel.foreignKey.association: '_TotalCreditCheckStatus'
      TotalCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_MaxDocValueCreditCheckStatus'
      MaxDocValueCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_PaymentTermCreditCheckStatus'
      PaymentTermCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_FinDocCreditCheckStatus'
      FinDocCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_ExprtInsurCreditCheckStatus'
      ExprtInsurCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_PaytAuthsnCreditCheckSts'
      PaytAuthsnCreditCheckSts,
      @ObjectModel.foreignKey.association: '_CentralCreditCheckStatus'
      CentralCreditCheckStatus,
      @ObjectModel.foreignKey.association: '_CentralCreditChkTechErrSts'
      CentralCreditChkTechErrSts,
      @ObjectModel.foreignKey.association: '_HdrGeneralIncompletionStatus'
      HdrGeneralIncompletionStatus,
      @ObjectModel.foreignKey.association: '_OverallPricingIncompletionSts'
      OverallPricingIncompletionSts,
      @ObjectModel.foreignKey.association: '_HeaderDelivIncompletionStatus'
      HeaderDelivIncompletionStatus,
      @ObjectModel.foreignKey.association: '_HeaderBillgIncompletionStatus'
      HeaderBillgIncompletionStatus,
      @ObjectModel.foreignKey.association: '_OvrlItmGeneralIncompletionSts'
      OvrlItmGeneralIncompletionSts,
      @ObjectModel.foreignKey.association: '_OvrlItmBillingIncompletionSts'
      OvrlItmBillingIncompletionSts,
      @ObjectModel.foreignKey.association: '_OvrlItmDelivIncompletionSts'
      OvrlItmDelivIncompletionSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
      OverallChmlCmplncStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
      OverallDangerousGoodsStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
      OverallSafetyDataSheetStatus,
      @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
      SalesDocApprovalStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
      OverallTrdCmplncEmbargoSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvTrdCmplncSnctndListChkSts'
      OvrlTrdCmplncSnctndListChkSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlTrdCmplncLegalCtrlChkSts'
      OvrlTrdCmplncLegalCtrlChkSts,
      @ObjectModel.foreignKey.association: '_DownPaymentStatus'
      ContractDownPaymentStatus                                     as SalesOrderDownPaymentStatus,
      @ObjectModel.foreignKey.association: '_OmniChnlSalesPromotionStatus'
      OmniChnlSalesPromotionStatus,
      AlternativePricingDate,
      IsEUTriangularDeal,

      //Associations

      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Item,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _Partner,
      _StandardPartner,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _PricingElement,
      _BillingPlan,
      _SDPricingProcedure,
      _CustomerPriceGroup,
      _PriceListType,
      _SalesOrderType,
      _CreatedByUser,
      _LastChangedByUser,
      _SalesOrganization,
      _DistributionChannel,
      _OrganizationDivision,
      _SalesGroup,
      _SalesOffice,
      _SoldToParty,
      _CustomerGroup,
      _AdditionalCustomerGroup1,
      _AdditionalCustomerGroup2,
      _AdditionalCustomerGroup3,
      _AdditionalCustomerGroup4,
      _AdditionalCustomerGroup5,
      _CreditControlArea,
      _SDDocumentReason,
      _CustomerPurchaseOrderType,
      _SalesDistrict,
      _TransactionCurrency,
      _StatisticsCurrency,
      _ShippingType,
      _ShippingCondition,
      _IncotermsClassification,
      _IncotermsVersion,
      _DeliveryBlockReason,
      _DeliveryDateTypeRule,
      _BillingCompanyCode,
      _HeaderBillingBlockReason,
      _SalesOrderApprovalReason,
      _CustomerPaymentTerms,
      _ExchangeRateType,
      _BusinessArea,
      _CustomerAccountAssgmtGroup,
      _CostCenterBusinessArea,
      _CostCenter,
      _ControllingArea,
      _ControllingObject,
      _CustomerCreditAccount,
      _ReferenceSDDocumentCategory,
      _SolutionOrder,
      //Status

      _OverallSDProcessStatus,
      _OverallPurchaseConfStatus,
      _OverallSDDocumentRejectionSts,
      _TotalBlockStatus,
      _OverallDelivConfStatus,
      _OverallTotalDeliveryStatus,
      _OverallDeliveryStatus,
      _OverallDeliveryBlockStatus,
      _OverallOrdReltdBillgStatus,
      _OverallBillingBlockStatus,
      _OverallTotalSDDocRefStatus,
      _OverallSDDocReferenceStatus,
      _TotalCreditCheckStatus,
      _MaxDocValueCreditCheckStatus,
      _PaymentTermCreditCheckStatus,
      _FinDocCreditCheckStatus,
      _ExprtInsurCreditCheckStatus,
      _PaytAuthsnCreditCheckSts,
      _CentralCreditCheckStatus,
      _CentralCreditChkTechErrSts,
      _HdrGeneralIncompletionStatus,
      _OverallPricingIncompletionSts,
      _HeaderDelivIncompletionStatus,
      _HeaderBillgIncompletionStatus,
      _OvrlItmGeneralIncompletionSts,
      _OvrlItmBillingIncompletionSts,
      _OvrlItmDelivIncompletionSts,
      _OverallChmlCmplncStatus,
      _OverallDangerousGoodsStatus,
      _OvrlSftyDataSheetSts,
      _SalesDocApprovalStatus,
      _OvrlTradeCmplncEmbargoStatus,
      _OvTrdCmplncSnctndListChkSts,
      _OvrlTrdCmplncLegalCtrlChkSts,
      _OmniChnlSalesPromotionStatus,
      _DownPaymentStatus,
      _EngagementProjectItem,
      //--[ GENERATED:012:E6ExH29r7kY4iE3VJ}6T4m

      @Consumption.hidden: true
      _BusinessAreaText,
      @Consumption.hidden: true
      _CostCenterBusinessAreaText,
      @Consumption.hidden: true
      _CreditControlAreaText,
      // ]--GENERATED

      _TaxDepartureCountry,
      _VATRegistrationCountry,
      _PrecedingProcFlowDoc,
      _SubsequentProcFlowDoc
}
where
  SalesDocument.SDDocumentCategory = 'C';