I_SALESDOCUMENT

CDS View

Sales Document

I_SALESDOCUMENT is a CDS View in S/4HANA. Sales Document. It contains 171 fields. 92 CDS views read from this table.

CDS Views using this table (92)

ViewTypeJoinVDMDescription
C_CostRevnReassgmtSalesDocVH view from CONSUMPTION Sales Document Value Help
C_Cust360FulfillmentIssueCnt view_entity from CONSUMPTION Customer 360 Count of Fulfillment Issues
C_Customer360_Issues view from CONSUMPTION Customer 360 Issues
C_Customer360ApprovalBusDoc view_entity from CONSUMPTION Customer 360 business doc approvals
C_Customer360FulfillmentIssue view_entity from CONSUMPTION Customer 360 Fullfillment Issues
C_DelivProcFlowSalesDocument view from CONSUMPTION Delivery Process Flow - Node Sales Document
C_DspDocFlwSalesDocAttrib view from CONSUMPTION Sales Documents Attributes for DDF
C_DspDocFlwSalesDocVH view_entity from CONSUMPTION Sales Documents VH for DDF
C_DspDocFlwSDContractAttrib view from CONSUMPTION SD Contract Attributes for DDF
C_DuplicateSalesDocument view from CONSUMPTION Duplicate Sales Documents
C_EBRRSalesOrderMonitorItem view inner CONSUMPTION EBRR Sales Order Monitor Item
C_ESJIQuotationQuery view from CONSUMPTION Quotation
C_EvtBsdRevnRecgnSalesOrdWlItm view left_outer CONSUMPTION Worklist Rev. Rec. Issues - Sales Orders
C_Incompl_SalesDocWL_F2430 view from CONSUMPTION Incomplete Sales Documents
C_MassChangeSalesContract view from CONSUMPTION Mass Change of Sales Contract
C_MassChangeSalesDocument view from CONSUMPTION Mass Change of Sales Document
C_MassChangeSalesOrder view from CONSUMPTION Mass Change of Sales Order
C_MassChangeSalesQuotation view from CONSUMPTION Mass Change of Sales Quotation
C_MassChangeSlsSchedgAgrmt view from CONSUMPTION Mass Change of Sales Scheduling Agreement
C_MassChgCreditMemoReq view from CONSUMPTION Mass Change of Credit Memo Request
C_MassChgCustomerReturn view from CONSUMPTION Mass Change of Customer Returns
C_MassChgDebitMemoReq view from CONSUMPTION Mass Change of Debit Memo Request
C_MassChgSlsOrdWthoutChrg view from CONSUMPTION Mass Change of Sales Order Without Charge
C_Openbillingrequest view inner CONSUMPTION Open Billing Request
C_RetsReferenceDocumentUnion view_entity from CONSUMPTION Returns Reference Document
C_RetsReferenceDocumentUnion view_entity union_all CONSUMPTION Returns Reference Document
C_ReturnRefDocItem_F1708 view inner CONSUMPTION Return Reference Document Item
C_SalesChangeDocItemDEX view inner CONSUMPTION Data Extraction for Change Document Item
C_SalesDocumentByObjectStatus view from CONSUMPTION Sales Documents by Object Status
C_SalesDocumentSchedLineDEX view inner CONSUMPTION Data Extraction for Sales Document Schedule Lines
C_SalesDocumentSchedLineDEX_1 view inner CONSUMPTION Data Extraction for Sales Document Schedule Lines
C_Salesorderomparamdet view from CONSUMPTION Output Parameter Determination for Sales
C_SlsDocFlfllmntAnalyzer view from CONSUMPTION Track Sales Orders
C_SlsDocFlfmtIssue view from CONSUMPTION Sales Order Fulfillment Issues
C_SlsDocFlfmtSlsDoc view from CONSUMPTION Sales Doc Fulfillment: Sales Document
CIC_SalesDocument view_entity from Projection on Sales Document (Industry Cloud Solutions)
FAC_AUDIT_Z3_SALESHDRITM view inner Sales Document Header & Items
FAC_AUDIT_Z3_SALESHDRITM view union_all Sales Document Header & Items
FINOC_RT_SOI_OBJ_STATUS view inner Orgl Chg: SDocItms with object status
I_ARProcessFlowDocumentVH view from COMPOSITE Document Number
I_ARProcessFlowDocumentVH view union_all COMPOSITE Document Number
I_BillOfMaterialHeader view left_outer COMPOSITE BOM Header details
I_CentralFinanceSalesDocument view union_all COMPOSITE Central Finance Sales Document: Header
I_CreditMemoRequest view from BASIC Credit Memo Request
I_CustomerReturn view from BASIC Returns Order
I_DebitMemoRequest view from BASIC Debit Memo Request
I_MM_SalesOrderValueHelp view from COMPOSITE Sales Order Value Help
I_MPSDDetails view from COMPOSITE Sales Document Details
I_MRPSalesDemand view inner COMPOSITE MRP Sales Demand
I_Order2CashSalesOrder view from BASIC Sales order
I_PrepayBarterProposedLinksSD view from COMPOSITE PPMT SD Proposed Linkages Barter
I_PrepayBarterProposedLinksSo view from COMPOSITE PPMT SO Proposed Linkages Barter
I_SalesContract view from BASIC Sales Contract
I_SalesDocumentBillingPlan view_entity inner COMPOSITE Billing Plan of Sales Document
I_SalesDocumentBillingPlanItem view_entity inner COMPOSITE Billing Plan Item of Sales Document
I_SalesDocumentStdVH view from COMPOSITE Sales Document
I_SalesInquiry view from BASIC Sales Inquiry
I_SalesItemProposal view from BASIC Sales Item Proposal
I_SalesOrder view from BASIC Sales Order
I_SalesOrderBOMHeader view inner BASIC Sales Order Bill Of Material Header
I_SalesOrderCube view from COMPOSITE Sales Order - Cube
I_SalesOrderWithoutCharge view from BASIC Sales Order Without Charge
I_SalesQuotation view from BASIC Sales Quotation
I_SalesSchedgAgrmt view from BASIC Sales Scheduling Agreement
I_SlsOrdFlfmtSalesOrder view from COMPOSITE SOFM Sales Order
P_AllwdOrdTypPerSlsOrg view from CONSUMPTION
P_ARProcessFlowQuotation view from CONSUMPTION AR Process Flow - Quotation
P_ARProcessFlowSalesDoc view from CONSUMPTION Sales Document details for AR process flow
P_DuplicateSalesDocumentGrpg view from CONSUMPTION Grouping Criteria for Duplicate Sales Documents
P_EvtBsdRevnRecSalesOrderIss view inner CONSUMPTION Event based rev. rec. sales order issue
P_LogcDocSales view_entity from CONSUMPTION
P_MassChgSlsDocHdrReadRequest view_entity from CONSUMPTION Mass Chg of Sales Doc Header Read Req
P_PrdtdDelivProcgDlyApplyData view inner CONSUMPTION
P_PrdtdDelivProcgDlyTrngData view inner COMPOSITE
P_PrepaymentRefDocTotalAmount view inner COMPOSITE Prepayment Document Total Amount
P_ProductProposalSlsOrderItem view inner COMPOSITE
P_RFM_SlsOrdIssueCancelDate view from COMPOSITE
P_RFM_SlsOrdIssueHdrSitn view union_all COMPOSITE
P_SalesContractSituation view from COMPOSITE
P_SalesDocEmployeeResponsible view from CONSUMPTION
P_SalesDocumentByObjectStatus view from CONSUMPTION Sales Documents and Items by Object Status
P_SalesOrderFlfmtContact2 view from COMPOSITE
P_SalesOrderInSupplyPurgIssue1 view inner COMPOSITE
P_SalesOrderInSupplyPurgIssue4 view inner COMPOSITE
P_SalesQuotationSituation view from COMPOSITE
P_SlsDocItemPrdtvApplyData view inner CONSUMPTION
P_SlsDocItemPrdtvTrngData view inner COMPOSITE
P_SlsOrdFlfmtProcessFlow1 view from COMPOSITE
P_SlsOrdFlfmtProcessFlow11 view from COMPOSITE
P_SlsOrdProcFlow11 view from CONSUMPTION
P_SOFAProcFlow00 view from COMPOSITE
P_WhereUsdPrftCtrSlsOrderItem view from CONSUMPTION

Fields (171)

KeyField CDS FieldsUsed in Views
KEY PurchasingDocument DocNumber 1
KEY SalesDocument CustomerReturn,DocNumber,Document,SalesDocument,SalesOrder 21
KEY SalesDocumentType DocumentType,SalesDocumentType,SalesOrderType 30
KEY SoldToParty Counterparty,SoldToParty 30
KEY TradingContract DocNumber 1
_AdditionalCustomerGroup1 _AdditionalCustomerGroup1 1
_AdditionalCustomerGroup2 _AdditionalCustomerGroup2 1
_AdditionalCustomerGroup3 _AdditionalCustomerGroup3 1
_AdditionalCustomerGroup4 _AdditionalCustomerGroup4 1
_AdditionalCustomerGroup5 _AdditionalCustomerGroup5 1
_BillingCompanyCode _BillingCompanyCode 2
_BusinessArea _BusinessArea 1
_CentralCreditCheckStatus _CentralCreditCheckStatus 1
_CentralCreditChkTechErrSts _CentralCreditChkTechErrSts 1
_ControllingArea _ControllingArea 1
_ControllingAreaCurrency _ControllingAreaCurrency 1
_CostCenter _CostCenter 1
_CostCenterBusinessArea _CostCenterBusinessArea 1
_CreatedByUser _CreatedByUser 1
_CustomerAccountAssgmtGroup _CustomerAccountAssgmtGroup 1
_CustomerGroup _CustomerGroup 1
_CustomerPaymentTerms _CustomerPaymentTerms 1
_DeliveryBlockReason _DeliveryBlockReason 1
_DistributionChannel _DistributionChannel 2
_ExchangeRateType _ExchangeRateType 1
_ExprtInsurCreditCheckStatus _ExprtInsurCreditCheckStatus 1
_FinDocCreditCheckStatus _FinDocCreditCheckStatus 1
_HdrGeneralIncompletionStatus _HdrGeneralIncompletionStatus 1
_HeaderBillgIncompletionStatus _HeaderBillgIncompletionStatus 1
_HeaderBillingBlockReason _HeaderBillingBlockReason 1
_HeaderDelivIncompletionStatus _HeaderDelivIncompletionStatus 1
_IncotermsClassification _IncotermsClassification 1
_IncotermsVersion _IncotermsVersion 1
_Item _Item 1
_MaxDocValueCreditCheckStatus _MaxDocValueCreditCheckStatus 1
_OrganizationDivision _OrganizationDivision 2
_OverallBillingBlockStatus _OverallBillingBlockStatus 1
_OverallDelivConfStatus _OverallDelivConfStatus 1
_OverallDeliveryBlockStatus _OverallDeliveryBlockStatus 1
_OverallDeliveryStatus _OverallDeliveryStatus 1
_OverallOrdReltdBillgStatus _OverallOrdReltdBillgStatus 1
_OverallPricingIncompletionSts _OverallPricingIncompletionSts 1
_OverallPurchaseConfStatus _OverallPurchaseConfStatus 1
_OverallSDDocReferenceStatus _OverallSDDocReferenceStatus 1
_OverallSDDocumentRejectionSts _OverallSDDocumentRejectionSts 1
_OverallSDProcessStatus _OverallSDProcessStatus 1
_OverallTotalDeliveryStatus _OverallTotalDeliveryStatus 1
_OverallTotalSDDocRefStatus _OverallTotalSDDocRefStatus 1
_OvrlItmBillingIncompletionSts _OvrlItmBillingIncompletionSts 1
_OvrlItmDelivIncompletionSts _OvrlItmDelivIncompletionSts 1
_OvrlItmGeneralIncompletionSts _OvrlItmGeneralIncompletionSts 1
_Partner _Partner 1
_PaymentTermCreditCheckStatus _PaymentTermCreditCheckStatus 1
_PaytAuthsnCreditCheckSts _PaytAuthsnCreditCheckSts 1
_ReferenceSDDocumentCategory _ReferenceSDDocumentCategory 1
_SalesArea _SalesArea 1
_SalesDistrict _SalesDistrict 1
_SalesDocApprovalStatus _SalesDocApprovalStatus 1
_SalesDocumentType _SalesDocumentType 2
_SalesGroup _SalesGroup 1
_SalesOffice _SalesOffice 1
_SalesOrganization _SalesOrganization 3
_SDDocumentCategory _SDDocumentCategory 3
_SDDocumentReason _SDDocumentReason 2
_ShippingCondition _ShippingCondition 1
_ShippingType _ShippingType 1
_SoldToParty _SoldToParty 7
_TotalBlockStatus _TotalBlockStatus 1
_TotalCreditCheckStatus _TotalCreditCheckStatus 1
_TransactionCurrency _TransactionCurrency 3
AccountingDocExternalReference AccountingDocExternalReference 1
AdditionalCustomerGroup1 AdditionalCustomerGroup1 7
AdditionalCustomerGroup2 AdditionalCustomerGroup2 7
AdditionalCustomerGroup3 AdditionalCustomerGroup3 7
AdditionalCustomerGroup4 AdditionalCustomerGroup4 7
AdditionalCustomerGroup5 AdditionalCustomerGroup5 7
AgrmtValdtyEndDate ValidityEndDate 1
AgrmtValdtyStartDate ValidityStartDate 1
AlternativePricingDate AlternativePricingDate 1
BillingCompanyCode BillingCompanyCode,CompanyCode 10
BillingDocumentDate BillingDocumentDate 5
BindingPeriodValidityEndDate BindingPeriodValidityEndDate,ValidityEndDate 3
BindingPeriodValidityStartDate BindingPeriodValidityStartDate,ValidityStartDate 3
BusinessArea BusinessArea 1
BusinessSolutionOrder BusinessSolutionOrder 3
CompanyCode CompanyCode 1
CompleteDeliveryIsDefined CompleteDeliveryIsDefined 7
ControllingArea ControllingArea 5
ControllingAreaCurrency ControllingAreaCurrency 1
ControllingObject ControllingObject 1
CostCenter CostCenter 5
CreatedByUser CreatedByUser 10
CreationDate CreationDate 15
CreationTime CreationTime 6
CreditBlockReleaseDate CreditBlockReleaseDate 1
CreditControlArea CreditControlArea 5
CustomerAccountAssignmentGroup CustomerAccountAssignmentGroup 3
CustomerCreditAccount CustomerCreditAccount 1
CustomerGroup CustomerGroup 5
CustomerPaymentTerms CustomerPaymentTerms 4
CustomerPurchaseOrderDate CustomerPurchaseOrderDate 5
CustomerPurchaseOrderSuplmnt CustomerPurchaseOrderSuplmnt 4
CustomerPurchaseOrderType CustomerPurchaseOrderType 4
DeliveryBlockReason DeliveryBlockReason 7
DistributionChannel DistributionChannel 29
DocumentCurrency PrepaymentTotalAmtCrcy 1
ExchangeRateDate ExchangeRateDate 2
ExchangeRateType ExchangeRateType 3
ExprtInsurCreditCheckStatus ExprtInsurCreditCheckStatus 2
ExternalDocLastChangeDateTime ExternalDocLastChangeDateTime 1
ExternalDocumentID ExternalDocumentID 1
FinDocCreditCheckStatus FinDocCreditCheckStatus 2
FiscalPeriod FiscalPeriod 2
FiscalYear FiscalYear 2
FixedValueDate FixedValueDate 1
HdrGeneralIncompletionStatus HdrGeneralIncompletionStatus 1
HeaderBillgIncompletionStatus HeaderBillgIncompletionStatus 1
HeaderBillingBlockReason HeaderBillingBlockReason 5
HeaderDelivIncompletionStatus HeaderDelivIncompletionStatus 1
IncotermsClassification IncotermsClassification 5
IncotermsLocation1 IncotermsLocation1 3
IncotermsLocation2 IncotermsLocation2 3
IncotermsTransferLocation IncotermsTransferLocation 4
IncotermsVersion IncotermsVersion 5
LastChangeDate LastChangeDate 7
LastChangeDateTime LastChangeDateTime 5
LastChangedByUser LastChangedByUser 4
MaxDocValueCreditCheckStatus MaxDocValueCreditCheckStatus 1
NextCreditCheckDate NextCreditCheckDate 1
OrderID OrderID 2
OrganizationDivision OrganizationDivision 20
OverallDeliveryStatus OverallDeliveryStatus 1
OverallOrdReltdBillgStatus OverallOrdReltdBillgStatus 2
OverallPricingIncompletionSts OverallPricingIncompletionSts 1
OverallSDDocumentRejectionSts OverallSDDocumentRejectionSts 2
OverallSDProcessStatus OverallSDProcessStatus 7
OverallTotalDeliveryStatus OverallTotalDeliveryStatus 3
OvrlItmBillingIncompletionSts OvrlItmBillingIncompletionSts 1
OvrlItmDelivIncompletionSts OvrlItmDelivIncompletionSts 1
OvrlItmGeneralIncompletionSts OvrlItmGeneralIncompletionSts 1
PaymentMethod PaymentMethod 4
PaymentPlan PaymentPlan 2
PaytAuthsnCreditCheckSts PaytAuthsnCreditCheckSts 3
PriceDetnExchangeRate ExchangeRate,PriceDetnExchangeRate 3
PricingDate PricingDate 6
PurchaseOrderByCustomer PurchaseOrderByCustomer 11
PurchasingDocumentType DocumentType 1
ReferenceSDDocument ReferenceSDDocument,SalesDocument 2
ReferenceSDDocumentCategory ReferenceSDDocumentCategory 1
ReleasedCreditAmount ReleasedCreditAmount 1
RequestedDeliveryDate RequestedDeliveryDate 15
SalesDistrict SalesDistrict 5
SalesDocApprovalReason SalesDocApprovalReason 1
SalesDocApprovalStatus SalesDocApprovalStatus 3
SalesDocumentDate DocumentDate,SalesDocumentDate,SalesOrderDate 13
SalesDocumentProcessingType SalesDocumentProcessingType 8
SalesGroup SalesGroup 18
SalesOffice SalesOffice 18
SalesOrganization SalesOrganization 28
SDDocumentCategory SalesOrderCategory,SDDocumentCategory 19
SDDocumentCollectiveNumber SDDocumentCollectiveNumber 3
SDDocumentReason SDDocumentReason 9
ServicesRenderedDate ServicesRenderedDate 3
ShippingCondition ShippingCondition 7
ShippingType ShippingType 3
StatisticsCurrency StatisticsCurrency 3
TotalBlockStatus TotalBlockStatus 1
TotalCreditCheckStatus TotalCreditCheckStatus 1
TotalNetAmount TotalNetAmount 14
TradingContractType DocumentType 1
TransactionCurrency PrepaymentTotalAmtCrcy,TransactionCurrency 15
@ClientHandling.algorithm: #SESSION_VARIABLE
@EndUserText.label: 'Sales Document'
@VDM: {
  viewType: #BASIC,
  lifecycle.contract.type: #PUBLIC_LOCAL_API
}
@AccessControl: {
  authorizationCheck: #CHECK,
  personalData.blocking: #('TRANSACTIONAL_DATA'),
  privilegedAssociations: [ '_CreatedByUser', '_LastChangedByUser', '_BusinessAreaText', '_CostCenterBusinessAreaText', '_CreditControlAreaText']
}
@AbapCatalog: {
  sqlViewName: 'ISDSALESDOC',
  compiler.compareFilter: true
}
@ObjectModel: {
   compositionRoot: true,
   representativeKey: 'SalesDocument',
   sapObjectNodeType.name: 'SalesDocument',
   usageType: {
     dataClass:      #TRANSACTIONAL,
     serviceQuality: #B,
     sizeCategory:   #L
   },
   supportedCapabilities: [ #ANALYTICAL_DIMENSION, #CDS_MODELING_ASSOCIATION_TARGET, #SQL_DATA_SOURCE, #CDS_MODELING_DATA_SOURCE ],
   modelingPattern: [ #ANALYTICAL_DIMENSION ]
}
@Analytics.dataCategory: #DIMENSION
@Metadata.allowExtensions:true
@Metadata.ignorePropagatedAnnotations:true

define view I_SalesDocument
  as select from           I_SalesDocumentBasic as SalesDocumentBasic
    left outer to one join vbkd on  SalesDocumentBasic.SalesDocument = vbkd.vbeln
                                and vbkd.posnr                       = '000000'
    left outer to one join veda on  SalesDocumentBasic.SalesDocument = veda.vbeln
                                and veda.vposn                       = '000000'
  //Association

  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

  association [0..*] to I_SalesDocumentItem            as _Item                          on  $projection.SalesDocument = _Item.SalesDocument
  association [1..*] to I_SalesDocumentPartner         as _Partner                       on  $projection.SalesDocument = _Partner.SalesDocument
  association [1..1] to I_SalesDocumentStandardPartner as _StandardPartner               on  $projection.SalesDocument = _StandardPartner.SalesDocument
  association [0..*] to I_SalesDocumentPricingElement  as _PricingElement                on  $projection.SalesDocument = _PricingElement.SalesDocument
  association [0..1] to I_SalesDocumentBillingPlan     as _BillingPlan                   on  $projection.SalesDocument = _BillingPlan.SalesDocument
                                                                                         and $projection.BillingPlan   = _BillingPlan.BillingPlan
  association [0..*] to I_SalesDocumentPrecdgProcFlow  as _PrecedingProcFlowDoc          on  _PrecedingProcFlowDoc.SalesDocument = $projection.SalesDocument

  association [0..*] to I_SalesDocumentSubsqntProcFlow as _SubsequentProcFlowDoc         on  _SubsequentProcFlowDoc.SalesDocument = $projection.SalesDocument

  association [0..1] to I_CustomerGroup                as _CustomerGroup                 on  $projection.CustomerGroup = _CustomerGroup.CustomerGroup
  association [0..1] to I_SalesDistrict                as _SalesDistrict                 on  $projection.SalesDistrict = _SalesDistrict.SalesDistrict
  association [0..1] to I_SalesContrValdtyPerdUnit     as _SalesContractValidityPerdUnit on  $projection.SalesContractValidityPerdUnit = _SalesContractValidityPerdUnit.SalesContractValidityPerdUnit
  association [0..1] to I_SlsContractValidityPerdCat   as _SalesContractValidityPerdCat  on  $projection.SalesContractValidityPerdCat = _SalesContractValidityPerdCat.SalesContractValidityPerdCat
  association [0..1] to I_SalesContractCanclnParty     as _SalesContractCanclnParty      on  $projection.SalesContractCanclnParty = _SalesContractCanclnParty.SalesContractCanclnParty
  association [0..1] to I_SalesContractCanclnReason    as _SalesContractCanclnReason     on  $projection.SalesContractCanclnReason = _SalesContractCanclnReason.SalesContractCanclnReason
  association [0..1] to I_SalesContractFollowUpAction  as _SalesContractFollowUpAction   on  $projection.SalesContractFollowUpAction = _SalesContractFollowUpAction.SalesContractFollowUpAction
  association [0..1] to I_ShippingType                 as _ShippingType                  on  $projection.ShippingType = _ShippingType.ShippingType
  association [0..1] to I_IncotermsClassification      as _IncotermsClassification       on  $projection.IncotermsClassification = _IncotermsClassification.IncotermsClassification
  association [0..1] to I_IncotermsVersion             as _IncotermsVersion              on  $projection.IncotermsVersion = _IncotermsVersion.IncotermsVersion
  association [0..1] to I_CustomerPaymentTerms         as _CustomerPaymentTerms          on  $projection.CustomerPaymentTerms = _CustomerPaymentTerms.CustomerPaymentTerms
  association [0..1] to I_CustomerAccountAssgmtGroup   as _CustomerAccountAssgmtGroup    on  $projection.CustomerAccountAssignmentGroup = _CustomerAccountAssgmtGroup.CustomerAccountAssignmentGroup
  association [0..1] to I_CustomerPriceGroup           as _CustomerPriceGroup            on  $projection.CustomerPriceGroup = _CustomerPriceGroup.CustomerPriceGroup
  association [0..1] to I_PriceListType                as _PriceListType                 on  $projection.PriceListType = _PriceListType.PriceListType
  association [0..1] to I_CustomerConditionGroupVH     as _ConditionGroup1               on  $projection.CustomerConditionGroup1 = _ConditionGroup1.CustomerConditionGroup
  association [0..1] to I_CustomerConditionGroupVH     as _ConditionGroup2               on  $projection.CustomerConditionGroup2 = _ConditionGroup2.CustomerConditionGroup
  association [0..1] to I_CustomerConditionGroupVH     as _ConditionGroup3               on  $projection.CustomerConditionGroup3 = _ConditionGroup3.CustomerConditionGroup
  association [0..1] to I_CustomerConditionGroupVH     as _ConditionGroup4               on  $projection.CustomerConditionGroup4 = _ConditionGroup4.CustomerConditionGroup
  association [0..1] to I_CustomerConditionGroupVH     as _ConditionGroup5               on  $projection.CustomerConditionGroup5 = _ConditionGroup5.CustomerConditionGroup

  //Extensibility

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

{
      //Key

  key SalesDocument,

      //Category

      @ObjectModel.foreignKey.association: '_SDDocumentCategory'
      SDDocumentCategory,
      @ObjectModel.foreignKey.association: '_SalesDocumentType'
      SalesDocumentType,
      SalesDocumentProcessingType,

      //Admin

      CreatedByUser,
      LastChangedByUser,
      @Semantics.systemDate.createdAt: true
      CreationDate,
      CreationTime,
      @Semantics.systemDate.lastChangedAt: true
      LastChangeDate,
      @Semantics.systemDateTime.lastChangedAt: true
      LastChangeDateTime,
      LastCustomerContactDate,
      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

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_SoldToParty'
      SoldToParty,
      @ObjectModel.foreignKey.association: '_CustomerGroup'
      vbkd.kdgrp                                                  as 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,
      vbkd.podkz                                                  as SlsDocIsRlvtForProofOfDeliv,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_CreditControlAreaStdVH',
                     element: 'CreditControlArea' }
        }]
      @ObjectModel.text.association: '_CreditControlAreaText'
      @ObjectModel.foreignKey.association: '_CreditControlArea'
      CreditControlArea,
      CustomerRebateAgreement,
      SalesDocumentDate,
      vbkd.fbuda                                                  as ServicesRenderedDate,
      @ObjectModel.foreignKey.association: '_SDDocumentReason'
      SDDocumentReason,
      vbkd.bstkd                                                  as PurchaseOrderByCustomer,
      vbkd.bstkd_e                                                as PurchaseOrderByShipToParty,
      SDDocumentCollectiveNumber,
      @ObjectModel.foreignKey.association: '_CustomerPurchaseOrderType'
      CustomerPurchaseOrderType,
      CustomerPurchaseOrderDate,
      CustomerPurchaseOrderSuplmnt,
      @ObjectModel.foreignKey.association: '_SalesDistrict'
      vbkd.bzirk                                                  as SalesDistrict,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_StatisticsCurrency'
      StatisticsCurrency,
      vbkd.wminr                                                  as ProductCatalog,
      //--[ GENERATED:012:GlBfhyFV7kY4hGXbseDAyW

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

      @ObjectModel.foreignKey.association: '_RetsMgmtProcess'
      RetsMgmtProcess,
      NextCreditCheckDate,

      //Quotation

      BindingPeriodValidityStartDate,
      BindingPeriodValidityEndDate,
      HdrOrderProbabilityInPercent,

      //Contract

      veda.vuntdat                                                as SalesContractSignedDate,
      veda.vbedkue                                                as ContractPartnerCanclnDocDate,
      veda.vlaufz                                                 as NmbrOfSalesContractValdtyPerd,
      @ObjectModel.foreignKey.association: '_SalesContractValidityPerdUnit'
      veda.vlauez                                                 as SalesContractValidityPerdUnit,
      @ObjectModel.foreignKey.association: '_SalesContractValidityPerdCat'
      veda.vlaufk                                                 as SalesContractValidityPerdCat,
      veda.veindat                                                as SlsContractCanclnReqRcptDate,
      veda.vwundat                                                as RequestedCancellationDate,
      @ObjectModel.foreignKey.association: '_SalesContractCanclnParty'
      veda.vkuepar                                                as SalesContractCanclnParty,
      @ObjectModel.foreignKey.association: '_SalesContractCanclnReason'
      veda.vkuegru                                                as SalesContractCanclnReason,
      veda.vkuesch                                                as SalesContractCanclnProcedure,
      veda.vinsdat                                                as EquipmentInstallationDate,
      veda.vabndat                                                as EquipmentDeliveryAccptcDate,
      veda.vdemdat                                                as EquipmentDismantlingDate,
      @ObjectModel.foreignKey.association: '_SalesContractFollowUpAction'
      veda.vaktsch                                                as SalesContractFollowUpAction,
      veda.vasda                                                  as SlsContractFollowUpActionDate,
      veda.vbelkue                                                as CanclnDocByContrPartner,
      @Analytics.internalName: #LOCAL
      MasterSalesContract,

      //SchedulingAgreement

      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'DelivSchedTypeMRPRlvnceCode'
      SchedulingAgreementProfileCode,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_DelivSchedTypeMRPRlvnceCode'
      DelivSchedTypeMRPRlvnceCode,
      AgrmtValdtyStartDate,
      AgrmtValdtyEndDate,

      //Material Usage Indicator

      MatlUsageIndicator,

      //Pricing

      @Semantics.amount.currencyCode: 'TransactionCurrency'
      TotalNetAmount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_TransactionCurrency'
      TransactionCurrency,
      vbkd.prsdt                                                  as PricingDate,
      vbkd.waktion                                                as RetailPromotion,
      cast(vbkd.kursk as kursk_not_converted preserving type)     as PriceDetnExchangeRate,
      SalesDocumentCondition,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SDPricingProcedure'
      SDPricingProcedure,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_CustomerPriceGroup'
      vbkd.konda                                                  as CustomerPriceGroup,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_PriceListType'
      vbkd.pltyp                                                  as PriceListType,

      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,
      @ObjectModel.foreignKey.association: '_ShippingType'
      vbkd.vsart                                                  as ShippingType,
      vbkd.empst                                                  as ReceivingPoint,
      @ObjectModel.foreignKey.association: '_ShippingCondition'
      ShippingCondition,
      @ObjectModel.foreignKey.association: '_IncotermsClassification'
      vbkd.inco1                                                  as IncotermsClassification,
      vbkd.inco2                                                  as IncotermsTransferLocation,
      vbkd.inco2_l                                                as IncotermsLocation1,
      vbkd.inco3_l                                                as IncotermsLocation2,
      @ObjectModel.foreignKey.association: '_IncotermsVersion'
      vbkd.incov                                                  as IncotermsVersion,
      CompleteDeliveryIsDefined,
      vbkd.kzazu                                                  as OrderCombinationIsAllowed,
      @ObjectModel.foreignKey.association: '_DeliveryBlockReason'
      DeliveryBlockReason,

      //Fashion

      FashionCancelDate,

      //Billing

      //cast( vbkd.fplnr as tds_bplan_id preserving type )      as BillingPlan,

      vbkd.fplnr                                                  as BillingPlan,
      vbkd.fkdat                                                  as BillingDocumentDate,

      //--[ GENERATED:012:GlBfhyFV7kY4hGXbseDAyW

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

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

      //Approval Management

      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SalesDocApprovalReason'
      SalesDocApprovalReason,

      //Payment

      @ObjectModel.foreignKey.association: '_CustomerPaymentTerms'
      vbkd.zterm                                                  as CustomerPaymentTerms,
      vbkd.zlsch                                                  as PaymentMethod,
      vbkd.valdt                                                  as FixedValueDate,
      vbkd.valtg                                                  as AdditionalValueDays,

      //Accounting

      vbkd.vkont                                                  as ContractAccount,
      vbkd.gjahr                                                  as FiscalYear,
      vbkd.poper                                                  as FiscalPeriod,
      vbkd.kursk_dat                                              as ExchangeRateDate,
      @ObjectModel.foreignKey.association: '_ExchangeRateType'
      ExchangeRateType,
      vbkd.kurrf                                                  as AccountingExchangeRate,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.text.association: '_BusinessAreaText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_BusinessArea'
      BusinessArea,
      @ObjectModel.foreignKey.association: '_CustomerAccountAssgmtGroup'
      vbkd.ktgrd                                                  as CustomerAccountAssignmentGroup,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessAreaStdVH',
                     element: 'BusinessArea' }
        }]
      @ObjectModel.text.association: '_CostCenterBusinessAreaText'
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_CostCenterBusinessArea'
      CostCenterBusinessArea,
      CostCenter,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_ControllingAreaStdVH',
                     element: 'ControllingArea' }
        }]
      // ]--GENERATED

      @ObjectModel.foreignKey.association: '_ControllingArea'
      ControllingArea,
      OrderID,
      //--[ GENERATED:012:GlBfhyFV7kY4hGXbseDAyW

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

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

      //Credit Block

      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_Customer_VH',
                     element: 'Customer' }
        }]
      @ObjectModel.foreignKey.association: '_CustomerCreditAccount'
      CustomerCreditAccount,
      @Semantics.currencyCode: true
      @ObjectModel.foreignKey.association: '_ControllingAreaCurrency'
      ControllingAreaCurrency,
      @Semantics.amount.currencyCode: 'ControllingAreaCurrency'
      ReleasedCreditAmount,
      CreditBlockReleaseDate,
      NextShippingDate,

      //Reference

      ReferenceSDDocument,
      @Analytics.internalName: #LOCAL
      AccountingDocExternalReference,

      @ObjectModel.foreignKey.association: '_ReferenceSDDocumentCategory'
      ReferenceSDDocumentCategory,
      SalesItemProposalDescription,
      CorrespncExternalReference,
      SlsDocSo2PLastContactPersnName,
      SlsDocSo2PLstCntctPersnTelNmbr,
      cast(vbkd.ihrez_e as sls_purg_doc_ext_ref preserving type ) as POCorrespncExternalReference,
      @Consumption.valueHelpDefinition: [
        { entity:  { name:    'I_BusinessSolutionOrderStdVH',
                     element: 'BusinessSolutionOrder' }
        }]
      @ObjectModel.foreignKey.association: '_SolutionOrder'
      @Analytics.internalName: #LOCAL
      BusinessSolutionOrder,

      @ObjectModel.foreignKey.association: '_ConditionGroup1'
      vbkd.kdkg1                                                  as CustomerConditionGroup1,
      @ObjectModel.foreignKey.association: '_ConditionGroup2'
      vbkd.kdkg2                                                  as CustomerConditionGroup2,
      @ObjectModel.foreignKey.association: '_ConditionGroup3'
      vbkd.kdkg3                                                  as CustomerConditionGroup3,
      @ObjectModel.foreignKey.association: '_ConditionGroup4'
      vbkd.kdkg4                                                  as CustomerConditionGroup4,
      @ObjectModel.foreignKey.association: '_ConditionGroup5'
      vbkd.kdkg5                                                  as CustomerConditionGroup5,

      //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,
      ContractManualCompletion,
      @ObjectModel.foreignKey.association: '_OverallChmlCmplncStatus'
      OverallChmlCmplncStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OverallDangerousGoodsStatus'
      OverallDangerousGoodsStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlSftyDataSheetSts'
      OverallSafetyDataSheetStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_SalesDocApprovalStatus'
      SalesDocApprovalStatus,
      ContractDownPaymentStatus,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlTradeCmplncEmbargoStatus'
      OverallTrdCmplncEmbargoSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvTrdCmplncSnctndListChkSts'
      OvrlTrdCmplncSnctndListChkSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_OvrlTrdCmplncLegalCtrlChkSts'
      OvrlTrdCmplncLegalCtrlChkSts,
      @Analytics.internalName: #LOCAL
      @ObjectModel.foreignKey.association: '_DeliveryDateTypeRule'
      DeliveryDateTypeRule,

      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,
      @ObjectModel.association.type: [#TO_COMPOSITION_CHILD]
      _BillingPlan,
      _SDDocumentCategory,
      _SalesDocumentType,
      _CreatedByUser,
      _LastChangedByUser,
      _SalesOrganization,
      _DistributionChannel,
      _OrganizationDivision,
      _SalesGroup,
      _SalesOffice,
      _SoldToParty,
      _CustomerGroup,
      _AdditionalCustomerGroup1,
      _AdditionalCustomerGroup2,
      _AdditionalCustomerGroup3,
      _AdditionalCustomerGroup4,
      _AdditionalCustomerGroup5,
      _CreditControlArea,
      _SDDocumentReason,
      _CustomerPurchaseOrderType,
      _SalesDistrict,
      _StatisticsCurrency,
      _RetsMgmtProcess,
      _SalesContractValidityPerdUnit,
      _SalesContractValidityPerdCat,
      _SalesContractCanclnParty,
      _SalesContractCanclnReason,
      _SalesContractFollowUpAction,
      _DelivSchedTypeMRPRlvnceCode,
      _TransactionCurrency,
      _ShippingType,
      _ShippingCondition,
      _IncotermsClassification,
      _IncotermsVersion,
      _DeliveryBlockReason,
      _BillingCompanyCode,
      _HeaderBillingBlockReason,
      _SalesDocApprovalReason,
      _CustomerPaymentTerms,
      _ExchangeRateType,
      _BusinessArea,
      _CustomerAccountAssgmtGroup,
      _CostCenterBusinessArea,
      _CostCenter,
      _SDPricingProcedure,
      _CustomerPriceGroup,
      _PriceListType,
      _ControllingArea,
      _ControllingObject,
      _ReferenceSDDocumentCategory,
      _EngagementProjectItem,
      _SalesArea,
      _ConditionGroup1,
      _ConditionGroup2,
      _ConditionGroup3,
      _ConditionGroup4,
      _ConditionGroup5,

      _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,
      _DownPaymentStatus,
      _OvrlTradeCmplncEmbargoStatus,
      _OvTrdCmplncSnctndListChkSts,
      _OvrlTrdCmplncLegalCtrlChkSts,
      _OmniChnlSalesPromotionStatus,
      @Consumption.hidden: true
      _BusinessAreaText,
      @Consumption.hidden: true
      _CostCenterBusinessAreaText,
      @Consumption.hidden: true
      _CreditControlAreaText,
      _CustomerCreditAccount,
      _ControllingAreaCurrency,
      _DeliveryDateTypeRule,
      _SolutionOrder,
      _TaxDepartureCountry,
      _VATRegistrationCountry,
      _PrecedingProcFlowDoc,
      _SubsequentProcFlowDoc
};