C_Customerreturnfs
Returns Order Fact Sheet
C_Customerreturnfs is a Consumption CDS View that provides data about "Returns Order Fact Sheet" in SAP S/4HANA. It reads from 1 data source (I_CustomerReturn) and exposes 46 fields with key field CustomerReturn. It has 8 associations to related views. Part of development package ODATA_SD_RETURN.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_CustomerReturn | Return | from |
Associations (8)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | C_Q2CCustomerQuickView | _SoldToPartyVH | $projection.SoldToParty = _SoldToPartyVH.Customer |
| [0..*] | C_Customerreturnitemfs | _Item | $projection.CustomerReturn = _Item.CustomerReturn |
| [0..*] | C_SDDocumentPartnerCard | _SDDocumentPartnerCard | $projection.CustomerReturn = _SDDocumentPartnerCard.SDDocument and _SDDocumentPartnerCard.SDDocumentItem = '000000' |
| [0..*] | C_SlsDocPaymentPlanItem | _SlsDocPaymentPlanItem | $projection.CustomerReturn = _SlsDocPaymentPlanItem.SalesDocument |
| [0..1] | I_SDDocumentCustomer | _ShipToParty | $projection.CustomerReturn = _ShipToParty.SDDocument and _ShipToParty.PartnerFunction = 'WE' |
| [0..1] | I_SDDocumentPersonnel | _EmployeeResponsible | $projection.CustomerReturn = _EmployeeResponsible.SDDocument and _EmployeeResponsible.PartnerFunction = 'ZM' |
| [0..1] | I_SalesDocumentPartner | _ResponsibleEmployee | $projection.CustomerReturn = _ResponsibleEmployee.SalesDocument and _ResponsibleEmployee.PartnerFunction = 'ZM' |
| [0..1] | E_SalesDocumentBasic | _Extension | $projection.CustomerReturn = _Extension.SalesDocument |
Annotations (16)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | CCUSTRETURNFS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view | |
| VDM.viewType | #CONSUMPTION | view | |
| EndUserText.label | Returns Order Fact Sheet | view | |
| ObjectModel.compositionRoot | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #XXL | view | |
| Search.searchable | true | view | |
| UI.headerInfo.typeName | Customer Return | view | |
| UI.headerInfo.typeNamePlural | Customer Returns | view | |
| UI.headerInfo.title.type | #STANDARD | view | |
| UI.headerInfo.title.value | SalesDocumentTypeName | view |
Fields (46)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | I_CustomerReturn | CustomerReturn | |
| SalesDocumentTypeName | Sales Document Type Name | |||
| CustomerReturnType | I_CustomerReturn | CustomerReturnType | ||
| SoldToParty | I_CustomerReturn | SoldToParty | Sold-to Party | |
| SoldToPartyName | ||||
| OverallSDProcessStatus | I_CustomerReturn | OverallSDProcessStatus | ||
| OverallSDDocumentRejectionSts | I_CustomerReturn | OverallSDDocumentRejectionSts | ||
| OverallTotalDeliveryStatus | I_CustomerReturn | OverallTotalDeliveryStatus | ||
| OverallOrdReltdBillgStatus | I_CustomerReturn | OverallOrdReltdBillgStatus | ||
| SalesDocApprovalStatus | I_CustomerReturn | SalesDocApprovalStatus | ||
| int1asCustRetApprvlStsCriticality | ||||
| CustomerReturnApprovalReason | I_CustomerReturn | CustomerReturnApprovalReason | Approval Request Reason | |
| SDApprovalReasonName | ||||
| TotalNetAmount | I_CustomerReturn | TotalNetAmount | Total Net Amount | |
| TransactionCurrency | I_CustomerReturn | TransactionCurrency | Transaction Currency | |
| DivisionName1astxt_vtrberasSalesAreaDesc | ||||
| SalesOrganization | I_CustomerReturn | SalesOrganization | Sales Organization | |
| DistributionChannel | I_CustomerReturn | DistributionChannel | RefDistCh-Cust/Mat. | |
| OrganizationDivision | I_CustomerReturn | OrganizationDivision | Org. Division | |
| ResponsibleEmployee | Responsible Employee | |||
| ResponsibleEmployeeName | ||||
| SDDocumentReason | I_CustomerReturn | SDDocumentReason | Order Reason | |
| CustomerReturnDate | I_CustomerReturn | CustomerReturnDate | Document Date | |
| PurchaseOrderByCustomer | I_CustomerReturn | PurchaseOrderByCustomer | Purchase Order Number | |
| CustomerPurchaseOrderDate | I_CustomerReturn | CustomerPurchaseOrderDate | Purchase Order Date | |
| CreatedByUser | I_CustomerReturn | CreatedByUser | User Name | |
| CreatedByUserDescription | ||||
| CreationDate | I_CustomerReturn | CreationDate | Time Stamp | |
| LastChangedByUser | I_CustomerReturn | LastChangedByUser | User Name | |
| LastChangedByUserDescription | ||||
| ShipToParty | _ShipToParty | Customer | Sold-to Party | |
| ShipToPartyName | ||||
| IsValid | ||||
| _Item | _Item | |||
| _SDDocumentPartnerCard | _SDDocumentPartnerCard | |||
| _SlsDocPaymentPlanItem | _SlsDocPaymentPlanItem | |||
| _SoldToPartyVH | _SoldToPartyVH | |||
| _OverallSDProcessStatus | _OverallSDProcessStatus | |||
| _OverallTotalDeliveryStatus | _OverallTotalDeliveryStatus | |||
| _OverallOrdReltdBillgStatus | _OverallOrdReltdBillgStatus | |||
| _OverallSDDocumentRejectionSts | _OverallSDDocumentRejectionSts | |||
| _SalesDocApprovalStatus | _SalesDocApprovalStatus | |||
| _CustRetApprovalReason | _CustRetApprovalReason | |||
| _ShipToParty | _ShipToParty | |||
| _EmployeeResponsible | _EmployeeResponsible | |||
| _SDDocumentReason | _SDDocumentReason |
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_Customerreturnfs.
-- 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.
-- SQL view name: CCUSTRETURNFS
CREATE VIEW C_Customerreturnfs AS
SELECT
Return.CustomerReturn AS CustomerReturn,
concat_with_space(_CustomerReturnType._Text[1: Language=$session.system_language].SalesDocumentTypeName, ltrim(CustomerReturn, '0'), 1) AS SalesDocumentTypeName,
Return.CustomerReturnType AS CustomerReturnType,
Return.SoldToParty AS SoldToParty,
cast('' as ad_namtext ) AS SoldToPartyName,
Return.OverallSDProcessStatus AS OverallSDProcessStatus,
Return.OverallSDDocumentRejectionSts AS OverallSDDocumentRejectionSts,
Return.OverallTotalDeliveryStatus AS OverallTotalDeliveryStatus,
Return.OverallOrdReltdBillgStatus AS OverallOrdReltdBillgStatus,
Return.SalesDocApprovalStatus AS SalesDocApprovalStatus,
Return.CustomerReturnApprovalReason AS CustomerReturnApprovalReason,
_CustRetApprovalReason._SDApprovalReasonT[1: Language=$session.system_language].SDApprovalReasonName AS SDApprovalReasonName,
Return.TotalNetAmount AS TotalNetAmount,
Return.TransactionCurrency AS TransactionCurrency,
cast( concat_with_space( concat( concat( Return._SalesOrganization._Text[1: Language=$session.system_language].SalesOrganizationName, concat_with_space(',',Return._DistributionChannel._Text[1: Language=$session.system_language].DistributionChannelName,1) ), ',' ), Return._OrganizationDivision._Text[1: Language=$session.system_language].DivisionName ,1) as txt_vtrber) as SalesAreaDesc AS DivisionName1astxt_vtrberasSalesAreaDesc,
Return.SalesOrganization AS SalesOrganization,
Return.DistributionChannel AS DistributionChannel,
Return.OrganizationDivision AS OrganizationDivision,
cast(_ResponsibleEmployee.Personnel as resp_empl preserving type ) AS ResponsibleEmployee,
cast('' as ad_namtext ) AS ResponsibleEmployeeName,
Return.SDDocumentReason AS SDDocumentReason,
Return.CustomerReturnDate AS CustomerReturnDate,
Return.PurchaseOrderByCustomer AS PurchaseOrderByCustomer,
Return.CustomerPurchaseOrderDate AS CustomerPurchaseOrderDate,
Return.CreatedByUser AS CreatedByUser,
Return._CreatedByUser.UserDescription AS CreatedByUserDescription,
Return.CreationDate AS CreationDate,
Return.LastChangedByUser AS LastChangedByUser,
Return._LastChangedByUser.UserDescription AS LastChangedByUserDescription,
_ShipToParty.Customer AS ShipToParty,
cast('' as ad_namtext ) AS ShipToPartyName,
cast( '' as boolean preserving type ) AS IsValid
FROM I_CustomerReturn AS Return
LEFT OUTER JOIN C_Q2CCustomerQuickView AS _SoldToPartyVH ON SoldToParty = _SoldToPartyVH.Customer -- association [0..1]
LEFT OUTER JOIN C_Customerreturnitemfs AS _Item ON CustomerReturn = _Item.CustomerReturn -- association [0..*]
LEFT OUTER JOIN C_SDDocumentPartnerCard AS _SDDocumentPartnerCard ON CustomerReturn = _SDDocumentPartnerCard.SDDocument AND _SDDocumentPartnerCard.SDDocumentItem = '000000' -- association [0..*]
LEFT OUTER JOIN C_SlsDocPaymentPlanItem AS _SlsDocPaymentPlanItem ON CustomerReturn = _SlsDocPaymentPlanItem.SalesDocument -- association [0..*]
LEFT OUTER JOIN I_SDDocumentCustomer AS _ShipToParty ON CustomerReturn = _ShipToParty.SDDocument AND _ShipToParty.PartnerFunction = 'WE' -- association [0..1]
LEFT OUTER JOIN I_SDDocumentPersonnel AS _EmployeeResponsible ON CustomerReturn = _EmployeeResponsible.SDDocument AND _EmployeeResponsible.PartnerFunction = 'ZM' -- association [0..1]
LEFT OUTER JOIN I_SalesDocumentPartner AS _ResponsibleEmployee ON CustomerReturn = _ResponsibleEmployee.SalesDocument AND _ResponsibleEmployee.PartnerFunction = 'ZM' -- association [0..1]
LEFT OUTER JOIN E_SalesDocumentBasic AS _Extension ON CustomerReturn = _Extension.SalesDocument -- association [0..1]
;
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