P_SlsOrderInSupplyPurgIssue3

DDL: P_SLSORDERINSUPPLYPURGISSUE3 SQL: PSOFISSUESU013V2 Type: view COMPOSITE

P_SlsOrderInSupplyPurgIssue3 is a Composite CDS View in SAP S/4HANA. It reads from 11 data sources and exposes 21 fields with key fields PurchasingDocument, PurchasingDocumentItem.

Data Sources (11)

SourceAliasJoin Type
I_PurgDocAccountAssignment PO_ACC inner
P_SDDocumentPurchOrdProcFlow PO_Link inner
I_PurgDocScheduleLine PO_SL inner
I_PurgDocScheduleLine PO_SL inner
I_PurchasingDocumentItem POI from
I_PurchasingDocumentItem POI union_all
R_PurchaseOrderItem PurchaseOrderItem inner
I_SalesDocumentBasic SOH inner
I_SalesDocumentBasic SOH inner
I_SalesDocumentItemBasic SOI inner
I_SalesDocumentItemBasic SOI inner

Annotations (10)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #S view
VDM.private true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
AbapCatalog.sqlViewName PSOFISSUESU013V2 view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view

Fields (21)

KeyFieldSource TableSource FieldDescription
KEY PurchasingDocument I_PurchasingDocumentItem PurchasingDocument Purchasing Document
KEY PurchasingDocumentItem I_PurchasingDocumentItem PurchasingDocumentItem Purchasing Doc. Item
SalesDocument I_SalesDocumentItemBasic SalesDocument SD Document
SalesDocumentItem I_SalesDocumentItemBasic SalesDocumentItem Sales Document Item
SalesOrganization I_SalesDocumentBasic SalesOrganization Sales Organization
DistributionChannel I_SalesDocumentBasic DistributionChannel RefDistCh-Cust/Mat.
OrganizationDivision I_SalesDocumentBasic OrganizationDivision Org. Division
SalesDocumentType I_SalesDocumentBasic SalesDocumentType Sales Doc. Type
RequestedDeliveryDate I_SalesDocumentBasic RequestedDeliveryDate Requested Delivery Date
OverallSDProcessStatus I_SalesDocumentBasic OverallSDProcessStatus
SalesDocumentDate I_SalesDocumentBasic SalesDocumentDate Document Date
SalesGroup I_SalesDocumentBasic SalesGroup Sales Group
SalesOffice I_SalesDocumentBasic SalesOffice Sales Office
SoldToParty I_SalesDocumentBasic SoldToParty Sold-to Party
PurchaseOrderByCustomer
PurchasingDocumentDeletionCode I_PurchasingDocumentItem PurchasingDocumentDeletionCode Del. Indicator
IsCompletelyDelivered I_PurchasingDocumentItem IsCompletelyDelivered Is completely delivered
IsFinallyInvoiced I_PurchasingDocumentItem IsFinallyInvoiced Final Invoice
PurchasingDocumentCategory I_PurchasingDocumentItem PurchasingDocumentCategory Doc. Category
DeliveryDate
int4asPlannedDeliveryDurationInDays

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_SlsOrderInSupplyPurgIssue3.
-- 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: PSOFISSUESU013V2

CREATE VIEW P_SlsOrderInSupplyPurgIssue3 AS
SELECT
  POI.PurchasingDocument AS PurchasingDocument,
  POI.PurchasingDocumentItem AS PurchasingDocumentItem,
  SOI.SalesDocument AS SalesDocument,
  SOI.SalesDocumentItem AS SalesDocumentItem,
  SOH.SalesOrganization AS SalesOrganization,
  SOH.DistributionChannel AS DistributionChannel,
  SOH.OrganizationDivision AS OrganizationDivision,
  SOH.SalesDocumentType AS SalesDocumentType,
  SOH.RequestedDeliveryDate AS RequestedDeliveryDate,
  SOH.OverallSDProcessStatus AS OverallSDProcessStatus,
  SOH.SalesDocumentDate AS SalesDocumentDate,
  SOH.SalesGroup AS SalesGroup,
  SOH.SalesOffice AS SalesOffice,
  SOH.SoldToParty AS SoldToParty,
  POI.PurchasingDocumentDeletionCode AS PurchasingDocumentDeletionCode,
  POI.IsCompletelyDelivered AS IsCompletelyDelivered,
  POI.IsFinallyInvoiced AS IsFinallyInvoiced,
  POI.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  min (PO_SL.ScheduleLineDeliveryDate) AS DeliveryDate,
  cast(cast(cast(POI.PlannedDeliveryDurationInDays as abap.char(10)) as abap.numc(10)) as abap.int4) as PlannedDeliveryDurationInDays AS int4asPlannedDeliveryDurationInDays
FROM I_PurchasingDocumentItem AS POI
INNER JOIN I_PurgDocScheduleLine AS PO_SL ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurgDocAccountAssignment AS PO_ACC ON /* join condition not captured in parsed metadata */
INNER JOIN I_SalesDocumentBasic AS SOH ON /* join condition not captured in parsed metadata */
INNER JOIN I_SalesDocumentItemBasic AS SOI ON /* join condition not captured in parsed metadata */
INNER JOIN R_PurchaseOrderItem AS PurchaseOrderItem ON /* join condition not captured in parsed metadata */
INNER JOIN P_SDDocumentPurchOrdProcFlow AS PO_Link ON /* join condition not captured in parsed metadata */
-- UNION ALL with additional select branch(es): I_PurchasingDocumentItem
;