P_ProjProcmtPurReqnOrd

DDL: P_PROJPROCMTPURREQNORD SQL: PPROJPROCMTPRPO Type: view COMPOSITE

P_ProjProcmtPurReqnOrd is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_PurchaseReqnAcctAssgmt, I_Purchaserequisitionitem) and exposes 47 fields with key fields WBSElementInternalID, ProjectNetworkInternalID, NetworkActivityInternalID, PurchaseRequisition, PurchaseRequisitionItem. It has 4 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_PurchaseReqnAcctAssgmt _PR from
I_Purchaserequisitionitem _PRDetails left_outer

Associations (4)

CardinalityTargetAliasCondition
[0..1] I_WBSElement _WBSElement $projection.WBSElementInternalID = _WBSElement.WBSElementInternalID
[0..1] I_PurchaseOrderItem _POStatus _PRDetails.PurchasingDocument = _POStatus.PurchaseOrder and _PRDetails.PurchasingDocumentItem = _POStatus.PurchaseOrderItem
[0..1] I_ProjectNetworkBasicData _Network $projection.ProjectNetworkInternalID = _Network.ProjectNetworkInternalID or _PR.ProjectNetwork = _Network.ProjectNetwork
[0..1] I_NetworkActivity _NetworkActivity $projection.ProjectNetworkInternalID = _NetworkActivity.ProjectNetworkInternalID and $projection.NetworkActivityInternalID = _NetworkActivity.NetworkActivityInternalID

Annotations (10)

NameValueLevelField
AbapCatalog.sqlViewName PPROJPROCMTPRPO view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #PRIVILEGED_ONLY view
AccessControl.personalData.blocking #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
VDM.private true view

Fields (47)

KeyFieldSource TableSource FieldDescription
KEY WBSElementInternalID WBSElementInternalID WBS Internal ID
KEY ProjectNetworkInternalID ProjectNetworkInternalID Plan No.f.Oper.
KEY NetworkActivityInternalID NetworkActivityInternalID Counter
KEY PurchaseRequisition I_PurchaseReqnAcctAssgmt PurchaseRequisition Requisition
KEY PurchaseRequisitionItem I_PurchaseReqnAcctAssgmt PurchaseRequisitionItem Requisn. item
KEY PurchaseOrder I_Purchaserequisitionitem PurchasingDocument Purchasing Document
KEY PurchaseOrderItem I_Purchaserequisitionitem PurchasingDocumentItem Purchasing Doc. Item
KEY AccountAssignmentNumber PurReqnAcctAssgmtNmbr Ser.no.acc.ass.
ProfitCenter I_PurchaseReqnAcctAssgmt ProfitCenter Profit Center
ProjectendasProject
ProjectType _WBSElement ProjectType Project Type
ProjectProfileCode
CompanyCode _WBSElement CompanyCode Receiver Company Code
ControllingArea _WBSElement ControllingArea Controlling Area
WBSElementProfitCenter _WBSElement ProfitCenter Profit Center
WBSElementendasWBSElement
WBSDescriptionendasWBSDescription
ProjectInternalIDendasProjectInternalID
FormattedPurchasingDocItem
PurchasingDocumentType I_Purchaserequisitionitem PurchaseRequisitionType Order Type
PurchasingDocumentCategory I_Purchaserequisitionitem PurchasingDocumentCategory Doc. Category
PurchaseRequisitionItemText I_Purchaserequisitionitem PurchaseRequisitionItemText Short Text
PurchasingReleaseStatus I_Purchaserequisitionitem PurReqnReleaseStatus Proc.state
CreationDate I_Purchaserequisitionitem CreationDate Time Stamp
Supplier I_Purchaserequisitionitem Supplier Supplier
Material I_Purchaserequisitionitem Material Vehicle Model
MaterialGroup I_Purchaserequisitionitem MaterialGroup Product Group
Plant I_Purchaserequisitionitem Plant Valuation Area
PurchasingOrganization I_Purchaserequisitionitem PurchasingOrganization Purchasing Organization
PurchasingGroup I_Purchaserequisitionitem PurchasingGroup Purchasing Group
StorageLocation I_Purchaserequisitionitem StorageLocation StorageLocation
OrderedQuantity I_Purchaserequisitionitem OrderedQuantity Quantity
TotalQuantity I_Purchaserequisitionitem RequestedQuantity Requested Quantity
QuantityasTotalQuantity
NetAmountendasNetAmount
DeliveryDateendasDeliveryDate
DocumentCurrency _PurchaseOrderItem DocumentCurrency Document Currency
OrderQuantityUnit _PurchaseOrderItem PurchaseOrderQuantityUnit Order Unit
PurchasingDocumentPartnerType
IsCompletelyDelivered _PurchaseOrderItem IsCompletelyDelivered Is completely delivered
ScheduleLineDeliveryDate _SchedLines ScheduleLineDeliveryDate Delivery Date
ScheduleLineLatestDeliveryDate _DelDate ScheduleLineLatestDeliveryDate
AccountAssignmentCategory _PurchaseOrderItem AccountAssignmentCategory Acct Assgmt Cat
ProjectNetwork _Network ProjectNetwork Order
ProjectNetworkDescription _Network ProjectNetworkDescription Network Name
NetworkActivity _NetworkActivity NetworkActivity Operation/Activity
NetworkActivityDescription _NetworkActivity NetworkActivityDescription

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_ProjProcmtPurReqnOrd.
-- 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: PPROJPROCMTPRPO

CREATE VIEW P_ProjProcmtPurReqnOrd AS
SELECT
  WBSElementInternalID,
  ProjectNetworkInternalID,
  NetworkActivityInternalID,
  _PR.PurchaseRequisition AS PurchaseRequisition,
  _PR.PurchaseRequisitionItem AS PurchaseRequisitionItem,
  _PRDetails.PurchasingDocument AS PurchaseOrder,
  _PRDetails.PurchasingDocumentItem AS PurchaseOrderItem,
  PurReqnAcctAssgmtNmbr AS AccountAssignmentNumber,
  _PR.ProfitCenter AS ProfitCenter,
  case when _WBSElement.Project is not initial then _WBSElement.Project else _Network._Project.Project end as Project AS ProjectendasProject,
  _WBSElement.ProjectType AS ProjectType,
  _WBSElement._Project.ProjectProfileCode AS ProjectProfileCode,
  _WBSElement.CompanyCode AS CompanyCode,
  _WBSElement.ControllingArea AS ControllingArea,
  _WBSElement.ProfitCenter AS WBSElementProfitCenter,
  case when _WBSElement.WBSElement is not initial then _WBSElement.WBSElement when _NetworkActivity.WBSElement is not initial then _NetworkActivity.WBSElement else _Network._WBSElementData.WBSElement end as WBSElement AS WBSElementendasWBSElement,
  case when _WBSElement.WBSElement is not initial then _WBSElement.WBSDescription when _NetworkActivity.WBSElement is not initial then _NetworkActivity._WBSElement.WBSDescription else _Network._WBSElementData.WBSDescription end as WBSDescription AS WBSDescriptionendasWBSDescription,
  case when _WBSElement.ProjectInternalID is not initial then _WBSElement.ProjectInternalID else _NetworkActivity.ProjectInternalID end as ProjectInternalID AS ProjectInternalIDendasProjectInternalID,
  concat(concat(_PR.PurchaseRequisition, '/'), _PR.PurchaseRequisitionItem) AS FormattedPurchasingDocItem,
  _PRDetails.PurchaseRequisitionType AS PurchasingDocumentType,
  _PRDetails.PurchasingDocumentCategory AS PurchasingDocumentCategory,
  _PRDetails.PurchaseRequisitionItemText AS PurchaseRequisitionItemText,
  _PRDetails.PurReqnReleaseStatus AS PurchasingReleaseStatus,
  _PRDetails.CreationDate AS CreationDate,
  _PRDetails.Supplier AS Supplier,
  _PRDetails.Material AS Material,
  _PRDetails.MaterialGroup AS MaterialGroup,
  _PRDetails.Plant AS Plant,
  _PRDetails.PurchasingOrganization AS PurchasingOrganization,
  _PRDetails.PurchasingGroup AS PurchasingGroup,
  _PRDetails.StorageLocation AS StorageLocation,
  _PRDetails.OrderedQuantity AS OrderedQuantity,
  _PRDetails.RequestedQuantity AS TotalQuantity,
  / _PO.Quantity as TotalQuantity AS QuantityasTotalQuantity,
  case when _PO.MultipleAcctAssgmtDistrPercent <> 0 then div(_PurchaseOrderItem.NetAmount * _PO.MultipleAcctAssgmtDistrPercent,100) when _PO.MultipleAcctAssgmtDistrPercent = 0 then _PurchaseOrderItem.NetAmount end as NetAmount AS NetAmountendasNetAmount,
  case when _PurchaseOrderItem.IsCompletelyDelivered = 'X' and _DelDate.DeliveryDate = '99991231' then _SchedLines.ScheduleLineDeliveryDate when _PurchaseOrderItem.IsCompletelyDelivered <> 'X' and _DelDate.DeliveryDate <> '99991231' then _DelDate.DeliveryDate end as DeliveryDate AS DeliveryDateendasDeliveryDate,
  _PurchaseOrderItem.DocumentCurrency AS DocumentCurrency,
  _PurchaseOrderItem.PurchaseOrderQuantityUnit AS OrderQuantityUnit,
  'PO' AS PurchasingDocumentPartnerType,
  _PurchaseOrderItem.IsCompletelyDelivered AS IsCompletelyDelivered,
  _SchedLines.ScheduleLineDeliveryDate AS ScheduleLineDeliveryDate,
  _DelDate.ScheduleLineLatestDeliveryDate AS ScheduleLineLatestDeliveryDate,
  _PurchaseOrderItem.AccountAssignmentCategory AS AccountAssignmentCategory,
  _Network.ProjectNetwork AS ProjectNetwork,
  _Network.ProjectNetworkDescription AS ProjectNetworkDescription,
  _NetworkActivity.NetworkActivity AS NetworkActivity,
  _NetworkActivity.NetworkActivityDescription AS NetworkActivityDescription
FROM I_PurchaseReqnAcctAssgmt AS _PR
LEFT OUTER JOIN I_Purchaserequisitionitem AS _PRDetails ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_WBSElement AS _WBSElement ON WBSElementInternalID = _WBSElement.WBSElementInternalID  -- association [0..1]
LEFT OUTER JOIN I_PurchaseOrderItem AS _POStatus ON _PRDetails.PurchasingDocument = _POStatus.PurchaseOrder AND _PRDetails.PurchasingDocumentItem = _POStatus.PurchaseOrderItem  -- association [0..1]
LEFT OUTER JOIN I_ProjectNetworkBasicData AS _Network ON ProjectNetworkInternalID = _Network.ProjectNetworkInternalID OR _PR.ProjectNetwork = _Network.ProjectNetwork  -- association [0..1]
LEFT OUTER JOIN I_NetworkActivity AS _NetworkActivity ON ProjectNetworkInternalID = _NetworkActivity.ProjectNetworkInternalID AND NetworkActivityInternalID = _NetworkActivity.NetworkActivityInternalID  -- association [0..1]
;