P_ReturnsDocumentItemRefund
Returns Document Item Refund
P_ReturnsDocumentItemRefund is a Consumption CDS View that provides data about "Returns Document Item Refund" in SAP S/4HANA. It reads from 3 data sources (I_AdvncdRetsMgmtMatlInspection, P_CustomerReturnItemEnhanced, P_CustomerReturnItemEnhanced) and exposes 60 fields with key fields CustomerReturn, CustomerReturnItem, InspectionDocument, CustomerReturnItem, InspectionDocument. Part of development package ODATA_SD_RETURN_V2.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| I_AdvncdRetsMgmtMatlInspection | AdvncdRetsMgmtMatlInspection | inner |
| P_CustomerReturnItemEnhanced | Refund | from |
| P_CustomerReturnItemEnhanced | Refund | union_all |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| AbapCatalog.sqlViewName | PCRTITMRFND | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view |
Fields (60)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | CustomerReturn | P_CustomerReturnItemEnhanced | CustomerReturn | |
| KEY | CustomerReturnItem | P_CustomerReturnItemEnhanced | CustomerReturnItem | |
| KEY | InspectionDocument | I_AdvncdRetsMgmtMatlInspection | InspectionDocument | Inspection Number |
| CustomerReturnItemCategory | P_CustomerReturnItemEnhanced | CustomerReturnItemCategory | ||
| OrderQuantity | ||||
| OrderQuantityUnit | P_CustomerReturnItemEnhanced | OrderQuantityUnit | Sales Unit | |
| ReturnsRefundExtent | P_CustomerReturnItemEnhanced | ReturnsRefundExtent | ||
| ReturnsRefundType | P_CustomerReturnItemEnhanced | ReturnsRefundType | ||
| HigherLevelItem | P_CustomerReturnItemEnhanced | HigherLevelItem | Higher-Lev.Item | |
| ProductConfiguration | P_CustomerReturnItemEnhanced | ProductConfiguration | ||
| RetsMgmtProcessStep | AdvncdRetsMgmtCompnStatus | RetsMgmtProcessStep | ||
| RetsMgmtProcess | P_CustomerReturnItemEnhanced | RetsMgmtProcess | ||
| RetsMgmtProcessItem | P_CustomerReturnItemEnhanced | RetsMgmtProcessItem | ||
| ReturnsRefundProcgMode | P_CustomerReturnItemEnhanced | ReturnsRefundProcgMode | ||
| Material | ||||
| ReturnsRefundRjcnReason | P_CustomerReturnItemEnhanced | ReturnsRefundRjcnReason | ||
| NetAmount | P_CustomerReturnItemEnhanced | NetAmount | Stated Amount | |
| TransactionCurrency | P_CustomerReturnItemEnhanced | TransactionCurrency | Transaction Currency | |
| RetMatlInspResultCode | ||||
| SalesOrganization | ||||
| DistributionChannel | ||||
| OrganizationDivision | ||||
| CustomerReturnType | ||||
| Plant | P_CustomerReturnItemEnhanced | Plant | Valuation Area | |
| Batch | P_CustomerReturnItemEnhanced | Batch | Lot No. | |
| BillOfMaterial | P_CustomerReturnItemEnhanced | BillOfMaterial | BOM | |
| ReturnsDelivery | I_AdvncdRetsMgmtMatlInspection | ReturnsDelivery | Delivery | |
| ReturnsDeliveryItem | I_AdvncdRetsMgmtMatlInspection | ReturnsDeliveryItem | Item | |
| InspectedProductQtyInBaseUnit | I_AdvncdRetsMgmtMatlInspection | InspectedProductQtyInBaseUnit | Quantity | |
| CustomerReturn | ||||
| KEY | CustomerReturnItem | P_CustomerReturnItemEnhanced | CustomerReturnItem | |
| KEY | InspectionDocument | Inspection Number | ||
| CustomerReturnItemCategory | P_CustomerReturnItemEnhanced | CustomerReturnItemCategory | ||
| OrderQuantity | ||||
| OrderQuantityUnit | P_CustomerReturnItemEnhanced | OrderQuantityUnit | Sales Unit | |
| ReturnsRefundExtent | P_CustomerReturnItemEnhanced | ReturnsRefundExtent | ||
| ReturnsRefundType | P_CustomerReturnItemEnhanced | ReturnsRefundType | ||
| HigherLevelItem | P_CustomerReturnItemEnhanced | HigherLevelItem | Higher-Lev.Item | |
| ProductConfiguration | P_CustomerReturnItemEnhanced | ProductConfiguration | ||
| RetsMgmtProcessStep | AdvncdRetsMgmtCompnStatus | RetsMgmtProcessStep | ||
| RetsMgmtProcess | P_CustomerReturnItemEnhanced | RetsMgmtProcess | ||
| RetsMgmtProcessItem | P_CustomerReturnItemEnhanced | RetsMgmtProcessItem | ||
| ReturnsRefundProcgMode | P_CustomerReturnItemEnhanced | ReturnsRefundProcgMode | ||
| Material | ||||
| ReturnsRefundRjcnReason | P_CustomerReturnItemEnhanced | ReturnsRefundRjcnReason | ||
| NetAmount | P_CustomerReturnItemEnhanced | NetAmount | Stated Amount | |
| TransactionCurrency | P_CustomerReturnItemEnhanced | TransactionCurrency | Transaction Currency | |
| RetMatlInspResultCode | ||||
| SalesOrganization | ||||
| DistributionChannel | ||||
| OrganizationDivision | ||||
| CustomerReturnType | ||||
| Plant | P_CustomerReturnItemEnhanced | Plant | Valuation Area | |
| Batch | P_CustomerReturnItemEnhanced | Batch | Lot No. | |
| BillOfMaterial | P_CustomerReturnItemEnhanced | BillOfMaterial | BOM | |
| CustRetItmFollowUpActivity | P_CustomerReturnItemEnhanced | CustRetItmFollowUpActivity | Follow-Up Act. | |
| ReturnsDelivery | Delivery | |||
| ReturnsDeliveryItem | Item | |||
| InspectedProductQtyInBaseUnit | Quantity | |||
| BaseUnit |
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 P_ReturnsDocumentItemRefund.
-- 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: PCRTITMRFND
CREATE VIEW P_ReturnsDocumentItemRefund AS
SELECT
Refund.CustomerReturn AS CustomerReturn,
Refund.CustomerReturnItem AS CustomerReturnItem,
AdvncdRetsMgmtMatlInspection.InspectionDocument AS InspectionDocument,
Refund.CustomerReturnItemCategory AS CustomerReturnItemCategory,
cast(Refund.OrderQuantity as returned_quantity) AS OrderQuantity,
Refund.OrderQuantityUnit AS OrderQuantityUnit,
Refund.ReturnsRefundExtent AS ReturnsRefundExtent,
Refund.ReturnsRefundType AS ReturnsRefundType,
Refund.HigherLevelItem AS HigherLevelItem,
Refund.ProductConfiguration AS ProductConfiguration,
AdvncdRetsMgmtCompnStatus.RetsMgmtProcessStep AS RetsMgmtProcessStep,
Refund.RetsMgmtProcess AS RetsMgmtProcess,
Refund.RetsMgmtProcessItem AS RetsMgmtProcessItem,
Refund.ReturnsRefundProcgMode AS ReturnsRefundProcgMode,
cast(Refund.Product as productnumber preserving type) AS Material,
Refund.ReturnsRefundRjcnReason AS ReturnsRefundRjcnReason,
Refund.NetAmount AS NetAmount,
Refund.TransactionCurrency AS TransactionCurrency,
cast(AdvncdRetsMgmtMatlInspection.RetMatlInspResultCode as msr_inspection_code) AS RetMatlInspResultCode,
Refund._CustomerReturn.SalesOrganization AS SalesOrganization,
Refund._CustomerReturn.DistributionChannel AS DistributionChannel,
Refund._CustomerReturn.OrganizationDivision AS OrganizationDivision,
Refund._CustomerReturn.CustomerReturnType AS CustomerReturnType,
Refund.Plant AS Plant,
Refund.Batch AS Batch,
Refund.BillOfMaterial AS BillOfMaterial,
AdvncdRetsMgmtMatlInspection.ReturnsDelivery AS ReturnsDelivery,
AdvncdRetsMgmtMatlInspection.ReturnsDeliveryItem AS ReturnsDeliveryItem,
AdvncdRetsMgmtMatlInspection.InspectedProductQtyInBaseUnit AS InspectedProductQtyInBaseUnit,
Refund.CustRetItmFollowUpActivity AS CustRetItmFollowUpActivity,
cast('' as meins) AS BaseUnit
FROM P_CustomerReturnItemEnhanced AS Refund
INNER JOIN I_AdvncdRetsMgmtMatlInspection AS AdvncdRetsMgmtMatlInspection ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): P_CustomerReturnItemEnhanced
;
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