P_PurReqnProcFlowGR

DDL: P_PURREQNPROCFLOWGR SQL: PPURREQNPFGR Type: view COMPOSITE

P_PurReqnProcFlowGR is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (P_PurchasingDocHistory, I_PurgDocScheduleLine) and exposes 9 fields with key fields ReferenceDocumentendasPrecedingDocument, SubsequentDocument, SubsequentDocumentItem.

Data Sources (2)

SourceAliasJoin Type
P_PurchasingDocHistory _purgDocHist inner
I_PurgDocScheduleLine schedgLine from

Annotations (6)

NameValueLevelField
VDM.private true view
VDM.viewType #COMPOSITE view
AbapCatalog.sqlViewName PPURREQNPFGR view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
ClientHandling.algorithm #SESSION_VARIABLE view

Fields (9)

KeyFieldSource TableSource FieldDescription
KEY ReferenceDocumentendasPrecedingDocument
KEY SubsequentDocument P_PurchasingDocHistory MaterialDocument Material Doc.
KEY SubsequentDocumentItem
SubsequentDocumentCategory P_PurchasingDocHistory PurchaseOrderTransactionType Transact. Type
MaterialDocumentYear _matDoc MaterialDocumentYear Material Document Year
MaterialDocumentRecordType _matDoc MaterialDocumentRecordType
CompanyCode _matDoc CompanyCode Receiver Company Code
PurchaseRequisition I_PurgDocScheduleLine PurchaseRequisition Requisition
PurchaseRequisitionItem I_PurgDocScheduleLine PurchaseRequisitionItem Requisn. item

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_PurReqnProcFlowGR.
-- 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: PPURREQNPFGR

CREATE VIEW P_PurReqnProcFlowGR AS
SELECT
  case when ( _purgDocHist.PurchaseOrderTransactionType = 'S' ) or ( _purgDocHist.ReferenceDocument = _purgDocHist.MaterialDocument ) or ( _purgDocHist.ReferenceDocument like '5%' ) or ( _purgDocHist.ReferenceDocument = '' ) then _purgDocHist.PurchasingDocument else _purgDocHist.ReferenceDocument end as PrecedingDocument AS ReferenceDocumentendasPrecedingDocument,
  _purgDocHist.MaterialDocument AS SubsequentDocument,
  cast(_purgDocHist.MaterialDocumentItem as char5) AS SubsequentDocumentItem,
  _purgDocHist.PurchaseOrderTransactionType AS SubsequentDocumentCategory,
  _matDoc.MaterialDocumentYear AS MaterialDocumentYear,
  _matDoc.MaterialDocumentRecordType AS MaterialDocumentRecordType,
  _matDoc.CompanyCode AS CompanyCode,
  schedgLine.PurchaseRequisition AS PurchaseRequisition,
  schedgLine.PurchaseRequisitionItem AS PurchaseRequisitionItem
FROM I_PurgDocScheduleLine AS schedgLine
INNER JOIN P_PurchasingDocHistory AS _purgDocHist ON /* join condition not captured in parsed metadata */
;