P_Purgdocscheduleline

DDL: P_PURGDOCSCHEDULELINE SQL: PMMPURGSCH Type: view CONSUMPTION

Purchasing Document Schedule Lines

P_Purgdocscheduleline is a Consumption CDS View that provides data about "Purchasing Document Schedule Lines" in SAP S/4HANA. It reads from 4 data sources (I_CalendarDate, I_PurchasingDocument, I_PurchasingDocumentItem, I_PurgDocScheduleLine) and exposes 13 fields with key fields PurchasingOrganization, PurchasingGroup, CompanyCode, Supplier, PurchasingDocumentCategory.

Data Sources (4)

SourceAliasJoin Type
I_CalendarDate CalendarDate inner
I_PurchasingDocument PurchaseDoc inner
I_PurchasingDocumentItem PurchaseDocItm inner
I_PurgDocScheduleLine PurgDocScheduleLine from

Parameters (2)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PMMPURGSCH view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Purchasing Document Schedule Lines view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY PurchasingOrganization I_PurchasingDocument PurchasingOrganization Purchasing Organization
KEY PurchasingGroup I_PurchasingDocument PurchasingGroup Purchasing Group
KEY CompanyCode I_PurchasingDocument CompanyCode Receiver Company Code
KEY Supplier I_PurchasingDocument Supplier Supplier
KEY PurchasingDocumentCategory I_PurchasingDocument PurchasingDocumentCategory Doc. Category
PurchasingDocumentStatus I_PurchasingDocument PurchasingDocumentOrigin Status
OrderQuantityUnit I_PurchasingDocumentItem OrderQuantityUnit Sales Unit
CalendarYear I_CalendarDate CalendarYear Year
CalendarMonth I_CalendarDate CalendarMonth Calendar Month
CalendarQuarter I_CalendarDate CalendarQuarter Calendar Quarter
CalendarWeek I_CalendarDate CalendarWeek Calendar Week
RoughGoodsReceiptQty
ScheduleLineNo

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_Purgdocscheduleline.
-- 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: PMMPURGSCH
-- Parameters: P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_Purgdocscheduleline AS
SELECT
  PurchaseDoc.PurchasingOrganization AS PurchasingOrganization,
  PurchaseDoc.PurchasingGroup AS PurchasingGroup,
  PurchaseDoc.CompanyCode AS CompanyCode,
  PurchaseDoc.Supplier AS Supplier,
  PurchaseDoc.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  PurchaseDoc.PurchasingDocumentOrigin AS PurchasingDocumentStatus,
  PurchaseDocItm.OrderQuantityUnit AS OrderQuantityUnit,
  CalendarDate.CalendarYear AS CalendarYear,
  CalendarDate.CalendarMonth AS CalendarMonth,
  CalendarDate.CalendarQuarter AS CalendarQuarter,
  CalendarDate.CalendarWeek AS CalendarWeek,
  sum( case when IsReturnsItem = 'X' then PurgDocScheduleLine.RoughGoodsReceiptQty * -1 else PurgDocScheduleLine.RoughGoodsReceiptQty end) AS RoughGoodsReceiptQty,
  cast( sum( 1 ) as abap.int4) AS ScheduleLineNo
FROM I_PurgDocScheduleLine AS PurgDocScheduleLine
INNER JOIN I_PurchasingDocument AS PurchaseDoc ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurchasingDocumentItem AS PurchaseDocItm ON /* join condition not captured in parsed metadata */
INNER JOIN I_CalendarDate AS CalendarDate ON /* join condition not captured in parsed metadata */
;