C_CustomerReturnItemRefund
Returns Order Item Refund
C_CustomerReturnItemRefund is a Consumption CDS View that provides data about "Returns Order Item Refund" in SAP S/4HANA. It reads from 1 data source (P_ReturnsDocumentItemRefund) and exposes 59 fields with key fields CustomerReturn, CustomerReturnItem, InspectionDocument. It has 24 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_ReturnsDocumentItemRefund | Refund | from |
Associations (24)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..1] | I_SalesDocumentItemCategory | _CustRetItemCategory | $projection.CustomerReturnItemCategory = _CustRetItemCategory.SalesDocumentItemCategory |
| [0..*] | C_CustomerReturnRefundDetail | _CustomerReturnRefundDetail | $projection.CustomerReturn = _CustomerReturnRefundDetail.CustomerReturn and $projection.CustomerReturnItem = _CustomerReturnRefundDetail.CustomerReturnItem and $projection.InspectionDocument = _CustomerReturnRefundDetail.InspectionDocument |
| [0..*] | C_CreditMemoRequestItem | _CreditMemoRequestItem | $projection.CustomerReturn = _CreditMemoRequestItem.ReferenceSDDocument and $projection.CustomerReturnItem = _CreditMemoRequestItem.ReferenceSDDocumentItem |
| [0..*] | C_SalesOrderWithoutChargeItem | _OrderWOCharge | $projection.CustomerReturn = _OrderWOCharge.ReferenceSDDocument and $projection.CustomerReturnItem = _OrderWOCharge.ReferenceSDDocumentItem |
| [0..*] | C_CustRetSubsqntCrdtMemo | _CreditMemo | $projection.CustomerReturn = _CreditMemo.ReferenceSDDocument and $projection.CustomerReturnItem = _CreditMemo.ReferenceSDDocumentItem |
| [0..*] | I_AdvncdRetsMgmtProcExecuted | _OutboundDeliveryOrder | $projection.RetsMgmtProcess = _OutboundDeliveryOrder.RetsMgmtProcess and $projection.RetsMgmtProcessItem = _OutboundDeliveryOrder.RetsMgmtProcessItem and _OutboundDeliveryOrder.ReturnsDocumentType = '18' |
| [0..1] | P_RefundedQuantitySum | _RefundedQuantity | $projection.CustomerReturn = _RefundedQuantity.CustomerReturn and $projection.CustomerReturnItem = _RefundedQuantity.CustomerReturnItem |
| [0..1] | P_RefundingQuantity | _RefundingQuantity | $projection.CustomerReturn = _RefundingQuantity.CustomerReturn and $projection.CustomerReturnItem = _RefundingQuantity.CustomerReturnItem |
| [0..1] | I_ReturnsRefundType | _ReturnsRefundType | $projection.ReturnsRefundType = _ReturnsRefundType.ReturnsRefundType |
| [0..1] | I_ReturnsRefundExtent | _ReturnsRefundExtent | $projection.ReturnsRefundExtent = _ReturnsRefundExtent.ReturnsRefundExtent |
| [0..1] | I_SalesDocumentRjcnReason | _SalesDocumentRjcnReason | $projection.ReturnsRefundRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason |
| [0..*] | C_CustomerReturnProductUoMVH | _CustomerReturnProductUoMVH | $projection.Material = _CustomerReturnProductUoMVH.Product |
| [0..1] | I_AdvncdReturnsMgmtProcessItem | _RetsMgmtProcItmWthProcgSts | $projection.RetsMgmtProcess = _RetsMgmtProcItmWthProcgSts.RetsMgmtProcess and $projection.CustomerReturnItem = _RetsMgmtProcItmWthProcgSts.RetsMgmtProcessItem |
| [0..*] | I_MaterialText | _MaterialText | $projection.Material = _MaterialText.Material |
| [0..*] | I_MaterialText | _RepMaterialText | $projection.ReplacementMaterial = _RepMaterialText.Material |
| [0..1] | I_Plant | _SupplyingPlant | $projection.ReplacementMatlSupplyingPlant = _SupplyingPlant.Plant |
| [0..*] | I_RetMatlInspResultCodeText | _RetMatlInspResultCodeText | $projection.RetMatlInspResultCode = _RetMatlInspResultCodeText.RetMatlInspResultCode |
| [0..*] | I_ReturnsRefundExtentText | _ReturnsRefundExtentText | $projection.ReturnsRefundExtent = _ReturnsRefundExtentText.ReturnsRefundExtent |
| [0..*] | I_ReturnsRefundTypeText | _ReturnsRefundTypeText | $projection.ReturnsRefundType = _ReturnsRefundTypeText.ReturnsRefundType |
| [0..*] | I_SalesDocumentRjcnReasonText | _SalesDocumentRjcnReasonT | $projection.ReturnsRefundRjcnReason = _SalesDocumentRjcnReasonT.SalesDocumentRjcnReason |
| [0..1] | I_SalesDocumentTypeText | _SalesDocumentTypeText | $projection.CustomerReturnType = _SalesDocumentTypeText.SalesDocumentType and _SalesDocumentTypeText.Language = $session.system_language |
| [0..*] | I_FollowUpActivityText | _FollowUpActivityText | $projection.CustRetItmFollowUpActivity = _FollowUpActivityText.CustRetItmFollowUpActivity |
| [0..1] | E_SalesDocumentItemBasic | _Extension | $projection.CustomerReturnItem = _Extension.SalesDocumentItem and $projection.CustomerReturn = _Extension.SalesDocument |
| [0..1] | P_CustRetItemScheduleLine | _ScheduleLine | $projection.CustomerReturn = _ScheduleLine.SalesDocument and $projection.CustomerReturnItem = _ScheduleLine.SalesDocumentItem |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| EndUserText.label | Returns Order Item Refund | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| AbapCatalog.sqlViewName | CCRTITMRFND | view | |
| AbapCatalog.preserveKey | true | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| ObjectModel.usageType.dataClass | #MIXED | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (59)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | |||
| KEY | CustomerReturnItem | P_ReturnsDocumentItemRefund | CustomerReturnItem | Item |
| KEY | InspectionDocument | P_ReturnsDocumentItemRefund | InspectionDocument | |
| RetsMgmtItmCompnProcgStatus | ||||
| CustomerReturnItemCategory | P_ReturnsDocumentItemRefund | CustomerReturnItemCategory | ||
| OrderQuantity | P_ReturnsDocumentItemRefund | OrderQuantity | Quantity | |
| OrderQuantityUnit | P_ReturnsDocumentItemRefund | OrderQuantityUnit | Sales Unit | |
| CustReturnItmRefundedQty | ||||
| CustReturnItmIsCmpltlyRefunded | ||||
| CustReturnItmOpenRefundQty | Planned Refund Quantity | |||
| ReturnsRefundExtent | P_ReturnsDocumentItemRefund | ReturnsRefundExtent | ||
| ReturnsRefundType | P_ReturnsDocumentItemRefund | ReturnsRefundType | ||
| HigherLevelItem | P_ReturnsDocumentItemRefund | HigherLevelItem | Higher-Lev.Item | |
| RetsMgmtProcessStep | P_ReturnsDocumentItemRefund | RetsMgmtProcessStep | ||
| RetsMgmtProcess | P_ReturnsDocumentItemRefund | RetsMgmtProcess | ||
| RetsMgmtProcessItem | P_ReturnsDocumentItemRefund | RetsMgmtProcessItem | ||
| BillingRelevanceCode | _CustRetItemCategory | BillingRelevanceCode | ||
| ReturnsRefundProcgMode | P_ReturnsDocumentItemRefund | ReturnsRefundProcgMode | ||
| Material | P_ReturnsDocumentItemRefund | Material | Vehicle Model | |
| ReturnsRefundRjcnReason | P_ReturnsDocumentItemRefund | ReturnsRefundRjcnReason | ||
| NetAmount | P_ReturnsDocumentItemRefund | NetAmount | Stated Amount | |
| TransactionCurrency | P_ReturnsDocumentItemRefund | TransactionCurrency | Transaction Currency | |
| RetMatlInspResultCode | P_ReturnsDocumentItemRefund | RetMatlInspResultCode | ||
| SalesOrganization | P_ReturnsDocumentItemRefund | SalesOrganization | Sales Organization | |
| DistributionChannel | P_ReturnsDocumentItemRefund | DistributionChannel | RefDistCh-Cust/Mat. | |
| OrganizationDivision | P_ReturnsDocumentItemRefund | OrganizationDivision | Org. Division | |
| CustomerReturnType | P_ReturnsDocumentItemRefund | CustomerReturnType | ||
| Plant | P_ReturnsDocumentItemRefund | Plant | Valuation Area | |
| Batch | P_ReturnsDocumentItemRefund | Batch | Lot No. | |
| Language | ||||
| ReplacementMaterial | P_ReturnsDocumentItemRefund | ReplacementMaterial | ||
| ReplacementMaterialQuantity | Replacement Quantity | |||
| ReplacementMaterialQtyUnit | P_ReturnsDocumentItemRefund | ReplacementMaterialQtyUnit | ||
| ReplacementMatlSupplyingPlant | P_ReturnsDocumentItemRefund | ReplacementMatlSupplyingPlant | ||
| BillOfMaterial | P_ReturnsDocumentItemRefund | BillOfMaterial | BOM | |
| CustRetItmFollowUpActivity | P_ReturnsDocumentItemRefund | CustRetItmFollowUpActivity | Follow-Up Act. | |
| InspectedProductQtyInBaseUnit | P_ReturnsDocumentItemRefund | InspectedProductQtyInBaseUnit | ||
| BaseUnit | P_ReturnsDocumentItemRefund | BaseUnit | Unit of Measure | |
| InspectionItemIsSplit | ||||
| GoodsMovementType | _ScheduleLine | GoodsMovementType | Movement Type | |
| _CreditMemo | _CreditMemo | |||
| _OutboundDeliveryOrder | _OutboundDeliveryOrder | |||
| _CreditMemoRequestItem | _CreditMemoRequestItem | |||
| _OrderWOCharge | _OrderWOCharge | |||
| _CustomerReturnRefundDetail | _CustomerReturnRefundDetail | |||
| _MaterialText | _MaterialText | |||
| _RepMaterialText | _RepMaterialText | |||
| _SupplyingPlant | _SupplyingPlant | |||
| _ReturnsRefundType | _ReturnsRefundType | |||
| _ReturnsRefundExtent | _ReturnsRefundExtent | |||
| _SalesDocumentRjcnReason | _SalesDocumentRjcnReason | |||
| _SalesDocumentRjcnReasonT | _SalesDocumentRjcnReasonT | |||
| _CustomerReturnProductUoMVH | _CustomerReturnProductUoMVH | |||
| _RetMatlInspResultCodeText | _RetMatlInspResultCodeText | |||
| _ReturnsRefundTypeText | _ReturnsRefundTypeText | |||
| _ReturnsRefundExtentText | _ReturnsRefundExtentText | |||
| _SalesDocumentTypeText | _SalesDocumentTypeText | |||
| _FollowUpActivityText | _FollowUpActivityText | |||
| _RetsMgmtProcItmWthProcgSts | _RetsMgmtProcItmWthProcgSts |
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_CustomerReturnItemRefund.
-- 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_CustomerReturnItemRefund AS
SELECT
cast (Refund.CustomerReturn as msr_returns_order preserving type) AS CustomerReturn,
Refund.CustomerReturnItem AS CustomerReturnItem,
Refund.InspectionDocument AS InspectionDocument,
cast('' as msr_fin_status) AS RetsMgmtItmCompnProcgStatus,
Refund.CustomerReturnItemCategory AS CustomerReturnItemCategory,
Refund.OrderQuantity AS OrderQuantity,
Refund.OrderQuantityUnit AS OrderQuantityUnit,
cast(0 as msr_rep_refunded) AS CustReturnItmRefundedQty,
cast('' as char1) AS CustReturnItmIsCmpltlyRefunded,
cast(0 as refunding_quantity) AS CustReturnItmOpenRefundQty,
Refund.ReturnsRefundExtent AS ReturnsRefundExtent,
Refund.ReturnsRefundType AS ReturnsRefundType,
Refund.HigherLevelItem AS HigherLevelItem,
Refund.RetsMgmtProcessStep AS RetsMgmtProcessStep,
Refund.RetsMgmtProcess AS RetsMgmtProcess,
Refund.RetsMgmtProcessItem AS RetsMgmtProcessItem,
_CustRetItemCategory.BillingRelevanceCode AS BillingRelevanceCode,
Refund.ReturnsRefundProcgMode AS ReturnsRefundProcgMode,
Refund.Material AS Material,
Refund.ReturnsRefundRjcnReason AS ReturnsRefundRjcnReason,
Refund.NetAmount AS NetAmount,
Refund.TransactionCurrency AS TransactionCurrency,
Refund.RetMatlInspResultCode AS RetMatlInspResultCode,
Refund.SalesOrganization AS SalesOrganization,
Refund.DistributionChannel AS DistributionChannel,
Refund.OrganizationDivision AS OrganizationDivision,
Refund.CustomerReturnType AS CustomerReturnType,
Refund.Plant AS Plant,
Refund.Batch AS Batch,
cast( $session.system_language as spras ) AS Language,
Refund.ReplacementMaterial AS ReplacementMaterial,
cast(0 as refunding_quantity) AS ReplacementMaterialQuantity,
Refund.ReplacementMaterialQtyUnit AS ReplacementMaterialQtyUnit,
Refund.ReplacementMatlSupplyingPlant AS ReplacementMatlSupplyingPlant,
Refund.BillOfMaterial AS BillOfMaterial,
Refund.CustRetItmFollowUpActivity AS CustRetItmFollowUpActivity,
Refund.InspectedProductQtyInBaseUnit AS InspectedProductQtyInBaseUnit,
Refund.BaseUnit AS BaseUnit,
cast ('' as msr_insp_itm_is_splt) AS InspectionItemIsSplit,
_ScheduleLine.GoodsMovementType AS GoodsMovementType
FROM P_ReturnsDocumentItemRefund AS Refund
LEFT OUTER JOIN I_SalesDocumentItemCategory AS _CustRetItemCategory ON CustomerReturnItemCategory = _CustRetItemCategory.SalesDocumentItemCategory -- association [0..1]
LEFT OUTER JOIN C_CustomerReturnRefundDetail AS _CustomerReturnRefundDetail ON CustomerReturn = _CustomerReturnRefundDetail.CustomerReturn AND CustomerReturnItem = _CustomerReturnRefundDetail.CustomerReturnItem AND InspectionDocument = _CustomerReturnRefundDetail.InspectionDocument -- association [0..*]
LEFT OUTER JOIN C_CreditMemoRequestItem AS _CreditMemoRequestItem ON CustomerReturn = _CreditMemoRequestItem.ReferenceSDDocument AND CustomerReturnItem = _CreditMemoRequestItem.ReferenceSDDocumentItem -- association [0..*]
LEFT OUTER JOIN C_SalesOrderWithoutChargeItem AS _OrderWOCharge ON CustomerReturn = _OrderWOCharge.ReferenceSDDocument AND CustomerReturnItem = _OrderWOCharge.ReferenceSDDocumentItem -- association [0..*]
LEFT OUTER JOIN C_CustRetSubsqntCrdtMemo AS _CreditMemo ON CustomerReturn = _CreditMemo.ReferenceSDDocument AND CustomerReturnItem = _CreditMemo.ReferenceSDDocumentItem -- association [0..*]
LEFT OUTER JOIN I_AdvncdRetsMgmtProcExecuted AS _OutboundDeliveryOrder ON RetsMgmtProcess = _OutboundDeliveryOrder.RetsMgmtProcess AND RetsMgmtProcessItem = _OutboundDeliveryOrder.RetsMgmtProcessItem AND _OutboundDeliveryOrder.ReturnsDocumentType = '18' -- association [0..*]
LEFT OUTER JOIN P_RefundedQuantitySum AS _RefundedQuantity ON CustomerReturn = _RefundedQuantity.CustomerReturn AND CustomerReturnItem = _RefundedQuantity.CustomerReturnItem -- association [0..1]
LEFT OUTER JOIN P_RefundingQuantity AS _RefundingQuantity ON CustomerReturn = _RefundingQuantity.CustomerReturn AND CustomerReturnItem = _RefundingQuantity.CustomerReturnItem -- association [0..1]
LEFT OUTER JOIN I_ReturnsRefundType AS _ReturnsRefundType ON ReturnsRefundType = _ReturnsRefundType.ReturnsRefundType -- association [0..1]
LEFT OUTER JOIN I_ReturnsRefundExtent AS _ReturnsRefundExtent ON ReturnsRefundExtent = _ReturnsRefundExtent.ReturnsRefundExtent -- association [0..1]
LEFT OUTER JOIN I_SalesDocumentRjcnReason AS _SalesDocumentRjcnReason ON ReturnsRefundRjcnReason = _SalesDocumentRjcnReason.SalesDocumentRjcnReason -- association [0..1]
LEFT OUTER JOIN C_CustomerReturnProductUoMVH AS _CustomerReturnProductUoMVH ON Material = _CustomerReturnProductUoMVH.Product -- association [0..*]
LEFT OUTER JOIN I_AdvncdReturnsMgmtProcessItem AS _RetsMgmtProcItmWthProcgSts ON RetsMgmtProcess = _RetsMgmtProcItmWthProcgSts.RetsMgmtProcess AND CustomerReturnItem = _RetsMgmtProcItmWthProcgSts.RetsMgmtProcessItem -- association [0..1]
LEFT OUTER JOIN I_MaterialText AS _MaterialText ON Material = _MaterialText.Material -- association [0..*]
LEFT OUTER JOIN I_MaterialText AS _RepMaterialText ON ReplacementMaterial = _RepMaterialText.Material -- association [0..*]
LEFT OUTER JOIN I_Plant AS _SupplyingPlant ON ReplacementMatlSupplyingPlant = _SupplyingPlant.Plant -- association [0..1]
LEFT OUTER JOIN I_RetMatlInspResultCodeText AS _RetMatlInspResultCodeText ON RetMatlInspResultCode = _RetMatlInspResultCodeText.RetMatlInspResultCode -- association [0..*]
LEFT OUTER JOIN I_ReturnsRefundExtentText AS _ReturnsRefundExtentText ON ReturnsRefundExtent = _ReturnsRefundExtentText.ReturnsRefundExtent -- association [0..*]
LEFT OUTER JOIN I_ReturnsRefundTypeText AS _ReturnsRefundTypeText ON ReturnsRefundType = _ReturnsRefundTypeText.ReturnsRefundType -- association [0..*]
LEFT OUTER JOIN I_SalesDocumentRjcnReasonText AS _SalesDocumentRjcnReasonT ON ReturnsRefundRjcnReason = _SalesDocumentRjcnReasonT.SalesDocumentRjcnReason -- association [0..*]
LEFT OUTER JOIN I_SalesDocumentTypeText AS _SalesDocumentTypeText ON CustomerReturnType = _SalesDocumentTypeText.SalesDocumentType AND _SalesDocumentTypeText.Language = $session.system_language -- association [0..1]
LEFT OUTER JOIN I_FollowUpActivityText AS _FollowUpActivityText ON CustRetItmFollowUpActivity = _FollowUpActivityText.CustRetItmFollowUpActivity -- association [0..*]
LEFT OUTER JOIN E_SalesDocumentItemBasic AS _Extension ON CustomerReturnItem = _Extension.SalesDocumentItem AND CustomerReturn = _Extension.SalesDocument -- association [0..1]
LEFT OUTER JOIN P_CustRetItemScheduleLine AS _ScheduleLine ON CustomerReturn = _ScheduleLine.SalesDocument AND CustomerReturnItem = _ScheduleLine.SalesDocumentItem -- 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