I_SalesDocumentBasic

DDL: I_SALESDOCUMENTBASIC Type: view BASIC

Sales Document Basic

I_SalesDocumentBasic is a Basic CDS View (Dimension) that provides data about "Sales Document Basic" in SAP S/4HANA. It reads from 1 data source (vbak) and exposes 72 fields with key field SalesDocument. It has 83 associations to related views.

Data Sources (1)

SourceAliasJoin Type
vbak vbak from

Associations (83)

CardinalityTargetAliasCondition
[0..*] I_BusinessAreaText _BusinessAreaText $projection.BusinessArea = _BusinessAreaText.BusinessArea
[0..*] I_BusinessAreaText _CostCenterBusinessAreaText $projection.CostCenterBusinessArea = _CostCenterBusinessAreaText.BusinessArea
[0..*] I_CreditControlAreaText _CreditControlAreaText $projection.CreditControlArea = _CreditControlAreaText.CreditControlArea
[0..*] I_SalesDocumentItemBasic _ItemBasic $projection.SalesDocument = _ItemBasic.SalesDocument
[0..1] I_SDDocumentCategory _SDDocumentCategory $projection.SDDocumentCategory = _SDDocumentCategory.SDDocumentCategory
[0..1] I_SalesDocumentType _SalesDocumentType $projection.SalesDocumentType = _SalesDocumentType.SalesDocumentType
[0..1] I_User _CreatedByUser $projection.CreatedByUser = _CreatedByUser.UserID
[0..1] I_User _LastChangedByUser $projection.LastChangedByUser = _LastChangedByUser.UserID
[0..1] I_SalesOrganization _SalesOrganization $projection.SalesOrganization = _SalesOrganization.SalesOrganization
[0..1] I_DistributionChannel _DistributionChannel $projection.DistributionChannel = _DistributionChannel.DistributionChannel
[0..1] I_Division _OrganizationDivision $projection.OrganizationDivision = _OrganizationDivision.Division
[0..1] I_SalesGroup _SalesGroup $projection.SalesGroup = _SalesGroup.SalesGroup
[0..1] I_SalesOffice _SalesOffice $projection.SalesOffice = _SalesOffice.SalesOffice
[0..1] I_Customer _SoldToParty $projection.SoldToParty = _SoldToParty.Customer
[0..1] I_AdditionalCustomerGroup1 _AdditionalCustomerGroup1 $projection.AdditionalCustomerGroup1 = _AdditionalCustomerGroup1.AdditionalCustomerGroup1
[0..1] I_AdditionalCustomerGroup2 _AdditionalCustomerGroup2 $projection.AdditionalCustomerGroup2 = _AdditionalCustomerGroup2.AdditionalCustomerGroup2
[0..1] I_AdditionalCustomerGroup3 _AdditionalCustomerGroup3 $projection.AdditionalCustomerGroup3 = _AdditionalCustomerGroup3.AdditionalCustomerGroup3
[0..1] I_AdditionalCustomerGroup4 _AdditionalCustomerGroup4 $projection.AdditionalCustomerGroup4 = _AdditionalCustomerGroup4.AdditionalCustomerGroup4
[0..1] I_AdditionalCustomerGroup5 _AdditionalCustomerGroup5 $projection.AdditionalCustomerGroup5 = _AdditionalCustomerGroup5.AdditionalCustomerGroup5
[0..1] I_CreditControlArea _CreditControlArea $projection.CreditControlArea = _CreditControlArea.CreditControlArea
[0..1] I_SDDocumentReason _SDDocumentReason $projection.SDDocumentReason = _SDDocumentReason.SDDocumentReason
[0..1] I_CustomerPurchaseOrderType _CustomerPurchaseOrderType $projection.CustomerPurchaseOrderType = _CustomerPurchaseOrderType.CustomerPurchaseOrderType
[0..1] I_Currency _StatisticsCurrency $projection.StatisticsCurrency = _StatisticsCurrency.Currency
[0..1] I_RetsMgmtProcess _RetsMgmtProcess $projection.RetsMgmtProcess = _RetsMgmtProcess.RetsMgmtProcess
[0..1] I_DelivSchedTypeMRPRlvnceCode _DelivSchedTypeMRPRlvnceCode $projection.DelivSchedTypeMRPRlvnceCode = _DelivSchedTypeMRPRlvnceCode.DelivSchedTypeMRPRlvnceCode
[0..1] I_Currency _TransactionCurrency $projection.TransactionCurrency = _TransactionCurrency.Currency
[0..1] I_ShippingCondition _ShippingCondition $projection.ShippingCondition = _ShippingCondition.ShippingCondition
[0..1] I_DeliveryBlockReason _DeliveryBlockReason $projection.DeliveryBlockReason = _DeliveryBlockReason.DeliveryBlockReason
[0..1] I_CompanyCode _BillingCompanyCode $projection.BillingCompanyCode = _BillingCompanyCode.CompanyCode
[0..1] I_BillingBlockReason _HeaderBillingBlockReason $projection.HeaderBillingBlockReason = _HeaderBillingBlockReason.BillingBlockReason
[0..1] I_SalesDocApprovalReason _SalesDocApprovalReason $projection.SDDocumentCategory = _SalesDocApprovalReason.SDDocumentCategory and $projection.SalesDocApprovalReason = _SalesDocApprovalReason.SalesDocApprovalReason
[0..1] I_ExchangeRateType _ExchangeRateType $projection.ExchangeRateType = _ExchangeRateType.ExchangeRateType
[0..1] I_BusinessArea _BusinessArea $projection.BusinessArea = _BusinessArea.BusinessArea
[0..1] I_BusinessArea _CostCenterBusinessArea $projection.CostCenterBusinessArea = _CostCenterBusinessArea.BusinessArea
[0..1] I_CostCenter _CostCenter $projection.CostCenter = _CostCenter.CostCenter and $projection.ControllingArea = _CostCenter.ControllingArea and _CostCenter.ValidityEndDate >= $projection.SalesDocumentDate and _CostCenter.ValidityStartDate <= $projection.SalesDocumentDate
[0..1] I_SlsPricingProcedure _SDPricingProcedure $projection.SDPricingProcedure = _SDPricingProcedure.PricingProcedure
[0..1] I_ControllingArea _ControllingArea $projection.ControllingArea = _ControllingArea.ControllingArea
[0..1] I_ControllingObject _ControllingObject $projection.ControllingObject = _ControllingObject.ControllingObject
[0..1] I_SDDocumentCategory _ReferenceSDDocumentCategory $projection.ReferenceSDDocumentCategory = _ReferenceSDDocumentCategory.SDDocumentCategory
[0..*] I_EngagementProjectItem _EngagementProjectItem $projection.SalesDocument = _EngagementProjectItem.EngagementProjectItem and _EngagementProjectItem.EngagementProjectItemType = '0SOH'
[0..1] I_SalesArea _SalesArea $projection.SalesOrganization = _SalesArea.SalesOrganization and $projection.DistributionChannel = _SalesArea.DistributionChannel and $projection.OrganizationDivision = _SalesArea.Division
[0..1] I_OverallSDProcessStatus _OverallSDProcessStatus $projection.OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus
[0..1] I_OverallPurchaseConfStatus _OverallPurchaseConfStatus $projection.OverallPurchaseConfStatus = _OverallPurchaseConfStatus.OverallPurchaseConfStatus
[0..1] I_OverallSDDocumentRjcnStatus _OverallSDDocumentRejectionSts $projection.OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts
[0..1] I_TotalBlockStatus _TotalBlockStatus $projection.TotalBlockStatus = _TotalBlockStatus.TotalBlockStatus
[0..1] I_OverallDelivConfStatus _OverallDelivConfStatus $projection.OverallDelivConfStatus = _OverallDelivConfStatus.OverallDelivConfStatus
[0..1] I_OverallTotalDeliveryStatus _OverallTotalDeliveryStatus $projection.OverallTotalDeliveryStatus = _OverallTotalDeliveryStatus.OverallTotalDeliveryStatus
[0..1] I_OverallDeliveryStatus _OverallDeliveryStatus $projection.OverallDeliveryStatus = _OverallDeliveryStatus.OverallDeliveryStatus
[0..1] I_OverallDeliveryBlockStatus _OverallDeliveryBlockStatus $projection.OverallDeliveryBlockStatus = _OverallDeliveryBlockStatus.OverallDeliveryBlockStatus
[0..1] I_OverallOrdReltdBillgStatus _OverallOrdReltdBillgStatus $projection.OverallOrdReltdBillgStatus = _OverallOrdReltdBillgStatus.OverallOrdReltdBillgStatus
[0..1] I_OverallBillingBlockStatus _OverallBillingBlockStatus $projection.OverallBillingBlockStatus = _OverallBillingBlockStatus.OverallBillingBlockStatus
[0..1] I_OverallTotalSDDocRefStatus _OverallTotalSDDocRefStatus $projection.OverallTotalSDDocRefStatus = _OverallTotalSDDocRefStatus.OverallTotalSDDocRefStatus
[0..1] I_OverallSDDocReferenceStatus _OverallSDDocReferenceStatus $projection.OverallSDDocReferenceStatus = _OverallSDDocReferenceStatus.OverallSDDocReferenceStatus
[0..1] I_TotalCreditCheckStatus _TotalCreditCheckStatus $projection.TotalCreditCheckStatus = _TotalCreditCheckStatus.TotalCreditCheckStatus
[0..1] I_MaxDocValueCreditCheckSts _MaxDocValueCreditCheckStatus $projection.MaxDocValueCreditCheckStatus = _MaxDocValueCreditCheckStatus.MaxDocValueCreditCheckStatus
[0..1] I_PaymentTermCreditCheckSts _PaymentTermCreditCheckStatus $projection.PaymentTermCreditCheckStatus = _PaymentTermCreditCheckStatus.PaymentTermCreditCheckStatus
[0..1] I_FinDocCreditCheckStatus _FinDocCreditCheckStatus $projection.FinDocCreditCheckStatus = _FinDocCreditCheckStatus.FinDocCreditCheckStatus
[0..1] I_ExprtInsurCreditCheckStatus _ExprtInsurCreditCheckStatus $projection.ExprtInsurCreditCheckStatus = _ExprtInsurCreditCheckStatus.ExprtInsurCreditCheckStatus
[0..1] I_PaytAuthsnCreditCheckSts _PaytAuthsnCreditCheckSts $projection.PaytAuthsnCreditCheckSts = _PaytAuthsnCreditCheckSts.PaytAuthsnCreditCheckSts
[0..1] I_CentralCreditCheckStatus _CentralCreditCheckStatus $projection.CentralCreditCheckStatus = _CentralCreditCheckStatus.CentralCreditCheckStatus
[0..1] I_CentralCreditChkTechErrSts _CentralCreditChkTechErrSts $projection.CentralCreditChkTechErrSts = _CentralCreditChkTechErrSts.CentralCreditChkTechErrSts
[0..1] I_HdrGenIncompletionStatus _HdrGeneralIncompletionStatus $projection.HdrGeneralIncompletionStatus = _HdrGeneralIncompletionStatus.HdrGeneralIncompletionStatus
[0..1] I_OverallPrcIncompletionSts _OverallPricingIncompletionSts $projection.OverallPricingIncompletionSts = _OverallPricingIncompletionSts.OverallPricingIncompletionSts
[0..1] I_HdrDelivIncompletionStatus _HeaderDelivIncompletionStatus $projection.HeaderDelivIncompletionStatus = _HeaderDelivIncompletionStatus.HeaderDelivIncompletionStatus
[0..1] I_HdrBillgIncompletionStatus _HeaderBillgIncompletionStatus $projection.HeaderBillgIncompletionStatus = _HeaderBillgIncompletionStatus.HeaderBillgIncompletionStatus
[0..1] I_OvrlItmGenIncompletionSts _OvrlItmGeneralIncompletionSts $projection.OvrlItmGeneralIncompletionSts = _OvrlItmGeneralIncompletionSts.OvrlItmGeneralIncompletionSts
[0..1] I_OvrlItmBillgIncompltnSts _OvrlItmBillingIncompletionSts $projection.OvrlItmBillingIncompletionSts = _OvrlItmBillingIncompletionSts.OvrlItmBillingIncompletionSts
[0..1] I_OvrlItmDelivIncompletionSts _OvrlItmDelivIncompletionSts $projection.OvrlItmDelivIncompletionSts = _OvrlItmDelivIncompletionSts.OvrlItmDelivIncompletionSts
[0..1] I_OverallChmlCmplncStatus _OverallChmlCmplncStatus $projection.OverallChmlCmplncStatus = _OverallChmlCmplncStatus.OverallChmlCmplncStatus
[0..1] I_OverallDangerousGoodsStatus _OverallDangerousGoodsStatus $projection.OverallDangerousGoodsStatus = _OverallDangerousGoodsStatus.OverallDangerousGoodsStatus
[0..1] I_OvrlSftyDataSheetSts _OvrlSftyDataSheetSts $projection.OverallSafetyDataSheetStatus = _OvrlSftyDataSheetSts.OverallSafetyDataSheetStatus
[0..1] I_SalesDocApprovalStatus _SalesDocApprovalStatus $projection.SalesDocApprovalStatus = _SalesDocApprovalStatus.SalesDocApprovalStatus
[0..1] I_OvrlTradeCmplncEmbargoStatus _OvrlTradeCmplncEmbargoStatus $projection.OverallTrdCmplncEmbargoSts = _OvrlTradeCmplncEmbargoStatus.OverallTrdCmplncEmbargoSts
[0..1] I_OvTrdCmplncSnctndListChkSts _OvTrdCmplncSnctndListChkSts $projection.OvrlTrdCmplncSnctndListChkSts = _OvTrdCmplncSnctndListChkSts.OvrlTrdCmplncSnctndListChkSts
[0..1] I_OvrlTrdCmplncLegalCtrlChkSts _OvrlTrdCmplncLegalCtrlChkSts $projection.OvrlTrdCmplncLegalCtrlChkSts = _OvrlTrdCmplncLegalCtrlChkSts.OvrlTrdCmplncLegalCtrlChkSts
[0..1] I_OmniChnlSalesPromotionStatus _OmniChnlSalesPromotionStatus $projection.OmniChnlSalesPromotionStatus = _OmniChnlSalesPromotionStatus.OmniChnlSalesPromotionStatus
[0..1] I_Customer _CustomerCreditAccount $projection.CustomerCreditAccount = _CustomerCreditAccount.Customer
[0..1] I_Currency _ControllingAreaCurrency $projection.ControllingAreaCurrency = _ControllingAreaCurrency.Currency
[0..1] I_Country _TaxDepartureCountry $projection.TaxDepartureCountry = _TaxDepartureCountry.Country
[0..1] I_Country _VATRegistrationCountry $projection.VATRegistrationCountry = _VATRegistrationCountry.Country
[0..1] I_ContractDownPaymentStatus _DownPaymentStatus $projection.ContractDownPaymentStatus = _DownPaymentStatus.ContractDownPaymentStatus
[0..1] I_DeliveryDateTypeRule _DeliveryDateTypeRule $projection.DeliveryDateTypeRule = _DeliveryDateTypeRule.DeliveryDateTypeRule
[0..1] I_ServiceDocumentEnhcd _SolutionOrder $projection.BusinessSolutionOrder = _SolutionOrder.ServiceDocument and _SolutionOrder.ServiceObjectType = 'BUS2000172'

Annotations (14)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Sales Document Basic view
VDM.viewType #BASIC view
AccessControl.authorizationCheck #CHECK view
AbapCatalog.sqlViewName ISDSALESDOCBSC view
AbapCatalog.preserveKey true view
AbapCatalog.compiler.compareFilter true view
ObjectModel.compositionRoot true view
ObjectModel.representativeKey SalesDocument view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #B view
ObjectModel.usageType.sizeCategory #L view
Analytics.dataCategory #DIMENSION view
Metadata.allowExtensions true view

Fields (72)

KeyFieldSource TableSource FieldDescription
KEY SalesDocument vbak vbeln SD Sched. Agmt
SDDocumentCategory vbak vbtyp TSW Det.Doc typ
SalesDocumentType vbak auart Sales Doc. Type
SalesDocumentProcessingType vbak vbklt Indicator
CreatedByUser vbak ernam User Name
LastChangedByUser vbak last_changed_by_user User Name
CreationDate vbak erdat Entered On
CreationTime
LastChangeDate vbak aedat Obsolete
LastChangeDateTime vbak upd_tmstmp Time Stamp
LastCustomerContactDate vbak mahdt Last Contact Dt
SenderBusinessSystemName vbak ext_bus_syst_id Ext. Bus. Syst. ID
ExternalDocumentID vbak ext_ref_doc_id External Document ID
ExternalDocLastChangeDateTime vbak ext_rev_tmstmp External Revision
SalesOrganization vbak vkorg SD Sales Org.
DistributionChannel vbak vtweg RefDistCh-Cust/Mat.
OrganizationDivision vbak spart Source supplier
SalesGroup vbak vkgrp Sales Group
SalesOffice vbak vkbur Sales Office
SoldToParty vbak kunnr Stock customer
AdditionalCustomerGroup1 vbak kvgr1 Customer Grp 1
AdditionalCustomerGroup2 vbak kvgr2 Customer Grp 2
AdditionalCustomerGroup3 vbak kvgr3 Customer Grp 3
AdditionalCustomerGroup4 vbak kvgr4 Customer Grp 4
AdditionalCustomerGroup5 vbak kvgr5 Customer Grp 5
CreditControlArea vbak kkber Cred.Contr.Area
CustomerRebateAgreement vbak knuma Agreement
SalesDocumentDate vbak audat Trans. Period End
SDDocumentReason vbak augru Sales Document Reason
SDDocumentCollectiveNumber vbak submi Collective No.
CustomerPurchaseOrderType vbak bsark Pur. Ord. Type
CustomerPurchaseOrderDate vbak bstdk Cust. Ref. Date
CustomerPurchaseOrderSuplmnt vbak bstzd Supplement
StatisticsCurrency vbak stwae Stats. Currency
RetsMgmtProcess vbak msr_id Process ID No.
NextCreditCheckDate vbak cmnup Next Check
BindingPeriodValidityStartDate vbak angdt Valid From
BindingPeriodValidityEndDate vbak bnddt Valid To
HdrOrderProbabilityInPercent vbak awahr Probability
SchedulingAgreementProfileCode vbak abdis MRP for DS type
DelivSchedTypeMRPRlvnceCode vbak abdis MRP for DS type
AgrmtValdtyStartDate vbak guebg Valid From
AgrmtValdtyEndDate vbak gueen Valid To
MatlUsageIndicator vbak abrvw Usage
TotalNetAmount vbak netwr Value
TransactionCurrency vbak waerk Doc. Currency
SalesDocumentCondition vbak knumv Doc. Condition
SDPricingProcedure vbak kalsm Search Proced.
CustomerTaxClassification1 vbak taxk1 Tax Cls.1 Cust.
CustomerTaxClassification2 vbak taxk2 Tax Cls.2 Cust.
CustomerTaxClassification3 vbak taxk3 Tax Cls.3 Cust.
CustomerTaxClassification4 vbak taxk4 Tax Cls.4 Cust.
CustomerTaxClassification5 vbak taxk5 Tax Cls.5 Cust.
CustomerTaxClassification6 vbak taxk6 Tax Cls.6 Cust.
CustomerTaxClassification7 vbak taxk7 Tax Cls.7 Cust.
CustomerTaxClassification8 vbak taxk8 Tax Cls.8 Cust.
CustomerTaxClassification9 vbak taxk9 Tax Cls.9 Cust.
TaxDepartureCountry vbak landtx Tx Dep Ctry/Reg
VATRegistrationCountry vbak stceg_l Tax Dest. Cty/R
RequestedDeliveryDate
ShippingCondition vbak vsbed Shipping Conditions
CompleteDeliveryIsDefined vbak autlf Complete Dlv.
DeliveryBlockReason vbak lifsk Delivery Block
FashionCancelDate vbak fsh_candate Cancel Date
BillingCompanyCode vbak bukrs_vf CCodeToBeBilled
HeaderBillingBlockReason vbak faksk Billing Block
SalesDocApprovalReason
ProposedBillingDocumentType vbak fkara Ord-Rel.Bill.Ty
ExchangeRateType vbak kurst Fix.rate type (EMU)
BusinessArea vbak gsber Business Area
CostCenterBusinessArea vbak gskst Business Area
CostCenter vbak kostl Substitute CC

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_SalesDocumentBasic.
-- 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.

CREATE VIEW I_SalesDocumentBasic AS
SELECT
  vbak.vbeln AS SalesDocument,
  vbak.vbtyp AS SDDocumentCategory,
  vbak.auart AS SalesDocumentType,
  vbak.vbklt AS SalesDocumentProcessingType,
  vbak.ernam AS CreatedByUser,
  vbak.last_changed_by_user AS LastChangedByUser,
  vbak.erdat AS CreationDate,
  cast( vbak.erzet as creation_time preserving type ) AS CreationTime,
  vbak.aedat AS LastChangeDate,
  vbak.upd_tmstmp AS LastChangeDateTime,
  vbak.mahdt AS LastCustomerContactDate,
  vbak.ext_bus_syst_id AS SenderBusinessSystemName,
  vbak.ext_ref_doc_id AS ExternalDocumentID,
  vbak.ext_rev_tmstmp AS ExternalDocLastChangeDateTime,
  vbak.vkorg AS SalesOrganization,
  vbak.vtweg AS DistributionChannel,
  vbak.spart AS OrganizationDivision,
  vbak.vkgrp AS SalesGroup,
  vbak.vkbur AS SalesOffice,
  vbak.kunnr AS SoldToParty,
  vbak.kvgr1 AS AdditionalCustomerGroup1,
  vbak.kvgr2 AS AdditionalCustomerGroup2,
  vbak.kvgr3 AS AdditionalCustomerGroup3,
  vbak.kvgr4 AS AdditionalCustomerGroup4,
  vbak.kvgr5 AS AdditionalCustomerGroup5,
  vbak.kkber AS CreditControlArea,
  vbak.knuma AS CustomerRebateAgreement,
  vbak.audat AS SalesDocumentDate,
  vbak.augru AS SDDocumentReason,
  vbak.submi AS SDDocumentCollectiveNumber,
  vbak.bsark AS CustomerPurchaseOrderType,
  vbak.bstdk AS CustomerPurchaseOrderDate,
  vbak.bstzd AS CustomerPurchaseOrderSuplmnt,
  vbak.stwae AS StatisticsCurrency,
  vbak.msr_id AS RetsMgmtProcess,
  vbak.cmnup AS NextCreditCheckDate,
  vbak.angdt AS BindingPeriodValidityStartDate,
  vbak.bnddt AS BindingPeriodValidityEndDate,
  vbak.awahr AS HdrOrderProbabilityInPercent,
  vbak.abdis AS SchedulingAgreementProfileCode,
  vbak.abdis AS DelivSchedTypeMRPRlvnceCode,
  vbak.guebg AS AgrmtValdtyStartDate,
  vbak.gueen AS AgrmtValdtyEndDate,
  vbak.abrvw AS MatlUsageIndicator,
  vbak.netwr AS TotalNetAmount,
  vbak.waerk AS TransactionCurrency,
  vbak.knumv AS SalesDocumentCondition,
  vbak.kalsm AS SDPricingProcedure,
  vbak.taxk1 AS CustomerTaxClassification1,
  vbak.taxk2 AS CustomerTaxClassification2,
  vbak.taxk3 AS CustomerTaxClassification3,
  vbak.taxk4 AS CustomerTaxClassification4,
  vbak.taxk5 AS CustomerTaxClassification5,
  vbak.taxk6 AS CustomerTaxClassification6,
  vbak.taxk7 AS CustomerTaxClassification7,
  vbak.taxk8 AS CustomerTaxClassification8,
  vbak.taxk9 AS CustomerTaxClassification9,
  vbak.landtx AS TaxDepartureCountry,
  vbak.stceg_l AS VATRegistrationCountry,
  cast(vbak.vdatu as reqd_delivery_date preserving type) AS RequestedDeliveryDate,
  vbak.vsbed AS ShippingCondition,
  vbak.autlf AS CompleteDeliveryIsDefined,
  vbak.lifsk AS DeliveryBlockReason,
  vbak.fsh_candate AS FashionCancelDate,
  vbak.bukrs_vf AS BillingCompanyCode,
  vbak.faksk AS HeaderBillingBlockReason,
  cast( vbak.apm_approval_reason as sd_apm_approval_reason_vdm preserving type ) AS SalesDocApprovalReason,
  vbak.fkara AS ProposedBillingDocumentType,
  vbak.kurst AS ExchangeRateType,
  vbak.gsber AS BusinessArea,
  vbak.gskst AS CostCenterBusinessArea,
  vbak.kostl AS CostCenter
FROM vbak
LEFT OUTER JOIN I_BusinessAreaText AS _BusinessAreaText ON BusinessArea = _BusinessAreaText.BusinessArea  -- association [0..*]
LEFT OUTER JOIN I_BusinessAreaText AS _CostCenterBusinessAreaText ON CostCenterBusinessArea = _CostCenterBusinessAreaText.BusinessArea  -- association [0..*]
LEFT OUTER JOIN I_CreditControlAreaText AS _CreditControlAreaText ON CreditControlArea = _CreditControlAreaText.CreditControlArea  -- association [0..*]
LEFT OUTER JOIN I_SalesDocumentItemBasic AS _ItemBasic ON SalesDocument = _ItemBasic.SalesDocument  -- association [0..*]
LEFT OUTER JOIN I_SDDocumentCategory AS _SDDocumentCategory ON SDDocumentCategory = _SDDocumentCategory.SDDocumentCategory  -- association [0..1]
LEFT OUTER JOIN I_SalesDocumentType AS _SalesDocumentType ON SalesDocumentType = _SalesDocumentType.SalesDocumentType  -- association [0..1]
LEFT OUTER JOIN I_User AS _CreatedByUser ON CreatedByUser = _CreatedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_User AS _LastChangedByUser ON LastChangedByUser = _LastChangedByUser.UserID  -- association [0..1]
LEFT OUTER JOIN I_SalesOrganization AS _SalesOrganization ON SalesOrganization = _SalesOrganization.SalesOrganization  -- association [0..1]
LEFT OUTER JOIN I_DistributionChannel AS _DistributionChannel ON DistributionChannel = _DistributionChannel.DistributionChannel  -- association [0..1]
LEFT OUTER JOIN I_Division AS _OrganizationDivision ON OrganizationDivision = _OrganizationDivision.Division  -- association [0..1]
LEFT OUTER JOIN I_SalesGroup AS _SalesGroup ON SalesGroup = _SalesGroup.SalesGroup  -- association [0..1]
LEFT OUTER JOIN I_SalesOffice AS _SalesOffice ON SalesOffice = _SalesOffice.SalesOffice  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _SoldToParty ON SoldToParty = _SoldToParty.Customer  -- association [0..1]
LEFT OUTER JOIN I_AdditionalCustomerGroup1 AS _AdditionalCustomerGroup1 ON AdditionalCustomerGroup1 = _AdditionalCustomerGroup1.AdditionalCustomerGroup1  -- association [0..1]
LEFT OUTER JOIN I_AdditionalCustomerGroup2 AS _AdditionalCustomerGroup2 ON AdditionalCustomerGroup2 = _AdditionalCustomerGroup2.AdditionalCustomerGroup2  -- association [0..1]
LEFT OUTER JOIN I_AdditionalCustomerGroup3 AS _AdditionalCustomerGroup3 ON AdditionalCustomerGroup3 = _AdditionalCustomerGroup3.AdditionalCustomerGroup3  -- association [0..1]
LEFT OUTER JOIN I_AdditionalCustomerGroup4 AS _AdditionalCustomerGroup4 ON AdditionalCustomerGroup4 = _AdditionalCustomerGroup4.AdditionalCustomerGroup4  -- association [0..1]
LEFT OUTER JOIN I_AdditionalCustomerGroup5 AS _AdditionalCustomerGroup5 ON AdditionalCustomerGroup5 = _AdditionalCustomerGroup5.AdditionalCustomerGroup5  -- association [0..1]
LEFT OUTER JOIN I_CreditControlArea AS _CreditControlArea ON CreditControlArea = _CreditControlArea.CreditControlArea  -- association [0..1]
LEFT OUTER JOIN I_SDDocumentReason AS _SDDocumentReason ON SDDocumentReason = _SDDocumentReason.SDDocumentReason  -- association [0..1]
LEFT OUTER JOIN I_CustomerPurchaseOrderType AS _CustomerPurchaseOrderType ON CustomerPurchaseOrderType = _CustomerPurchaseOrderType.CustomerPurchaseOrderType  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _StatisticsCurrency ON StatisticsCurrency = _StatisticsCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_RetsMgmtProcess AS _RetsMgmtProcess ON RetsMgmtProcess = _RetsMgmtProcess.RetsMgmtProcess  -- association [0..1]
LEFT OUTER JOIN I_DelivSchedTypeMRPRlvnceCode AS _DelivSchedTypeMRPRlvnceCode ON DelivSchedTypeMRPRlvnceCode = _DelivSchedTypeMRPRlvnceCode.DelivSchedTypeMRPRlvnceCode  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _TransactionCurrency ON TransactionCurrency = _TransactionCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_ShippingCondition AS _ShippingCondition ON ShippingCondition = _ShippingCondition.ShippingCondition  -- association [0..1]
LEFT OUTER JOIN I_DeliveryBlockReason AS _DeliveryBlockReason ON DeliveryBlockReason = _DeliveryBlockReason.DeliveryBlockReason  -- association [0..1]
LEFT OUTER JOIN I_CompanyCode AS _BillingCompanyCode ON BillingCompanyCode = _BillingCompanyCode.CompanyCode  -- association [0..1]
LEFT OUTER JOIN I_BillingBlockReason AS _HeaderBillingBlockReason ON HeaderBillingBlockReason = _HeaderBillingBlockReason.BillingBlockReason  -- association [0..1]
LEFT OUTER JOIN I_SalesDocApprovalReason AS _SalesDocApprovalReason ON SDDocumentCategory = _SalesDocApprovalReason.SDDocumentCategory AND SalesDocApprovalReason = _SalesDocApprovalReason.SalesDocApprovalReason  -- association [0..1]
LEFT OUTER JOIN I_ExchangeRateType AS _ExchangeRateType ON ExchangeRateType = _ExchangeRateType.ExchangeRateType  -- association [0..1]
LEFT OUTER JOIN I_BusinessArea AS _BusinessArea ON BusinessArea = _BusinessArea.BusinessArea  -- association [0..1]
LEFT OUTER JOIN I_BusinessArea AS _CostCenterBusinessArea ON CostCenterBusinessArea = _CostCenterBusinessArea.BusinessArea  -- association [0..1]
LEFT OUTER JOIN I_CostCenter AS _CostCenter ON CostCenter = _CostCenter.CostCenter AND ControllingArea = _CostCenter.ControllingArea AND _CostCenter.ValidityEndDate >= SalesDocumentDate AND _CostCenter.ValidityStartDate <= SalesDocumentDate  -- association [0..1]
LEFT OUTER JOIN I_SlsPricingProcedure AS _SDPricingProcedure ON SDPricingProcedure = _SDPricingProcedure.PricingProcedure  -- association [0..1]
LEFT OUTER JOIN I_ControllingArea AS _ControllingArea ON ControllingArea = _ControllingArea.ControllingArea  -- association [0..1]
LEFT OUTER JOIN I_ControllingObject AS _ControllingObject ON ControllingObject = _ControllingObject.ControllingObject  -- association [0..1]
LEFT OUTER JOIN I_SDDocumentCategory AS _ReferenceSDDocumentCategory ON ReferenceSDDocumentCategory = _ReferenceSDDocumentCategory.SDDocumentCategory  -- association [0..1]
LEFT OUTER JOIN I_EngagementProjectItem AS _EngagementProjectItem ON SalesDocument = _EngagementProjectItem.EngagementProjectItem AND _EngagementProjectItem.EngagementProjectItemType = '0SOH'  -- association [0..*]
LEFT OUTER JOIN I_SalesArea AS _SalesArea ON SalesOrganization = _SalesArea.SalesOrganization AND DistributionChannel = _SalesArea.DistributionChannel AND OrganizationDivision = _SalesArea.Division  -- association [0..1]
LEFT OUTER JOIN I_OverallSDProcessStatus AS _OverallSDProcessStatus ON OverallSDProcessStatus = _OverallSDProcessStatus.OverallSDProcessStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallPurchaseConfStatus AS _OverallPurchaseConfStatus ON OverallPurchaseConfStatus = _OverallPurchaseConfStatus.OverallPurchaseConfStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallSDDocumentRjcnStatus AS _OverallSDDocumentRejectionSts ON OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts  -- association [0..1]
LEFT OUTER JOIN I_TotalBlockStatus AS _TotalBlockStatus ON TotalBlockStatus = _TotalBlockStatus.TotalBlockStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallDelivConfStatus AS _OverallDelivConfStatus ON OverallDelivConfStatus = _OverallDelivConfStatus.OverallDelivConfStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallTotalDeliveryStatus AS _OverallTotalDeliveryStatus ON OverallTotalDeliveryStatus = _OverallTotalDeliveryStatus.OverallTotalDeliveryStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallDeliveryStatus AS _OverallDeliveryStatus ON OverallDeliveryStatus = _OverallDeliveryStatus.OverallDeliveryStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallDeliveryBlockStatus AS _OverallDeliveryBlockStatus ON OverallDeliveryBlockStatus = _OverallDeliveryBlockStatus.OverallDeliveryBlockStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallOrdReltdBillgStatus AS _OverallOrdReltdBillgStatus ON OverallOrdReltdBillgStatus = _OverallOrdReltdBillgStatus.OverallOrdReltdBillgStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallBillingBlockStatus AS _OverallBillingBlockStatus ON OverallBillingBlockStatus = _OverallBillingBlockStatus.OverallBillingBlockStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallTotalSDDocRefStatus AS _OverallTotalSDDocRefStatus ON OverallTotalSDDocRefStatus = _OverallTotalSDDocRefStatus.OverallTotalSDDocRefStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallSDDocReferenceStatus AS _OverallSDDocReferenceStatus ON OverallSDDocReferenceStatus = _OverallSDDocReferenceStatus.OverallSDDocReferenceStatus  -- association [0..1]
LEFT OUTER JOIN I_TotalCreditCheckStatus AS _TotalCreditCheckStatus ON TotalCreditCheckStatus = _TotalCreditCheckStatus.TotalCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_MaxDocValueCreditCheckSts AS _MaxDocValueCreditCheckStatus ON MaxDocValueCreditCheckStatus = _MaxDocValueCreditCheckStatus.MaxDocValueCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_PaymentTermCreditCheckSts AS _PaymentTermCreditCheckStatus ON PaymentTermCreditCheckStatus = _PaymentTermCreditCheckStatus.PaymentTermCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_FinDocCreditCheckStatus AS _FinDocCreditCheckStatus ON FinDocCreditCheckStatus = _FinDocCreditCheckStatus.FinDocCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_ExprtInsurCreditCheckStatus AS _ExprtInsurCreditCheckStatus ON ExprtInsurCreditCheckStatus = _ExprtInsurCreditCheckStatus.ExprtInsurCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_PaytAuthsnCreditCheckSts AS _PaytAuthsnCreditCheckSts ON PaytAuthsnCreditCheckSts = _PaytAuthsnCreditCheckSts.PaytAuthsnCreditCheckSts  -- association [0..1]
LEFT OUTER JOIN I_CentralCreditCheckStatus AS _CentralCreditCheckStatus ON CentralCreditCheckStatus = _CentralCreditCheckStatus.CentralCreditCheckStatus  -- association [0..1]
LEFT OUTER JOIN I_CentralCreditChkTechErrSts AS _CentralCreditChkTechErrSts ON CentralCreditChkTechErrSts = _CentralCreditChkTechErrSts.CentralCreditChkTechErrSts  -- association [0..1]
LEFT OUTER JOIN I_HdrGenIncompletionStatus AS _HdrGeneralIncompletionStatus ON HdrGeneralIncompletionStatus = _HdrGeneralIncompletionStatus.HdrGeneralIncompletionStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallPrcIncompletionSts AS _OverallPricingIncompletionSts ON OverallPricingIncompletionSts = _OverallPricingIncompletionSts.OverallPricingIncompletionSts  -- association [0..1]
LEFT OUTER JOIN I_HdrDelivIncompletionStatus AS _HeaderDelivIncompletionStatus ON HeaderDelivIncompletionStatus = _HeaderDelivIncompletionStatus.HeaderDelivIncompletionStatus  -- association [0..1]
LEFT OUTER JOIN I_HdrBillgIncompletionStatus AS _HeaderBillgIncompletionStatus ON HeaderBillgIncompletionStatus = _HeaderBillgIncompletionStatus.HeaderBillgIncompletionStatus  -- association [0..1]
LEFT OUTER JOIN I_OvrlItmGenIncompletionSts AS _OvrlItmGeneralIncompletionSts ON OvrlItmGeneralIncompletionSts = _OvrlItmGeneralIncompletionSts.OvrlItmGeneralIncompletionSts  -- association [0..1]
LEFT OUTER JOIN I_OvrlItmBillgIncompltnSts AS _OvrlItmBillingIncompletionSts ON OvrlItmBillingIncompletionSts = _OvrlItmBillingIncompletionSts.OvrlItmBillingIncompletionSts  -- association [0..1]
LEFT OUTER JOIN I_OvrlItmDelivIncompletionSts AS _OvrlItmDelivIncompletionSts ON OvrlItmDelivIncompletionSts = _OvrlItmDelivIncompletionSts.OvrlItmDelivIncompletionSts  -- association [0..1]
LEFT OUTER JOIN I_OverallChmlCmplncStatus AS _OverallChmlCmplncStatus ON OverallChmlCmplncStatus = _OverallChmlCmplncStatus.OverallChmlCmplncStatus  -- association [0..1]
LEFT OUTER JOIN I_OverallDangerousGoodsStatus AS _OverallDangerousGoodsStatus ON OverallDangerousGoodsStatus = _OverallDangerousGoodsStatus.OverallDangerousGoodsStatus  -- association [0..1]
LEFT OUTER JOIN I_OvrlSftyDataSheetSts AS _OvrlSftyDataSheetSts ON OverallSafetyDataSheetStatus = _OvrlSftyDataSheetSts.OverallSafetyDataSheetStatus  -- association [0..1]
LEFT OUTER JOIN I_SalesDocApprovalStatus AS _SalesDocApprovalStatus ON SalesDocApprovalStatus = _SalesDocApprovalStatus.SalesDocApprovalStatus  -- association [0..1]
LEFT OUTER JOIN I_OvrlTradeCmplncEmbargoStatus AS _OvrlTradeCmplncEmbargoStatus ON OverallTrdCmplncEmbargoSts = _OvrlTradeCmplncEmbargoStatus.OverallTrdCmplncEmbargoSts  -- association [0..1]
LEFT OUTER JOIN I_OvTrdCmplncSnctndListChkSts AS _OvTrdCmplncSnctndListChkSts ON OvrlTrdCmplncSnctndListChkSts = _OvTrdCmplncSnctndListChkSts.OvrlTrdCmplncSnctndListChkSts  -- association [0..1]
LEFT OUTER JOIN I_OvrlTrdCmplncLegalCtrlChkSts AS _OvrlTrdCmplncLegalCtrlChkSts ON OvrlTrdCmplncLegalCtrlChkSts = _OvrlTrdCmplncLegalCtrlChkSts.OvrlTrdCmplncLegalCtrlChkSts  -- association [0..1]
LEFT OUTER JOIN I_OmniChnlSalesPromotionStatus AS _OmniChnlSalesPromotionStatus ON OmniChnlSalesPromotionStatus = _OmniChnlSalesPromotionStatus.OmniChnlSalesPromotionStatus  -- association [0..1]
LEFT OUTER JOIN I_Customer AS _CustomerCreditAccount ON CustomerCreditAccount = _CustomerCreditAccount.Customer  -- association [0..1]
LEFT OUTER JOIN I_Currency AS _ControllingAreaCurrency ON ControllingAreaCurrency = _ControllingAreaCurrency.Currency  -- association [0..1]
LEFT OUTER JOIN I_Country AS _TaxDepartureCountry ON TaxDepartureCountry = _TaxDepartureCountry.Country  -- association [0..1]
LEFT OUTER JOIN I_Country AS _VATRegistrationCountry ON VATRegistrationCountry = _VATRegistrationCountry.Country  -- association [0..1]
LEFT OUTER JOIN I_ContractDownPaymentStatus AS _DownPaymentStatus ON ContractDownPaymentStatus = _DownPaymentStatus.ContractDownPaymentStatus  -- association [0..1]
LEFT OUTER JOIN I_DeliveryDateTypeRule AS _DeliveryDateTypeRule ON DeliveryDateTypeRule = _DeliveryDateTypeRule.DeliveryDateTypeRule  -- association [0..1]
LEFT OUTER JOIN I_ServiceDocumentEnhcd AS _SolutionOrder ON BusinessSolutionOrder = _SolutionOrder.ServiceDocument AND _SolutionOrder.ServiceObjectType = 'BUS2000172'  -- association [0..1]
;