P_PurOrdSchedAcct

DDL: P_PURORDSCHEDACCT SQL: PMMPOSCHEACCT Type: view CONSUMPTION Package: ODATA_MM_ANALYTICS

Scheduled Purchase Orders

P_PurOrdSchedAcct is a Consumption CDS View that provides data about "Scheduled Purchase Orders" in SAP S/4HANA. It reads from 1 data source (P_PurOrdSchedAcct1) and exposes 42 fields with key fields PurchaseOrder, PurchaseOrderItem, ScheduleLine. Part of development package ODATA_MM_ANALYTICS.

Data Sources (1)

SourceAliasJoin Type
P_PurOrdSchedAcct1 P_PurOrdSchedAcct1 from

Parameters (3)

NameTypeDefault
P_DisplayCurrency displaycurrency
P_StartDate bedat
P_EndDate bedat

Annotations (9)

NameValueLevelField
ClientHandling.algorithm #SESSION_VARIABLE view
AbapCatalog.sqlViewName PMMPOSCHEACCT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Scheduled Purchase Orders view
VDM.private true view
VDM.viewType #CONSUMPTION view
AccessControl.personalData.blocking #NOT_REQUIRED view
AbapCatalog.preserveKey true view

Fields (42)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY ScheduleLine ScheduleLine Schedule Line
PurchaseOrderCategory PurchaseOrderCategory Doc. Category
PurchaseOrderItemCategory PurchaseOrderItemCategory Item Category
PurchaseRequisition PurchaseRequisition Requisition
PurchaseRequisitionItem PurchaseRequisitionItem Requisn. item
PurchaseOrderType PurchaseOrderType PO Type
PurchaseOrderDate PurchaseOrderDate PO Date
Supplier Supplier Supplier
CompanyCode CompanyCode Receiver Company Code
ReceivingCompanyCode ReceivingCompanyCode Rcvg Co Code
PurchasingGroup PurchasingGroup Purchasing Group
PurchasingOrganization PurchasingOrganization Purchasing Organization
MaterialGroup MaterialGroup Product Group
Material Material Vehicle Model
Plant Plant Valuation Area
ProductType ProductType Product Type Group
ServicePerformer ServicePerformer Service Performer
ScheduleLineDeliveryDate ScheduleLineDeliveryDate Delivery Date
SchedLineStscDeliveryDate SchedLineStscDeliveryDate Stat. Del. Date
PerformancePeriodStartDate PerformancePeriodStartDate Start of Performance Period
PerformancePeriodEndDate PerformancePeriodEndDate End of Performance Period
ScheduleLineDeliveryTime ScheduleLineDeliveryTime Time
ScheduleLineOrderQuantity ScheduleLineOrderQuantity Scheduled Qty
RoughGoodsReceiptQty RoughGoodsReceiptQty Delivered
CreatedByUser CreatedByUser User Name
PurchaseContract PurchaseContract Purchasing Doc.
PurchaseContractItem PurchaseContractItem Item
MultipleAcctAssgmtDistribution MultipleAcctAssgmtDistribution Distribution
AccountAssignmentCategory AccountAssignmentCategory Acct Assgmt Cat
PurchaseOrderQuantityUnit PurchaseOrderQuantityUnit Order Unit
DisplayCurrency
Currency Currency Valuation Crcy
ReturnsItem ReturnsItem
curr215endasNetPriceAmount
OrderItemQtyToBaseQtyNmrtr OrderItemQtyToBaseQtyNmrtr Equal To
OrderItemQtyToBaseQtyDnmntr OrderItemQtyToBaseQtyDnmntr Denominator
OrderPriceUnitToOrderUnitNmrtr OrderPriceUnitToOrderUnitNmrtr Quantity Conversion Numerator
OrdPriceUnitToOrderUnitDnmntr OrdPriceUnitToOrderUnitDnmntr Quantity Conversion Denominator
_PurchaseRequisition _PurchaseRequisition
_PurchaseRequisitionItem _PurchaseRequisitionItem

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_PurOrdSchedAcct.
-- 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: PMMPOSCHEACCT
-- Parameters: P_DisplayCurrency : displaycurrency, P_StartDate : bedat, P_EndDate : bedat

CREATE VIEW P_PurOrdSchedAcct AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  ScheduleLine,
  PurchaseOrderCategory,
  PurchaseOrderItemCategory,
  PurchaseRequisition,
  PurchaseRequisitionItem,
  PurchaseOrderType,
  PurchaseOrderDate,
  Supplier,
  CompanyCode,
  ReceivingCompanyCode,
  PurchasingGroup,
  PurchasingOrganization,
  MaterialGroup,
  Material,
  Plant,
  ProductType,
  ServicePerformer,
  ScheduleLineDeliveryDate,
  SchedLineStscDeliveryDate,
  PerformancePeriodStartDate,
  PerformancePeriodEndDate,
  ScheduleLineDeliveryTime,
  ScheduleLineOrderQuantity,
  RoughGoodsReceiptQty,
  CreatedByUser,
  PurchaseContract,
  PurchaseContractItem,
  MultipleAcctAssgmtDistribution,
  AccountAssignmentCategory,
  PurchaseOrderQuantityUnit,
  cast( :P_DisplayCurrency as displaycurrency ) AS DisplayCurrency,
  Currency,
  ReturnsItem,
  case when NetPriceQuantity !=0 then cast(division(cast(currency_conversion(amount => NetPriceAmount, source_currency => Currency, target_currency => $parameters.P_DisplayCurrency, exchange_rate_type => 'M', exchange_rate_date => PurchaseOrderDate ) as abap.curr( 21, 5 ) ), NetPriceQuantity, 5) as abap.curr( 21, 5 )) else cast(0 as abap.curr(21,5)) end as NetPriceAmount AS curr215endasNetPriceAmount,
  OrderItemQtyToBaseQtyNmrtr,
  OrderItemQtyToBaseQtyDnmntr,
  OrderPriceUnitToOrderUnitNmrtr,
  OrdPriceUnitToOrderUnitDnmntr
FROM P_PurOrdSchedAcct1
;