P_CustRetProcFlow12

DDL: P_CUSTRETPROCFLOW12 SQL: PCUSTRETPROCF12 Type: view CONSUMPTION

P_CustRetProcFlow12 is a Consumption CDS View in SAP S/4HANA. It reads from 2 data sources (P_CustRetProcFlow0, I_AdvncdRetsMgmtMatlInspection) and exposes 13 fields with key field Level1Document. It has 1 association to related views.

Data Sources (2)

SourceAliasJoin Type
P_CustRetProcFlow0 Level0 from
I_AdvncdRetsMgmtMatlInspection Level1 inner

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_SalesDocumentItemBasic _CustomerReturnItem Level0.CustomerReturn = _CustomerReturnItem.SalesDocument and Level1.ReferenceDocumentItem = _CustomerReturnItem.SalesDocumentItem

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #XL view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.viewType #CONSUMPTION view
AbapCatalog.sqlViewName PCUSTRETPROCF12 view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY Level1Document I_AdvncdRetsMgmtMatlInspection InspectionDocument Inspection Number
Level1DocumentItem I_AdvncdRetsMgmtMatlInspection ReferenceDocumentItem Reference item
Level1DocumentCategory
SDDocumentCategory P_CustRetProcFlow0 SDDocumentCategory Document Cat.
CustomerReturnType P_CustRetProcFlow0 CustomerReturnType Sales Doc. Type
CustomerReturn P_CustRetProcFlow0 CustomerReturn SD Document
ProductIsInspectedAtCustSite I_AdvncdRetsMgmtMatlInspection ProductIsInspectedAtCustSite Insp. at Cust.
ReturnsDelivery I_AdvncdRetsMgmtMatlInspection ReturnsDelivery Delivery
ReturnsDeliveryItem I_AdvncdRetsMgmtMatlInspection ReturnsDeliveryItem Item
SalesOrganization P_CustRetProcFlow0 SalesOrganization Sales Organization
DistributionChannel P_CustRetProcFlow0 DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision P_CustRetProcFlow0 OrganizationDivision Org. Division
CustRetItmFollowUpActivity I_AdvncdRetsMgmtMatlInspection CustRetItmFollowUpActivity Follow-Up Act.

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_CustRetProcFlow12.
-- 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: PCUSTRETPROCF12

CREATE VIEW P_CustRetProcFlow12 AS
SELECT
  Level1.InspectionDocument AS Level1Document,
  Level1.ReferenceDocumentItem AS Level1DocumentItem,
  'INSP' AS Level1DocumentCategory,
  Level0.SDDocumentCategory AS SDDocumentCategory,
  Level0.CustomerReturnType AS CustomerReturnType,
  Level0.CustomerReturn AS CustomerReturn,
  Level1.ProductIsInspectedAtCustSite AS ProductIsInspectedAtCustSite,
  Level1.ReturnsDelivery AS ReturnsDelivery,
  Level1.ReturnsDeliveryItem AS ReturnsDeliveryItem,
  Level0.SalesOrganization AS SalesOrganization,
  Level0.DistributionChannel AS DistributionChannel,
  Level0.OrganizationDivision AS OrganizationDivision,
  Level1.CustRetItmFollowUpActivity AS CustRetItmFollowUpActivity
FROM P_CustRetProcFlow0 AS Level0
INNER JOIN I_AdvncdRetsMgmtMatlInspection AS Level1 ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_SalesDocumentItemBasic AS _CustomerReturnItem ON Level0.CustomerReturn = _CustomerReturnItem.SalesDocument AND Level1.ReferenceDocumentItem = _CustomerReturnItem.SalesDocumentItem  -- association [1..1]
;