P_CalcDeliveryDate
Private view for Delivery Date
P_CalcDeliveryDate is a Consumption CDS View that provides data about "Private view for Delivery Date" in SAP S/4HANA. It reads from 1 data source (P_PurchaseRequisitionItemMntr) and exposes 19 fields with key fields PurchaseRequisition, PurchaseRequisitionItem. It has 1 association to related views. Part of development package ODATA_MM_PUR_PRITEM_MNTR.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| P_PurchaseRequisitionItemMntr | P_PurchaseRequisitionItemMntr | from |
Parameters (1)
| Name | Type | Default |
|---|---|---|
| P_Date | sydatum |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | I_CalendarDate | _CalendarDate | _CalendarDate.CalendarDate = $parameters.P_Date |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PCALCDELDATE | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Private view for Delivery Date | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| Metadata.ignorePropagatedAnnotations | true | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view |
Fields (19)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchaseRequisition | PurchaseRequisition | Requisition | |
| KEY | PurchaseRequisitionItem | PurchaseRequisitionItem | Requisn. item | |
| DeliveryDate | DeliveryDate | Delivery Date | ||
| OpenQuantity | OpenQuantity | PBE Entry Open Qty | ||
| DurationToNextStatusInDays | ||||
| weekstart | ||||
| weekend | ||||
| secweekend | ||||
| calweek | ||||
| weekday1 | ||||
| weekday2 | ||||
| weekday4 | ||||
| dates | ||||
| weekday5 | ||||
| PurchaseRequisitionType | PurchaseRequisitionType | Order Type | ||
| Plant | Plant | Valuation Area | ||
| PurchasingOrganization | PurchasingOrganization | Purchasing Organization | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| _CalendarDate | _CalendarDate |
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_CalcDeliveryDate.
-- 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: PCALCDELDATE
-- Parameters: P_Date : sydatum
CREATE VIEW P_CalcDeliveryDate AS
SELECT
PurchaseRequisition,
PurchaseRequisitionItem,
DeliveryDate,
OpenQuantity,
dats_days_between($parameters.P_Date, DeliveryDate) AS DurationToNextStatusInDays,
DATS_ADD_DAYS(_CalendarDate.FirstDayOfWeekDate,-1,'NULL') AS weekstart,
DATS_ADD_DAYS(_CalendarDate.FirstDayOfWeekDate,5,'NULL') AS weekend,
DATS_ADD_DAYS(_CalendarDate.FirstDayOfWeekDate,12,'NULL') AS secweekend,
cast(cast(_CalendarDate.CalendarWeek as abap.int1( 3 )) - 1 as abap.char( 12 )) AS calweek,
7-cast(_CalendarDate.WeekDay as abap.int8) AS weekday1,
14-cast(_CalendarDate.WeekDay as abap.int8) AS weekday2,
28-cast(_CalendarDate.WeekDay as abap.int8) AS weekday4,
$parameters.P_Date AS dates,
DATS_ADD_DAYS(_CalendarDate.FirstDayOfWeekDate,-1,'NULL') AS weekday5,
PurchaseRequisitionType,
Plant,
PurchasingOrganization,
PurchasingGroup
FROM P_PurchaseRequisitionItemMntr
LEFT OUTER JOIN I_CalendarDate AS _CalendarDate ON _CalendarDate.CalendarDate = $parameters.P_Date -- association [1..1]
;
Learn More
- VDM (Virtual Data Model) in SAP S/4HANA Explained
- Types of CDS Views: Basic, Composite, Consumption, and Transactional
- CDS View Annotations — A Complete Guide
- What Is a CDS View in SAP S/4HANA?
- SAP Tables vs CDS Views — Key Differences
- Understanding Data Lineage in SAP S/4HANA
- CDS View Field Mapping and Associations
- Understanding the SAP S/4HANA Data Model
- CDS View Extensions and Custom Fields in SAP S/4HANA
- Released APIs and Stability Contracts in SAP S/4HANA
- BSEG to ACDOCA: The Universal Journal Migration
- Business Partner Migration: KNA1/LFA1 to BUT000
- Material Document Migration: MSEG/MKPF to MATDOC
- How to Find the Right CDS View for an SAP Table
- BW Extractor to CDS View Migration Guide
- S/4HANA CDS View Deprecation: What You Need to Know
- ABAP CDS View Tutorial — From Basics to Real-World Examples
- RAP and CDS Views — Building Transactional Apps in SAP S/4HANA
- Sales Document Status Migration: VBUP/VBUK Removal in S/4HANA
- CO Tables in S/4HANA: COEP, COBK, COSS, COSP to ACDOCA