Deprecated
This CDS view is deprecated in S/4HANA. View all deprecated CDS views →

P_ReturnedSalesOrderItems

DDL: P_RETURNEDSALESORDERITEMS Type: view CONSUMPTION

Returned Sales Order Date Calculation

P_ReturnedSalesOrderItems is a Consumption CDS View that provides data about "Returned Sales Order Date Calculation" in SAP S/4HANA. It reads from 1 data source (I_SalesDocumentItem) and exposes 14 fields with key fields CustomerReturn, CustomerReturnItem. It has 1 association to related views.

Data Sources (1)

SourceAliasJoin Type
I_SalesDocumentItem I_SalesDocumentItem from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_CalendarDate _SalesOrderDate _SalesOrderDate.CalendarDate = $projection.CreationDate

Annotations (13)

NameValueLevelField
AbapCatalog.sqlViewName PRETSLSORDITEM view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
AccessControl.personalData.blocking #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
VDM.private true view
ObjectModel.usageType.serviceQuality #P view
ClientHandling.algorithm #SESSION_VARIABLE view
EndUserText.label Returned Sales Order Date Calculation view
Metadata.ignorePropagatedAnnotations true view
VDM.lifecycle.status #DEPRECATED view
VDM.lifecycle.successor view

Fields (14)

KeyFieldSource TableSource FieldDescription
KEY CustomerReturn SalesDocument SD Document
KEY CustomerReturnItem SalesDocumentItem Sales Document Item
TodaysDate
CreationDate CreationDate Time Stamp
ReturnReason ReturnReason Return Reason
SoldToParty SoldToParty Sold-to Party
SalesGroup SalesGroup Sales Group
SalesOrganization SalesOrganization Sales Organization
OrganizationDivision OrganizationDivision Org. Division
DistributionChannel DistributionChannel RefDistCh-Cust/Mat.
SalesOffice SalesOffice Sales Office
SalesDocumentType SalesDocumentType Sales Doc. Type
ReturnReasonName
_SalesOrderDate _SalesOrderDate

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_ReturnedSalesOrderItems.
-- 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 P_ReturnedSalesOrderItems AS
SELECT
  SalesDocument AS CustomerReturn,
  SalesDocumentItem AS CustomerReturnItem,
  $session.system_date AS TodaysDate,
  CreationDate,
  ReturnReason,
  SoldToParty,
  SalesGroup,
  SalesOrganization,
  OrganizationDivision,
  DistributionChannel,
  SalesOffice,
  SalesDocumentType,
  _ReturnReason._Text[1: Language = $session.system_language ].ReturnReasonName AS ReturnReasonName
FROM I_SalesDocumentItem
LEFT OUTER JOIN I_CalendarDate AS _SalesOrderDate ON _SalesOrderDate.CalendarDate = CreationDate  -- association [1..1]
;