A_SalesOrderSimulation_2

DDL: A_SALESORDERSIMULATION_2 Type: view_entity CONSUMPTION Package: ODATA_SD_SALESORDER_API

Sales Order Header Simulation

A_SalesOrderSimulation_2 is a Consumption CDS View that provides data about "Sales Order Header Simulation" in SAP S/4HANA. It reads from 1 data source (R_SalesOrderTP) and exposes 90 fields with key field SalesOrder. It has 5 associations to related views. It is exposed through 1 OData service (API_SALESORDERSIMULATION). Part of development package ODATA_SD_SALESORDER_API.

Data Sources (1)

SourceAliasJoin Type
R_SalesOrderTP SalesOrder from

Associations (5)

CardinalityTargetAliasCondition
[0..1] I_SlsOrganizationDistrChnl _SlsOrganizationDistrChnl $projection.SalesOrganization = _SlsOrganizationDistrChnl.SalesOrganization and $projection.DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel
[1] E_SalesDocumentBasic _Extension $projection.SalesOrder = _Extension.SalesDocument
[0..*] A_SalesOrderItemSimulation_2 _Item
[0..*] A_SalesOrderPartnerSimln_2 _Partner
[0..*] A_SlsOrdPricingElementSimln_2 _PricingElement

Annotations (15)

NameValueLevelField
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Sales Order Header Simulation view
Metadata.ignorePropagatedAnnotations true view
OData.entityType.name SalesOrder_Type view
ObjectModel.representativeKey SalesOrder view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.query.implementedBy ABAP:CL_SD_SO_SIMLN_RAP_V4_QRY view
AbapCatalog.extensibility.extensible true view
AbapCatalog.extensibility.elementSuffix SDH view
AbapCatalog.extensibility.quota.maximumFields 204 view
AbapCatalog.extensibility.quota.maximumBytes 100000 view

OData Services (1)

ServiceBindingVersionContractRelease
API_SALESORDERSIMULATION API_SALESORDERSIMULATION V4 C2 C1

Fields (90)

KeyFieldSource TableSource FieldDescription
KEY SalesOrder R_SalesOrderTP SalesOrder SD Document
SalesOrderType
SalesOrderProcessingType R_SalesOrderTP SalesOrderProcessingType
SoldToParty R_SalesOrderTP SoldToParty Sold-to Party
SalesOrganization R_SalesOrderTP SalesOrganization Sales Organization
DistributionChannel R_SalesOrderTP DistributionChannel RefDistCh-Cust/Mat.
ReferenceDistributionChannel _SlsOrganizationDistrChnl ReferenceDistributionChannel
OrganizationDivision R_SalesOrderTP OrganizationDivision Org. Division
SalesOffice R_SalesOrderTP SalesOffice Sales Office
SalesGroup R_SalesOrderTP SalesGroup Sales Group
SalesDistrict R_SalesOrderTP SalesDistrict Sales District
CreatedByUser R_SalesOrderTP CreatedByUser User Name
CreationDate R_SalesOrderTP CreationDate Time Stamp
CreationTime R_SalesOrderTP CreationTime Time of Change
PurchaseOrderByCustomer R_SalesOrderTP PurchaseOrderByCustomer Purchase Order Number
PurchaseOrderByShipToParty R_SalesOrderTP PurchaseOrderByShipToParty
CustomerPurchaseOrderType R_SalesOrderTP CustomerPurchaseOrderType
CustomerPurchaseOrderDate R_SalesOrderTP CustomerPurchaseOrderDate Purchase Order Date
CorrespncExternalReference R_SalesOrderTP CorrespncExternalReference Your Reference
CorrespncExtRefByShipToParty R_SalesOrderTP CorrespncExtRefByShipToParty
BusinessSolutionOrder R_SalesOrderTP BusinessSolutionOrder Solution Order
ReferenceSDDocument R_SalesOrderTP ReferenceSDDocument Reference Doc.
ReferenceSDDocumentCategory R_SalesOrderTP ReferenceSDDocumentCategory Prec.Doc.Categ.
SDDocumentReason R_SalesOrderTP SDDocumentReason Order Reason
SalesOrderDate R_SalesOrderTP SalesOrderDate Document Date
RequestedDeliveryDate R_SalesOrderTP RequestedDeliveryDate Requested Delivery Date
PricingDate R_SalesOrderTP PricingDate Pricing Date
ServicesRenderedDate R_SalesOrderTP ServicesRenderedDate Services Rendered Date
BillingDocumentDate R_SalesOrderTP BillingDocumentDate Billing Date
TotalNetAmount R_SalesOrderTP TotalNetAmount Total Net Amount
TransactionCurrency R_SalesOrderTP TransactionCurrency Transaction Currency
DeliveryDateTypeRule R_SalesOrderTP DeliveryDateTypeRule Deliv Date Rule
ShippingCondition R_SalesOrderTP ShippingCondition Shipping Conditions
CompleteDeliveryIsDefined R_SalesOrderTP CompleteDeliveryIsDefined Complete Dlv.
SlsDocIsRlvtForProofOfDeliv R_SalesOrderTP SlsDocIsRlvtForProofOfDeliv POD-relevant
ShippingType R_SalesOrderTP ShippingType Shipping Type
ReceivingPoint R_SalesOrderTP ReceivingPoint Recv. Point
IncotermsClassification R_SalesOrderTP IncotermsClassification Incoterms
IncotermsVersion R_SalesOrderTP IncotermsVersion Inco. Version
IncotermsLocation1 R_SalesOrderTP IncotermsLocation1 Inco. Location1
IncotermsLocation2 R_SalesOrderTP IncotermsLocation2 Inco. Location2
SDPricingProcedure R_SalesOrderTP SDPricingProcedure Pric. Procedure
CustomerPriceGroup R_SalesOrderTP CustomerPriceGroup CustPrice Group
PriceListType R_SalesOrderTP PriceListType Price List Tp.
FixedValueDate R_SalesOrderTP FixedValueDate Fixed Val. Date
TaxDepartureCountry R_SalesOrderTP TaxDepartureCountry Tx Dep Ctry/Reg
VATRegistrationCountry R_SalesOrderTP VATRegistrationCountry CtryRgnSlsTxNo.
IsEUTriangularDeal R_SalesOrderTP IsEUTriangularDeal Is EU Triangular Deal
CustomerPaymentTerms R_SalesOrderTP CustomerPaymentTerms Pyt Terms
PaymentMethod R_SalesOrderTP PaymentMethod Pymt Meth.
BillingCompanyCode R_SalesOrderTP BillingCompanyCode CCodeToBeBilled
ControllingArea R_SalesOrderTP ControllingArea Controlling Area
CustomerAccountAssignmentGroup R_SalesOrderTP CustomerAccountAssignmentGroup AccAssmtGrpCust
AssignmentReference R_SalesOrderTP AssignmentReference Assignment Reference
AccountingDocExternalReference R_SalesOrderTP AccountingDocExternalReference
CustomerCreditAccount R_SalesOrderTP CustomerCreditAccount
HeaderBillingBlockReason R_SalesOrderTP HeaderBillingBlockReason Billing Block
DeliveryBlockReason R_SalesOrderTP DeliveryBlockReason Delivery Block
SalesOrderApprovalReason R_SalesOrderTP SalesOrderApprovalReason
SlsContrAutoAssgmtIDForSlsOrd R_SalesOrderTP SlsContrAutoAssgmtIDForSlsOrd
CustomerGroup R_SalesOrderTP CustomerGroup Customer Group
AdditionalCustomerGroup1 R_SalesOrderTP AdditionalCustomerGroup1 Customer Grp 1
AdditionalCustomerGroup2 R_SalesOrderTP AdditionalCustomerGroup2 Customer Grp 2
AdditionalCustomerGroup3 R_SalesOrderTP AdditionalCustomerGroup3 Customer Grp 3
AdditionalCustomerGroup4 R_SalesOrderTP AdditionalCustomerGroup4 Customer Grp 4
AdditionalCustomerGroup5 R_SalesOrderTP AdditionalCustomerGroup5 Customer Grp 5
CreditCheckIsToBeDisabled
OverallSDProcessStatus R_SalesOrderTP OverallSDProcessStatus
OverallPurchaseConfStatus R_SalesOrderTP OverallPurchaseConfStatus
OverallDeliveryBlockStatus R_SalesOrderTP OverallDeliveryBlockStatus
OverallBillingBlockStatus R_SalesOrderTP OverallBillingBlockStatus
OverallDeliveryStatus R_SalesOrderTP OverallDeliveryStatus
TotalCreditCheckStatus R_SalesOrderTP TotalCreditCheckStatus
OverallSDDocumentRejectionSts R_SalesOrderTP OverallSDDocumentRejectionSts
TotalBlockStatus R_SalesOrderTP TotalBlockStatus
HdrGeneralIncompletionStatus R_SalesOrderTP HdrGeneralIncompletionStatus
OvrlItmGeneralIncompletionSts R_SalesOrderTP OvrlItmGeneralIncompletionSts
OverallSDDocReferenceStatus R_SalesOrderTP OverallSDDocReferenceStatus
SalesDocApprovalStatus R_SalesOrderTP SalesDocApprovalStatus
OverallChmlCmplncStatus R_SalesOrderTP OverallChmlCmplncStatus
OverallDangerousGoodsStatus R_SalesOrderTP OverallDangerousGoodsStatus
OverallSafetyDataSheetStatus R_SalesOrderTP OverallSafetyDataSheetStatus
OverallTrdCmplncEmbargoSts R_SalesOrderTP OverallTrdCmplncEmbargoSts
OvrlTrdCmplncSnctndListChkSts R_SalesOrderTP OvrlTrdCmplncSnctndListChkSts
OvrlTrdCmplncLegalCtrlChkSts R_SalesOrderTP OvrlTrdCmplncLegalCtrlChkSts
SalesOrderDownPaymentStatus R_SalesOrderTP SalesOrderDownPaymentStatus
OverallOrdReltdBillgStatus R_SalesOrderTP OverallOrdReltdBillgStatus
_Item _Item
_Partner _Partner
_PricingElement _PricingElement

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 A_SalesOrderSimulation_2.
-- 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 A_SalesOrderSimulation_2 AS
SELECT
  SalesOrder.SalesOrder AS SalesOrder,
  cast(SalesOrder.SalesOrderType as auart_spr preserving type ) AS SalesOrderType,
  SalesOrder.SalesOrderProcessingType AS SalesOrderProcessingType,
  SalesOrder.SoldToParty AS SoldToParty,
  SalesOrder.SalesOrganization AS SalesOrganization,
  SalesOrder.DistributionChannel AS DistributionChannel,
  _SlsOrganizationDistrChnl.ReferenceDistributionChannel AS ReferenceDistributionChannel,
  SalesOrder.OrganizationDivision AS OrganizationDivision,
  SalesOrder.SalesOffice AS SalesOffice,
  SalesOrder.SalesGroup AS SalesGroup,
  SalesOrder.SalesDistrict AS SalesDistrict,
  SalesOrder.CreatedByUser AS CreatedByUser,
  SalesOrder.CreationDate AS CreationDate,
  SalesOrder.CreationTime AS CreationTime,
  SalesOrder.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
  SalesOrder.PurchaseOrderByShipToParty AS PurchaseOrderByShipToParty,
  SalesOrder.CustomerPurchaseOrderType AS CustomerPurchaseOrderType,
  SalesOrder.CustomerPurchaseOrderDate AS CustomerPurchaseOrderDate,
  SalesOrder.CorrespncExternalReference AS CorrespncExternalReference,
  SalesOrder.CorrespncExtRefByShipToParty AS CorrespncExtRefByShipToParty,
  SalesOrder.BusinessSolutionOrder AS BusinessSolutionOrder,
  SalesOrder.ReferenceSDDocument AS ReferenceSDDocument,
  SalesOrder.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
  SalesOrder.SDDocumentReason AS SDDocumentReason,
  SalesOrder.SalesOrderDate AS SalesOrderDate,
  SalesOrder.RequestedDeliveryDate AS RequestedDeliveryDate,
  SalesOrder.PricingDate AS PricingDate,
  SalesOrder.ServicesRenderedDate AS ServicesRenderedDate,
  SalesOrder.BillingDocumentDate AS BillingDocumentDate,
  SalesOrder.TotalNetAmount AS TotalNetAmount,
  SalesOrder.TransactionCurrency AS TransactionCurrency,
  SalesOrder.DeliveryDateTypeRule AS DeliveryDateTypeRule,
  SalesOrder.ShippingCondition AS ShippingCondition,
  SalesOrder.CompleteDeliveryIsDefined AS CompleteDeliveryIsDefined,
  SalesOrder.SlsDocIsRlvtForProofOfDeliv AS SlsDocIsRlvtForProofOfDeliv,
  SalesOrder.ShippingType AS ShippingType,
  SalesOrder.ReceivingPoint AS ReceivingPoint,
  SalesOrder.IncotermsClassification AS IncotermsClassification,
  SalesOrder.IncotermsVersion AS IncotermsVersion,
  SalesOrder.IncotermsLocation1 AS IncotermsLocation1,
  SalesOrder.IncotermsLocation2 AS IncotermsLocation2,
  SalesOrder.SDPricingProcedure AS SDPricingProcedure,
  SalesOrder.CustomerPriceGroup AS CustomerPriceGroup,
  SalesOrder.PriceListType AS PriceListType,
  SalesOrder.FixedValueDate AS FixedValueDate,
  SalesOrder.TaxDepartureCountry AS TaxDepartureCountry,
  SalesOrder.VATRegistrationCountry AS VATRegistrationCountry,
  SalesOrder.IsEUTriangularDeal AS IsEUTriangularDeal,
  SalesOrder.CustomerPaymentTerms AS CustomerPaymentTerms,
  SalesOrder.PaymentMethod AS PaymentMethod,
  SalesOrder.BillingCompanyCode AS BillingCompanyCode,
  SalesOrder.ControllingArea AS ControllingArea,
  SalesOrder.CustomerAccountAssignmentGroup AS CustomerAccountAssignmentGroup,
  SalesOrder.AssignmentReference AS AssignmentReference,
  SalesOrder.AccountingDocExternalReference AS AccountingDocExternalReference,
  SalesOrder.CustomerCreditAccount AS CustomerCreditAccount,
  SalesOrder.HeaderBillingBlockReason AS HeaderBillingBlockReason,
  SalesOrder.DeliveryBlockReason AS DeliveryBlockReason,
  SalesOrder.SalesOrderApprovalReason AS SalesOrderApprovalReason,
  SalesOrder.SlsContrAutoAssgmtIDForSlsOrd AS SlsContrAutoAssgmtIDForSlsOrd,
  SalesOrder.CustomerGroup AS CustomerGroup,
  SalesOrder.AdditionalCustomerGroup1 AS AdditionalCustomerGroup1,
  SalesOrder.AdditionalCustomerGroup2 AS AdditionalCustomerGroup2,
  SalesOrder.AdditionalCustomerGroup3 AS AdditionalCustomerGroup3,
  SalesOrder.AdditionalCustomerGroup4 AS AdditionalCustomerGroup4,
  SalesOrder.AdditionalCustomerGroup5 AS AdditionalCustomerGroup5,
  cast( '' as vdm_sdoc_crdt_chk_is_tb_dsbld ) AS CreditCheckIsToBeDisabled,
  SalesOrder.OverallSDProcessStatus AS OverallSDProcessStatus,
  SalesOrder.OverallPurchaseConfStatus AS OverallPurchaseConfStatus,
  SalesOrder.OverallDeliveryBlockStatus AS OverallDeliveryBlockStatus,
  SalesOrder.OverallBillingBlockStatus AS OverallBillingBlockStatus,
  SalesOrder.OverallDeliveryStatus AS OverallDeliveryStatus,
  SalesOrder.TotalCreditCheckStatus AS TotalCreditCheckStatus,
  SalesOrder.OverallSDDocumentRejectionSts AS OverallSDDocumentRejectionSts,
  SalesOrder.TotalBlockStatus AS TotalBlockStatus,
  SalesOrder.HdrGeneralIncompletionStatus AS HdrGeneralIncompletionStatus,
  SalesOrder.OvrlItmGeneralIncompletionSts AS OvrlItmGeneralIncompletionSts,
  SalesOrder.OverallSDDocReferenceStatus AS OverallSDDocReferenceStatus,
  SalesOrder.SalesDocApprovalStatus AS SalesDocApprovalStatus,
  SalesOrder.OverallChmlCmplncStatus AS OverallChmlCmplncStatus,
  SalesOrder.OverallDangerousGoodsStatus AS OverallDangerousGoodsStatus,
  SalesOrder.OverallSafetyDataSheetStatus AS OverallSafetyDataSheetStatus,
  SalesOrder.OverallTrdCmplncEmbargoSts AS OverallTrdCmplncEmbargoSts,
  SalesOrder.OvrlTrdCmplncSnctndListChkSts AS OvrlTrdCmplncSnctndListChkSts,
  SalesOrder.OvrlTrdCmplncLegalCtrlChkSts AS OvrlTrdCmplncLegalCtrlChkSts,
  SalesOrder.SalesOrderDownPaymentStatus AS SalesOrderDownPaymentStatus,
  SalesOrder.OverallOrdReltdBillgStatus AS OverallOrdReltdBillgStatus
FROM R_SalesOrderTP AS SalesOrder
LEFT OUTER JOIN I_SlsOrganizationDistrChnl AS _SlsOrganizationDistrChnl ON SalesOrganization = _SlsOrganizationDistrChnl.SalesOrganization AND DistributionChannel = _SlsOrganizationDistrChnl.DistributionChannel  -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON SalesOrder = _Extension.SalesDocument  -- association [1]
LEFT OUTER JOIN A_SalesOrderItemSimulation_2 AS _Item ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN A_SalesOrderPartnerSimln_2 AS _Partner ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN A_SlsOrdPricingElementSimln_2 AS _PricingElement ON /* condition not available in parsed metadata */  -- association [0..*]
;