P_PODelivSchedDteCalStatus

DDL: P_PODELIVSCHEDDTECALSTATUS SQL: POCALSTATUS Type: view CONSUMPTION Package: ODATA_PRC_OVP

PO by Delivery Sch. Date Calc Status

P_PODelivSchedDteCalStatus is a Consumption CDS View that provides data about "PO by Delivery Sch. Date Calc Status" in SAP S/4HANA. It reads from 1 data source (P_PODelivSchedDteCalWeek) and exposes 13 fields with key fields PurchaseOrder, PurchaseOrderItem, ScheduleLine. It has 1 association to related views. Part of development package ODATA_PRC_OVP.

Data Sources (1)

SourceAliasJoin Type
P_PODelivSchedDteCalWeek P_PODelivSchedDteCalWeek from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_PurchaseOrderItem _PurchaseOrderItem $projection.PurchaseOrder = _PurchaseOrderItem.PurchaseOrder and $projection.PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName POCALSTATUS view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
VDM.viewType #CONSUMPTION view
VDM.private true view

Fields (13)

KeyFieldSource TableSource FieldDescription
KEY PurchaseOrder PurchaseOrder Purchasing Document
KEY PurchaseOrderItem PurchaseOrderItem Purchasing Document Item
KEY ScheduleLine ScheduleLine Schedule Line
ScheduleLineDeliveryDate ScheduleLineDeliveryDate Delivery Date
TodaysDate TodaysDate
Supplier
CompanyCode _PurchaseOrderItem CompanyCode Receiver Company Code
Material _PurchaseOrderItem Material Vehicle Model
MaterialGroup _PurchaseOrderItem MaterialGroup Product Group
Plant _PurchaseOrderItem Plant Valuation Area
PurchasingGroup
PurchasingOrganization
char10asDurationToNextStatusInDays

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_PODelivSchedDteCalStatus.
-- 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: POCALSTATUS

CREATE VIEW P_PODelivSchedDteCalStatus AS
SELECT
  PurchaseOrder,
  PurchaseOrderItem,
  ScheduleLine,
  ScheduleLineDeliveryDate,
  TodaysDate,
  _PurchaseOrderItem._PurchaseOrder.Supplier AS Supplier,
  _PurchaseOrderItem.CompanyCode AS CompanyCode,
  _PurchaseOrderItem.Material AS Material,
  _PurchaseOrderItem.MaterialGroup AS MaterialGroup,
  _PurchaseOrderItem.Plant AS Plant,
  _PurchaseOrderItem._PurchaseOrder.PurchasingGroup AS PurchasingGroup,
  _PurchaseOrderItem._PurchaseOrder.PurchasingOrganization AS PurchasingOrganization,
  cast(case when DurationToNextStatusInDays <= 0 then 1 when DurationToNextStatusInDays > 0 and DurationToNextStatusInDays <= weekday1 then 1 when DurationToNextStatusInDays > weekday1 and DurationToNextStatusInDays <= weekday2 then 2 when DurationToNextStatusInDays > weekday2 and DurationToNextStatusInDays <= weekday3 then 3 when DurationToNextStatusInDays > weekday3 and DurationToNextStatusInDays <= weekday4 then 4 when DurationToNextStatusInDays > weekday4 and DurationToNextStatusInDays <= weekday5 then 5 else 6 end as abap.char(10)) as DurationToNextStatusInDays AS char10asDurationToNextStatusInDays
FROM P_PODelivSchedDteCalWeek
LEFT OUTER JOIN I_PurchaseOrderItem AS _PurchaseOrderItem ON PurchaseOrder = _PurchaseOrderItem.PurchaseOrder AND PurchaseOrderItem = _PurchaseOrderItem.PurchaseOrderItem  -- association [1..1]
;