C_CustomerReturnOPg
Returns Order Object Page
C_CustomerReturnOPg is a Consumption CDS View that provides data about "Returns Order Object Page" in SAP S/4HANA. It reads from 1 data source (I_CustomerReturn) and exposes 69 fields with key field CustomerReturn. It has 17 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CustomerReturn | CustomerReturn | from |
Associations (17)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | C_CustomerReturnItemOPg | _CustomerReturnItem | $projection.CustomerReturn = _CustomerReturnItem.CustomerReturn |
| [0..*] | C_CustomerReturnRefDoc | _ReturnRefDoc | $projection.CustomerReturn = _ReturnRefDoc.CustomerReturn and $projection.SalesOrganization = _ReturnRefDoc.SalesOrganization and $projection.DistributionChannel = _ReturnRefDoc.DistributionChannel and $projection.OrganizationDivision = _ReturnRefDoc.OrganizationDivision |
| [0..*] | C_CustomerReturnRefDocItem | _ReturnRefDocItem | $projection.CustomerReturn = _ReturnRefDocItem.CustomerReturn and $projection.SalesOrganization = _ReturnRefDocItem.SalesOrganization and $projection.DistributionChannel = _ReturnRefDocItem.DistributionChannel and $projection.OrganizationDivision = _ReturnRefDocItem.OrganizationDivision |
| [0..*] | C_CustomerReturnItemRefund | _CustRetItemRefund | $projection.CustomerReturn = _CustRetItemRefund.CustomerReturn |
| [0..*] | C_InternalContacts | _InternalContacts | $projection.CustomerReturn = _InternalContacts.SDDocument |
| [0..*] | C_ExternalContacts | _ExternalContacts | $projection.CustomerReturn = _ExternalContacts.SDDocument |
| [0..*] | C_SDDocumentCustomer | _BusinessPartners | $projection.CustomerReturn = _BusinessPartners.SDDocument |
| [0..1] | I_CustReturnSubsqntProcgSts | _ReldForSubsqntProcgSts | $projection.CustomerReturn = _ReldForSubsqntProcgSts.CustomerReturn |
| [0..*] | C_SlsDocPaymentPlanItem | _PaymentPlanItemDetails | $projection.CustomerReturn = _PaymentPlanItemDetails.SalesDocument |
| [0..1] | C_SDDocumentCustomerVH | _ShipToPartyVH | $projection.ShipToParty = _ShipToPartyVH.Customer and $projection.addressid = _ShipToPartyVH.AddressID |
| [0..1] | C_EmployeeValueHelp | _EmplResp_VH | $projection.ResponsibleEmployee = _EmplResp_VH.PersonnelNumber |
| [0..*] | I_SDDocumentCategoryText | _SDDocumentCategoryText | $projection.ReferenceSDDocumentCategory = _SDDocumentCategoryText.SDDocumentCategory |
| [0..*] | I_SalesDocumentTypeText | _SalesDocumentTypeText | $projection.CustomerReturnType = _SalesDocumentTypeText.SalesDocumentType |
| [0..*] | I_OverallSDDocumentRjcnStatusT | _OverallSDDocumentRejectionSts | $projection.OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts |
| [0..*] | I_ShippingConditionText | _ShippingConditionText | $projection.ShippingCondition = _ShippingConditionText.ShippingCondition |
| [0..1] | E_SalesDocumentBasic | _Extension | $projection.CustomerReturn = _Extension.SalesDocument |
| [0..*] | I_SDDocumentIncompletionLog | _IncompletionLog | $projection.CustomerReturn = _IncompletionLog.SDDocument |
Annotations (18)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Returns Order Object Page | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| AbapCatalog.sqlViewName | CCUSTRETOPG | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| Consumption.semanticObject | CustomerReturn | view | |
| Search.searchable | false | view | |
| UI.headerInfo.typeName | Customer Return | view | |
| UI.headerInfo.typeNamePlural | Customer Returns | view | |
| UI.headerInfo.title.type | #STANDARD | view | |
| UI.headerInfo.title.value | CustomerReturn | view |
Fields (69)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | I_CustomerReturn | CustomerReturn | |
| CustomerReturnType | I_CustomerReturn | CustomerReturnType | ||
| RetsMgmtIsActive | _CustomerReturnType | RetsMgmtIsActive | ||
| ReferenceSDDocumentendasSalesDocument | ||||
| ReferenceSDDocumentendasBillingDocument | ||||
| ReferenceSDDocumentCategory | I_CustomerReturn | ReferenceSDDocumentCategory | Prec.Doc.Categ. | |
| RetsMgmtLogProcgStatus | ||||
| RetsMgmtLogProcgStatusDesc | ||||
| RetsMgmtCompnProcgStatus | ||||
| RetsMgmtCompnProcgStatusDesc | ||||
| RetsMgmtProcessingStatus | ||||
| RetsMgmtProcessingStatusDesc | ||||
| SalesDocApprovalStatus | I_CustomerReturn | SalesDocApprovalStatus | ||
| SalesDocApprovalStatusDesc | ||||
| SoldToParty | SoldToParty | Sold-to Party | ||
| SoldToPartyName | ||||
| ShipToParty | ||||
| ShippingCondition | I_CustomerReturn | ShippingCondition | Shipping Conditions | |
| AddressID | ||||
| AddressPersonID | ||||
| ShipToPartyName | ||||
| DeliveryAddressPostalCode | ||||
| ShipToPartyCityName | ||||
| ShipToPartyCountry | ||||
| DeliveryAddressStreetName | ||||
| DeliveryAddressHouseNumber | ||||
| ShipToPtyHouseNmbrSuplmntText | ||||
| LastChangeDate | I_CustomerReturn | LastChangeDate | Time Stamp | |
| LastChangeDateTime | I_CustomerReturn | LastChangeDateTime | Timestamp | |
| CreatedByUser | I_CustomerReturn | CreatedByUser | User Name | |
| CustomerReturnDate | I_CustomerReturn | CustomerReturnDate | Document Date | |
| PricingDate | I_CustomerReturn | PricingDate | Pricing Date | |
| ReturnsOrderReason | ||||
| SDDocumentReasonText | ||||
| PurchaseOrderByCustomer | I_CustomerReturn | PurchaseOrderByCustomer | Purchase Order Number | |
| SDDocumentCategoryName | ||||
| ReferenceSDDocument | I_CustomerReturn | ReferenceSDDocument | Reference Doc. | |
| DivisionName1astxt_vtrberasSalesAreaDesc | ||||
| SalesOrganization | I_CustomerReturn | SalesOrganization | Sales Organization | |
| DistributionChannel | I_CustomerReturn | DistributionChannel | RefDistCh-Cust/Mat. | |
| OrganizationDivision | I_CustomerReturn | OrganizationDivision | Org. Division | |
| SalesOffice | I_CustomerReturn | SalesOffice | Sales Office | |
| SalesGroup | I_CustomerReturn | SalesGroup | Sales Group | |
| ResponsibleEmployee | ||||
| ResponsibleEmployeeName | ||||
| OverallSDDocumentRejectionSts | I_CustomerReturn | OverallSDDocumentRejectionSts | ||
| TotalNetAmount | I_CustomerReturn | TotalNetAmount | Total Net Amount | |
| TransactionCurrency | I_CustomerReturn | TransactionCurrency | Transaction Currency | |
| LinkedSAPObjectKey | ||||
| OvrlReldForSubsqntProcgSts | _ReldForSubsqntProcgSts | OvrlReldForSubsqntProcgSts | ||
| ReturnActionIsEnabled | ||||
| IsValid | ||||
| _CustomerReturnItem | _CustomerReturnItem | |||
| _ShipToPartyVH | _ShipToPartyVH | |||
| _EmplResp_VH | _EmplResp_VH | |||
| _SDDocumentCategoryText | _SDDocumentCategoryText | |||
| _InternalContacts | _InternalContacts | |||
| _ExternalContacts | _ExternalContacts | |||
| _BusinessPartners | _BusinessPartners | |||
| _CustRetItemRefund | _CustRetItemRefund | |||
| _ReldForSubsqntProcgSts | _ReldForSubsqntProcgSts | |||
| _SalesDocumentTypeText | _SalesDocumentTypeText | |||
| _OverallSDDocumentRejectionSts | _OverallSDDocumentRejectionSts | |||
| _PaymentPlanItemDetails | _PaymentPlanItemDetails | |||
| _TransactionCurrency | I_CustomerReturn | _TransactionCurrency | ||
| _ReturnRefDoc | _ReturnRefDoc | |||
| _ReturnRefDocItem | _ReturnRefDocItem | |||
| _IncompletionLog | _IncompletionLog | |||
| _ShippingConditionText | _ShippingConditionText |
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 C_CustomerReturnOPg.
-- 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 C_CustomerReturnOPg AS
SELECT
CustomerReturn.CustomerReturn AS CustomerReturn,
CustomerReturn.CustomerReturnType AS CustomerReturnType,
_CustomerReturnType.RetsMgmtIsActive AS RetsMgmtIsActive,
case when CustomerReturn.ReferenceSDDocumentCategory = 'C' then CustomerReturn.ReferenceSDDocument end as SalesDocument AS ReferenceSDDocumentendasSalesDocument,
case when CustomerReturn.ReferenceSDDocumentCategory = 'M' then CustomerReturn.ReferenceSDDocument end as BillingDocument AS ReferenceSDDocumentendasBillingDocument,
CustomerReturn.ReferenceSDDocumentCategory AS ReferenceSDDocumentCategory,
cast('' as return_log_procg_status) AS RetsMgmtLogProcgStatus,
cast('' as val_text) AS RetsMgmtLogProcgStatusDesc,
cast('' as msr_fin_status) AS RetsMgmtCompnProcgStatus,
cast('' as val_text) AS RetsMgmtCompnProcgStatusDesc,
cast('' as msr_proc_status) AS RetsMgmtProcessingStatus,
cast('' as val_text) AS RetsMgmtProcessingStatusDesc,
CustomerReturn.SalesDocApprovalStatus AS SalesDocApprovalStatus,
CustomerReturn._SalesDocApprovalStatus._Text[1: Language=$session.system_language].SalesDocApprovalStatusDesc AS SalesDocApprovalStatusDesc,
SoldToParty,
cast('' as ad_namtext ) AS SoldToPartyName,
cast(_Partner[PartnerFunction='WE'].Customer as kunwe) AS ShipToParty,
CustomerReturn.ShippingCondition AS ShippingCondition,
_Partner[PartnerFunction='WE'].AddressID AS AddressID,
_Partner[PartnerFunction='WE'].AddressPersonID AS AddressPersonID,
cast('' as ad_namtext ) AS ShipToPartyName,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.PostalCode AS DeliveryAddressPostalCode,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.CityName AS ShipToPartyCityName,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.Country AS ShipToPartyCountry,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.StreetName AS DeliveryAddressStreetName,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.HouseNumber AS DeliveryAddressHouseNumber,
_Partner[PartnerFunction='WE']._OrgNamePostalAddress.HouseNumberSupplementText AS ShipToPtyHouseNmbrSuplmntText,
CustomerReturn.LastChangeDate AS LastChangeDate,
CustomerReturn.LastChangeDateTime AS LastChangeDateTime,
CustomerReturn.CreatedByUser AS CreatedByUser,
CustomerReturn.CustomerReturnDate AS CustomerReturnDate,
CustomerReturn.PricingDate AS PricingDate,
cast (CustomerReturn.SDDocumentReason as returns_order_reason) AS ReturnsOrderReason,
_SDDocumentReason._Text[1: Language=$session.system_language].SDDocumentReasonText AS SDDocumentReasonText,
CustomerReturn.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
_SDDocumentCategoryText[1: Language=$session.system_language].SDDocumentCategoryName AS SDDocumentCategoryName,
CustomerReturn.ReferenceSDDocument AS ReferenceSDDocument,
cast(concat_with_space( concat( concat( CustomerReturn._SalesOrganization._Text[1: Language=$session.system_language].SalesOrganizationName, concat_with_space(',',CustomerReturn._DistributionChannel._Text[1: Language=$session.system_language].DistributionChannelName,1) ), ',' ), CustomerReturn._OrganizationDivision._Text[1: Language=$session.system_language].DivisionName ,1) as txt_vtrber) as SalesAreaDesc AS DivisionName1astxt_vtrberasSalesAreaDesc,
CustomerReturn.SalesOrganization AS SalesOrganization,
CustomerReturn.DistributionChannel AS DistributionChannel,
CustomerReturn.OrganizationDivision AS OrganizationDivision,
CustomerReturn.SalesOffice AS SalesOffice,
CustomerReturn.SalesGroup AS SalesGroup,
cast(_Partner[PartnerFunction='ZM'].Personnel as resp_empl preserving type ) AS ResponsibleEmployee,
cast('' as ad_namtext ) AS ResponsibleEmployeeName,
CustomerReturn.OverallSDDocumentRejectionSts AS OverallSDDocumentRejectionSts,
CustomerReturn.TotalNetAmount AS TotalNetAmount,
CustomerReturn.TransactionCurrency AS TransactionCurrency,
cast('' as objky) AS LinkedSAPObjectKey,
_ReldForSubsqntProcgSts.OvrlReldForSubsqntProcgSts AS OvrlReldForSubsqntProcgSts,
'' AS ReturnActionIsEnabled,
cast('' as boolean preserving type) AS IsValid,
CustomerReturn._TransactionCurrency AS _TransactionCurrency
FROM I_CustomerReturn AS CustomerReturn
LEFT OUTER JOIN C_CustomerReturnItemOPg AS _CustomerReturnItem ON CustomerReturn = _CustomerReturnItem.CustomerReturn -- association [0..*]
LEFT OUTER JOIN C_CustomerReturnRefDoc AS _ReturnRefDoc ON CustomerReturn = _ReturnRefDoc.CustomerReturn AND SalesOrganization = _ReturnRefDoc.SalesOrganization AND DistributionChannel = _ReturnRefDoc.DistributionChannel AND OrganizationDivision = _ReturnRefDoc.OrganizationDivision -- association [0..*]
LEFT OUTER JOIN C_CustomerReturnRefDocItem AS _ReturnRefDocItem ON CustomerReturn = _ReturnRefDocItem.CustomerReturn AND SalesOrganization = _ReturnRefDocItem.SalesOrganization AND DistributionChannel = _ReturnRefDocItem.DistributionChannel AND OrganizationDivision = _ReturnRefDocItem.OrganizationDivision -- association [0..*]
LEFT OUTER JOIN C_CustomerReturnItemRefund AS _CustRetItemRefund ON CustomerReturn = _CustRetItemRefund.CustomerReturn -- association [0..*]
LEFT OUTER JOIN C_InternalContacts AS _InternalContacts ON CustomerReturn = _InternalContacts.SDDocument -- association [0..*]
LEFT OUTER JOIN C_ExternalContacts AS _ExternalContacts ON CustomerReturn = _ExternalContacts.SDDocument -- association [0..*]
LEFT OUTER JOIN C_SDDocumentCustomer AS _BusinessPartners ON CustomerReturn = _BusinessPartners.SDDocument -- association [0..*]
LEFT OUTER JOIN I_CustReturnSubsqntProcgSts AS _ReldForSubsqntProcgSts ON CustomerReturn = _ReldForSubsqntProcgSts.CustomerReturn -- association [0..1]
LEFT OUTER JOIN C_SlsDocPaymentPlanItem AS _PaymentPlanItemDetails ON CustomerReturn = _PaymentPlanItemDetails.SalesDocument -- association [0..*]
LEFT OUTER JOIN C_SDDocumentCustomerVH AS _ShipToPartyVH ON ShipToParty = _ShipToPartyVH.Customer AND addressid = _ShipToPartyVH.AddressID -- association [0..1]
LEFT OUTER JOIN C_EmployeeValueHelp AS _EmplResp_VH ON ResponsibleEmployee = _EmplResp_VH.PersonnelNumber -- association [0..1]
LEFT OUTER JOIN I_SDDocumentCategoryText AS _SDDocumentCategoryText ON ReferenceSDDocumentCategory = _SDDocumentCategoryText.SDDocumentCategory -- association [0..*]
LEFT OUTER JOIN I_SalesDocumentTypeText AS _SalesDocumentTypeText ON CustomerReturnType = _SalesDocumentTypeText.SalesDocumentType -- association [0..*]
LEFT OUTER JOIN I_OverallSDDocumentRjcnStatusT AS _OverallSDDocumentRejectionSts ON OverallSDDocumentRejectionSts = _OverallSDDocumentRejectionSts.OverallSDDocumentRejectionSts -- association [0..*]
LEFT OUTER JOIN I_ShippingConditionText AS _ShippingConditionText ON ShippingCondition = _ShippingConditionText.ShippingCondition -- association [0..*]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON CustomerReturn = _Extension.SalesDocument -- association [0..1]
LEFT OUTER JOIN I_SDDocumentIncompletionLog AS _IncompletionLog ON CustomerReturn = _IncompletionLog.SDDocument -- association [0..*]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA