A_CustomerReturnSimulation_2

DDL: A_CUSTOMERRETURNSIMULATION_2 Type: view_entity CONSUMPTION Package: P_SLSCRET_INTEGRATION_ODATA

Returns Order Header

A_CustomerReturnSimulation_2 is a Consumption CDS View that provides data about "Returns Order Header" in SAP S/4HANA. It reads from 1 data source (R_CustomerReturnTP) and exposes 68 fields with key field CustomerReturn. It has 3 associations to related views. It is exposed through 1 OData service (API_CUSTOMERRETURNSIMULATION). Part of development package P_SLSCRET_INTEGRATION_ODATA.

Data Sources (1)

SourceAliasJoin Type
R_CustomerReturnTP CustomerReturn from

Associations (3)

CardinalityTargetAliasCondition
[0..*] A_CustRetItemSimulation_2 _Item
[0..*] A_CustRetPartnerSimulation_2 _Partner
[0..*] A_CustRetPrcgElmntSimulation_2 _PricingElement

Annotations (11)

NameValueLevelField
VDM.lifecycle.contract.type #PUBLIC_REMOTE_API view
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
EndUserText.label Returns Order Header view
Metadata.ignorePropagatedAnnotations true view
OData.entityType.name CustomerReturn_Type view
ObjectModel.representativeKey CustomerReturn view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.query.implementedBy ABAP:CL_SD_RETURN_SIMLN_RAP_V4_QRY view

OData Services (1)

ServiceBindingVersionContractRelease
API_CUSTOMERRETURNSIMULATION API_CUSTOMERRETURNSIMULATION V4 C2 C1

Fields (68)

KeyFieldSource TableSource FieldDescription
KEY CustomerReturn R_CustomerReturnTP CustomerReturn
CustomerReturnType R_CustomerReturnTP CustomerReturnType
SoldToParty R_CustomerReturnTP SoldToParty Sold-to Party
SalesOrganization R_CustomerReturnTP SalesOrganization Sales Organization
DistributionChannel R_CustomerReturnTP DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision R_CustomerReturnTP OrganizationDivision Org. Division
SalesOffice R_CustomerReturnTP SalesOffice Sales Office
SalesGroup R_CustomerReturnTP SalesGroup Sales Group
SalesDistrict R_CustomerReturnTP SalesDistrict Sales District
CreatedByUser R_CustomerReturnTP CreatedByUser User Name
CreationDate R_CustomerReturnTP CreationDate Time Stamp
CreationTime R_CustomerReturnTP CreationTime Time of Change
LastChangeDateTime R_CustomerReturnTP LastChangeDateTime Timestamp
PurchaseOrderByCustomer R_CustomerReturnTP PurchaseOrderByCustomer Purchase Order Number
PurchaseOrderByShipToParty R_CustomerReturnTP PurchaseOrderByShipToParty
CustomerPurchaseOrderType R_CustomerReturnTP CustomerPurchaseOrderType
CustPurOrdTypeByShipToParty R_CustomerReturnTP CustPurOrdTypeByShipToParty
CustomerPurchaseOrderDate R_CustomerReturnTP CustomerPurchaseOrderDate Purchase Order Date
CorrespncExternalReference R_CustomerReturnTP CorrespncExternalReference Your Reference
CorrespncExtRefByShipToParty R_CustomerReturnTP CorrespncExtRefByShipToParty
BusinessSolutionOrder R_CustomerReturnTP BusinessSolutionOrder Solution Order
ReferenceSDDocument R_CustomerReturnTP ReferenceSDDocument Reference Doc.
ReferenceSDDocumentCategory ReferenceSDDocumentCategory Prec.Doc.Categ.
SDDocumentReason R_CustomerReturnTP SDDocumentReason Order Reason
CustomerGroup R_CustomerReturnTP CustomerGroup Customer Group
AdditionalCustomerGroup1 R_CustomerReturnTP AdditionalCustomerGroup1 Customer Grp 1
AdditionalCustomerGroup2 R_CustomerReturnTP AdditionalCustomerGroup2 Customer Grp 2
AdditionalCustomerGroup3 R_CustomerReturnTP AdditionalCustomerGroup3 Customer Grp 3
AdditionalCustomerGroup4 R_CustomerReturnTP AdditionalCustomerGroup4 Customer Grp 4
AdditionalCustomerGroup5 R_CustomerReturnTP AdditionalCustomerGroup5 Customer Grp 5
CustomerReturnDate R_CustomerReturnTP CustomerReturnDate
ServicesRenderedDate R_CustomerReturnTP ServicesRenderedDate Services Rendered Date
RequestedDeliveryDate R_CustomerReturnTP RequestedDeliveryDate Requested Delivery Date
PricingDate R_CustomerReturnTP PricingDate Pricing Date
BillingDocumentDate R_CustomerReturnTP BillingDocumentDate Billing Date
TotalNetAmount R_CustomerReturnTP TotalNetAmount Total Net Amount
TransactionCurrency R_CustomerReturnTP TransactionCurrency Transaction Currency
ShippingType R_CustomerReturnTP ShippingType Shipping Type
BillingCompanyCode R_CustomerReturnTP BillingCompanyCode CCodeToBeBilled
ControllingArea R_CustomerReturnTP ControllingArea Controlling Area
AccountingDocExternalReference R_CustomerReturnTP AccountingDocExternalReference
CustomerAccountAssignmentGroup R_CustomerReturnTP CustomerAccountAssignmentGroup AccAssmtGrpCust
AssignmentReference R_CustomerReturnTP AssignmentReference Assignment Reference
SDPricingProcedure R_CustomerReturnTP SDPricingProcedure Pric. Procedure
CustomerPriceGroup R_CustomerReturnTP CustomerPriceGroup CustPrice Group
PriceListType R_CustomerReturnTP PriceListType Price List Tp.
ShippingCondition R_CustomerReturnTP ShippingCondition Shipping Conditions
TaxDepartureCountry R_CustomerReturnTP TaxDepartureCountry Tx Dep Ctry/Reg
VATRegistrationCountry R_CustomerReturnTP VATRegistrationCountry CtryRgnSlsTxNo.
FixedValueDate R_CustomerReturnTP FixedValueDate Fixed Val. Date
HeaderBillingBlockReason R_CustomerReturnTP HeaderBillingBlockReason Billing Block
DeliveryBlockReason R_CustomerReturnTP DeliveryBlockReason Delivery Block
IncotermsClassification R_CustomerReturnTP IncotermsClassification Incoterms
IncotermsVersion R_CustomerReturnTP IncotermsVersion Inco. Version
IncotermsLocation1 R_CustomerReturnTP IncotermsLocation1 Inco. Location1
IncotermsLocation2 R_CustomerReturnTP IncotermsLocation2 Inco. Location2
CustomerPaymentTerms R_CustomerReturnTP CustomerPaymentTerms Pyt Terms
PaymentMethod R_CustomerReturnTP PaymentMethod Pymt Meth.
CustomerReturnApprovalReason R_CustomerReturnTP CustomerReturnApprovalReason
HdrGeneralIncompletionStatus R_CustomerReturnTP HdrGeneralIncompletionStatus
OvrlItmGeneralIncompletionSts R_CustomerReturnTP OvrlItmGeneralIncompletionSts
OverallSDDocReferenceStatus R_CustomerReturnTP OverallSDDocReferenceStatus
OverallSDDocumentRejectionSts R_CustomerReturnTP OverallSDDocumentRejectionSts
OverallSDProcessStatus R_CustomerReturnTP OverallSDProcessStatus
SalesDocApprovalStatus R_CustomerReturnTP SalesDocApprovalStatus
_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_CustomerReturnSimulation_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_CustomerReturnSimulation_2 AS
SELECT
  CustomerReturn.CustomerReturn AS CustomerReturn,
  CustomerReturn.CustomerReturnType AS CustomerReturnType,
  CustomerReturn.SoldToParty AS SoldToParty,
  CustomerReturn.SalesOrganization AS SalesOrganization,
  CustomerReturn.DistributionChannel AS DistributionChannel,
  CustomerReturn.OrganizationDivision AS OrganizationDivision,
  CustomerReturn.SalesOffice AS SalesOffice,
  CustomerReturn.SalesGroup AS SalesGroup,
  CustomerReturn.SalesDistrict AS SalesDistrict,
  CustomerReturn.CreatedByUser AS CreatedByUser,
  CustomerReturn.CreationDate AS CreationDate,
  CustomerReturn.CreationTime AS CreationTime,
  CustomerReturn.LastChangeDateTime AS LastChangeDateTime,
  CustomerReturn.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
  CustomerReturn.PurchaseOrderByShipToParty AS PurchaseOrderByShipToParty,
  CustomerReturn.CustomerPurchaseOrderType AS CustomerPurchaseOrderType,
  CustomerReturn.CustPurOrdTypeByShipToParty AS CustPurOrdTypeByShipToParty,
  CustomerReturn.CustomerPurchaseOrderDate AS CustomerPurchaseOrderDate,
  CustomerReturn.CorrespncExternalReference AS CorrespncExternalReference,
  CustomerReturn.CorrespncExtRefByShipToParty AS CorrespncExtRefByShipToParty,
  CustomerReturn.BusinessSolutionOrder AS BusinessSolutionOrder,
  CustomerReturn.ReferenceSDDocument AS ReferenceSDDocument,
  ReferenceSDDocumentCategory,
  CustomerReturn.SDDocumentReason AS SDDocumentReason,
  CustomerReturn.CustomerGroup AS CustomerGroup,
  CustomerReturn.AdditionalCustomerGroup1 AS AdditionalCustomerGroup1,
  CustomerReturn.AdditionalCustomerGroup2 AS AdditionalCustomerGroup2,
  CustomerReturn.AdditionalCustomerGroup3 AS AdditionalCustomerGroup3,
  CustomerReturn.AdditionalCustomerGroup4 AS AdditionalCustomerGroup4,
  CustomerReturn.AdditionalCustomerGroup5 AS AdditionalCustomerGroup5,
  CustomerReturn.CustomerReturnDate AS CustomerReturnDate,
  CustomerReturn.ServicesRenderedDate AS ServicesRenderedDate,
  CustomerReturn.RequestedDeliveryDate AS RequestedDeliveryDate,
  CustomerReturn.PricingDate AS PricingDate,
  CustomerReturn.BillingDocumentDate AS BillingDocumentDate,
  CustomerReturn.TotalNetAmount AS TotalNetAmount,
  CustomerReturn.TransactionCurrency AS TransactionCurrency,
  CustomerReturn.ShippingType AS ShippingType,
  CustomerReturn.BillingCompanyCode AS BillingCompanyCode,
  CustomerReturn.ControllingArea AS ControllingArea,
  CustomerReturn.AccountingDocExternalReference AS AccountingDocExternalReference,
  CustomerReturn.CustomerAccountAssignmentGroup AS CustomerAccountAssignmentGroup,
  CustomerReturn.AssignmentReference AS AssignmentReference,
  CustomerReturn.SDPricingProcedure AS SDPricingProcedure,
  CustomerReturn.CustomerPriceGroup AS CustomerPriceGroup,
  CustomerReturn.PriceListType AS PriceListType,
  CustomerReturn.ShippingCondition AS ShippingCondition,
  CustomerReturn.TaxDepartureCountry AS TaxDepartureCountry,
  CustomerReturn.VATRegistrationCountry AS VATRegistrationCountry,
  CustomerReturn.FixedValueDate AS FixedValueDate,
  CustomerReturn.HeaderBillingBlockReason AS HeaderBillingBlockReason,
  CustomerReturn.DeliveryBlockReason AS DeliveryBlockReason,
  CustomerReturn.IncotermsClassification AS IncotermsClassification,
  CustomerReturn.IncotermsVersion AS IncotermsVersion,
  CustomerReturn.IncotermsLocation1 AS IncotermsLocation1,
  CustomerReturn.IncotermsLocation2 AS IncotermsLocation2,
  CustomerReturn.CustomerPaymentTerms AS CustomerPaymentTerms,
  CustomerReturn.PaymentMethod AS PaymentMethod,
  CustomerReturn.CustomerReturnApprovalReason AS CustomerReturnApprovalReason,
  CustomerReturn.HdrGeneralIncompletionStatus AS HdrGeneralIncompletionStatus,
  CustomerReturn.OvrlItmGeneralIncompletionSts AS OvrlItmGeneralIncompletionSts,
  CustomerReturn.OverallSDDocReferenceStatus AS OverallSDDocReferenceStatus,
  CustomerReturn.OverallSDDocumentRejectionSts AS OverallSDDocumentRejectionSts,
  CustomerReturn.OverallSDProcessStatus AS OverallSDProcessStatus,
  CustomerReturn.SalesDocApprovalStatus AS SalesDocApprovalStatus
FROM R_CustomerReturnTP AS CustomerReturn
LEFT OUTER JOIN A_CustRetItemSimulation_2 AS _Item ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN A_CustRetPartnerSimulation_2 AS _Partner ON /* condition not available in parsed metadata */  -- association [0..*]
LEFT OUTER JOIN A_CustRetPrcgElmntSimulation_2 AS _PricingElement ON /* condition not available in parsed metadata */  -- association [0..*]
;