C_RetsRefDocItemAttribute

DDL: C_RETSREFDOCITEMATTRIBUTE Type: view_entity CONSUMPTION

Returns Document Item Attribute Search

C_RetsRefDocItemAttribute is a Consumption CDS View that provides data about "Returns Document Item Attribute Search" in SAP S/4HANA. It reads from 2 data sources (I_BillingDocumentItem, I_SalesDocumentItem) and exposes 13 fields with key fields ReferenceDocument, ReferenceDocumentItem, ReferenceDocumentItem.

Data Sources (2)

SourceAliasJoin Type
I_BillingDocumentItem I_BillingDocumentItem union_all
I_SalesDocumentItem I_SalesDocumentItem from

Annotations (7)

NameValueLevelField
VDM.viewType #CONSUMPTION view
AccessControl.authorizationCheck #MANDATORY view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
EndUserText.label Returns Document Item Attribute Search view
Metadata.ignorePropagatedAnnotations true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY ReferenceDocument I_SalesDocumentItem SalesDocument SD Document
KEY ReferenceDocumentItem I_SalesDocumentItem SalesDocumentItem Item
Material
SDDocumentCategory I_SalesDocumentItem SDDocumentCategory Document Cat.
SalesOrganization I_SalesDocumentItem SalesOrganization Sales Organization
DistributionChannel I_SalesDocumentItem DistributionChannel RefDistCh-Cust/Mat.
BillingDocumentasReferenceDocument
KEY ReferenceDocumentItem I_BillingDocumentItem BillingDocumentItem Item
Material
SDDocumentCategory I_BillingDocumentItem SDDocumentCategory Document Cat.
SalesOrganization I_BillingDocumentItem SalesOrganization Sales Organization
DistributionChannel I_BillingDocumentItem DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision I_BillingDocumentItem OrganizationDivision Org. Division

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_RetsRefDocItemAttribute.
-- 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_RetsRefDocItemAttribute AS
SELECT
  I_SalesDocumentItem.SalesDocument AS ReferenceDocument,
  I_SalesDocumentItem.SalesDocumentItem AS ReferenceDocumentItem,
  cast(I_SalesDocumentItem.Material as productnumber preserving type ) AS Material,
  I_SalesDocumentItem.SDDocumentCategory AS SDDocumentCategory,
  I_SalesDocumentItem.SalesOrganization AS SalesOrganization,
  I_SalesDocumentItem.DistributionChannel AS DistributionChannel,
  I_SalesDocumentItem.OrganizationDivision AS BillingDocumentasReferenceDocument,
  I_BillingDocumentItem.OrganizationDivision AS OrganizationDivision
FROM I_SalesDocumentItem
-- UNION ALL with additional select branch(es): I_BillingDocumentItem
;