P_PurOrdItmAcctAssgmt1

DDL: P_PURORDITMACCTASSGMT1 SQL: PMMPOIACCASGMT1 Type: view CONSUMPTION

P_PurOrdItmAcctAssgmt1 is a Consumption CDS View in SAP S/4HANA. It reads from 3 data sources (I_PurgDocAccountAssignment, I_PurchaseOrder, I_PurchaseOrderItem) and exposes 34 fields with key fields PurchaseOrder, PurchaseOrderItem, AccountAssignmentNumber.

Data Sources (3)

SourceAliasJoin Type
I_PurgDocAccountAssignment AccountAssignment left_outer
I_PurchaseOrder PurchaseOrder inner
I_PurchaseOrderItem PurchaseOrderItem from

Parameters (2)

NameTypeDefault
P_StartDate bedat
P_EndDate bedat

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PMMPOIACCASGMT1 view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #CONSUMPTION view
VDM.private true view
AccessControl.personalData.blocking #NOT_REQUIRED view

Fields (34)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder I_PurchaseOrderItem PurchaseOrder Purchasing Document
KEY PurchaseOrderItem I_PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY AccountAssignmentNumber I_PurgDocAccountAssignment AccountAssignmentNumber Account Assgmt No.
Supplier I_PurchaseOrder Supplier Supplier
PurchasingOrganization I_PurchaseOrder PurchasingOrganization Purchasing Organization
PurchasingGroup I_PurchaseOrder PurchasingGroup Purchasing Group
CompanyCode I_PurchaseOrder CompanyCode Receiver Company Code
ReceivingCompanyCode I_PurchaseOrderItem CompanyCode Receiver Company Code
PurchaseOrderType I_PurchaseOrder PurchaseOrderType PO Type
PurchaseOrderDate I_PurchaseOrder PurchaseOrderDate PO Date
CreatedByUser I_PurchaseOrder CreatedByUser User Name
Currency I_PurchaseOrder DocumentCurrency Document Currency
MaterialGroup I_PurchaseOrderItem MaterialGroup Product Group
Material I_PurchaseOrderItem Material Vehicle Model
Plant I_PurchaseOrderItem Plant Valuation Area
ProductType I_PurchaseOrderItem ProductType Product Type Group
ServicePerformer I_PurchaseOrderItem ServicePerformer Service Performer
MultipleAcctAssgmtDistribution I_PurchaseOrderItem MultipleAcctAssgmtDistribution Distribution
AccountAssignmentCategory I_PurchaseOrderItem AccountAssignmentCategory Acct Assgmt Cat
MultipleAcctAssgmtDistrPercent I_PurgDocAccountAssignment MultipleAcctAssgmtDistrPercent Distribution
CostCenter I_PurgDocAccountAssignment CostCenter Cost Center
WBSElementInternalID I_PurgDocAccountAssignment WBSElementInternalID WBS Internal ID
ControllingArea I_PurgDocAccountAssignment ControllingArea Controlling Area
GLAccount I_PurgDocAccountAssignment GLAccount General Ledger
ProfitCenter I_PurgDocAccountAssignment ProfitCenter Profit Center
Quantity I_PurgDocAccountAssignment Quantity Value
OrderQuantity I_PurchaseOrderItem OrderQuantity Quantity
PurchaseOrderQuantityUnit I_PurchaseOrderItem PurchaseOrderQuantityUnit Order Unit
IsCompletelyDelivered IsCompletelyDelivered Is completely delivered
InvoiceIsGoodsReceiptBased InvoiceIsGoodsReceiptBased GR-Based IV
OverdelivTolrtdLmtRatioInPct OverdelivTolrtdLmtRatioInPct Overdeliv. Tol.
UnderdelivTolrtdLmtRatioInPct UnderdelivTolrtdLmtRatioInPct Underdel. Tol.
ReturnsItem
QuantityendasPurchaseOrderQty

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_PurOrdItmAcctAssgmt1.
-- 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: PMMPOIACCASGMT1
-- Parameters: P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_PurOrdItmAcctAssgmt1 AS
SELECT
  PurchaseOrderItem.PurchaseOrder AS PurchaseOrder,
  PurchaseOrderItem.PurchaseOrderItem AS PurchaseOrderItem,
  AccountAssignment.AccountAssignmentNumber AS AccountAssignmentNumber,
  PurchaseOrder.Supplier AS Supplier,
  PurchaseOrder.PurchasingOrganization AS PurchasingOrganization,
  PurchaseOrder.PurchasingGroup AS PurchasingGroup,
  PurchaseOrder.CompanyCode AS CompanyCode,
  PurchaseOrderItem.CompanyCode AS ReceivingCompanyCode,
  PurchaseOrder.PurchaseOrderType AS PurchaseOrderType,
  PurchaseOrder.PurchaseOrderDate AS PurchaseOrderDate,
  PurchaseOrder.CreatedByUser AS CreatedByUser,
  PurchaseOrder.DocumentCurrency AS Currency,
  PurchaseOrderItem.MaterialGroup AS MaterialGroup,
  PurchaseOrderItem.Material AS Material,
  PurchaseOrderItem.Plant AS Plant,
  PurchaseOrderItem.ProductType AS ProductType,
  PurchaseOrderItem.ServicePerformer AS ServicePerformer,
  PurchaseOrderItem.MultipleAcctAssgmtDistribution AS MultipleAcctAssgmtDistribution,
  PurchaseOrderItem.AccountAssignmentCategory AS AccountAssignmentCategory,
  AccountAssignment.MultipleAcctAssgmtDistrPercent AS MultipleAcctAssgmtDistrPercent,
  AccountAssignment.CostCenter AS CostCenter,
  AccountAssignment.WBSElementInternalID AS WBSElementInternalID,
  AccountAssignment.ControllingArea AS ControllingArea,
  AccountAssignment.GLAccount AS GLAccount,
  AccountAssignment.ProfitCenter AS ProfitCenter,
  AccountAssignment.Quantity AS Quantity,
  PurchaseOrderItem.OrderQuantity AS OrderQuantity,
  PurchaseOrderItem.PurchaseOrderQuantityUnit AS PurchaseOrderQuantityUnit,
  IsCompletelyDelivered,
  InvoiceIsGoodsReceiptBased,
  OverdelivTolrtdLmtRatioInPct,
  UnderdelivTolrtdLmtRatioInPct,
  cast( case when PurchaseOrderItem.IsReturnsItem = 'X' then -1 else 1 end as int2 ) AS ReturnsItem,
  case when PurchaseOrderItem.MultipleAcctAssgmtDistribution = '' then PurchaseOrderItem.OrderQuantity else AccountAssignment.Quantity end as PurchaseOrderQty AS QuantityendasPurchaseOrderQty
FROM I_PurchaseOrderItem AS PurchaseOrderItem
INNER JOIN I_PurchaseOrder AS PurchaseOrder ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_PurgDocAccountAssignment AS AccountAssignment ON /* join condition not captured in parsed metadata */
;