P_SchedgAgrmtItmDelivCalc
Scheduling Agreement Calculations
P_SchedgAgrmtItmDelivCalc is a Consumption CDS View that provides data about "Scheduling Agreement Calculations" in SAP S/4HANA. It reads from 2 data sources (P_SchedgAgrmtItmSchLineData, I_SchedgAgrmtItm) and exposes 20 fields with key fields SchedulingAgreement, SchedulingAgreementItem. It has 1 association to related views.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| P_SchedgAgrmtItmSchLineData | NextScheduleLine | left_outer |
| I_SchedgAgrmtItm | SchedulingAgreementItem | from |
Associations (1)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | P_SchedgAgrmtItmGRQty | _SAItemGR | _SAItemGR.SchedulingAgreement = SchedulingAgreementItem.SchedulingAgreement and _SAItemGR.SchedulingAgreementItem = SchedulingAgreementItem.SchedulingAgreementItem |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSAITMDELCAL | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| EndUserText.label | Scheduling Agreement Calculations | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (20)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SchedulingAgreement | I_SchedgAgrmtItm | SchedulingAgreement | Scheduling Agreement |
| KEY | SchedulingAgreementItem | I_SchedgAgrmtItm | SchedulingAgreementItem | Schedule Item Number |
| ScheduleLine | P_SchedgAgrmtItmSchLineData | ScheduleLine | Schedule Line | |
| TargetQuantity | I_SchedgAgrmtItm | TargetQuantity | Target Quantity | |
| NetPriceAmount | I_SchedgAgrmtItm | NetPriceAmount | Net Price | |
| NetAmount | ||||
| ScheduleLineOrderQuantity | P_SchedgAgrmtItmSchLineData | ScheduleLineOrderQuantity | Scheduled Qty | |
| RoughGoodsReceiptQty | P_SchedgAgrmtItmSchLineData | RoughGoodsReceiptQty | Delivered | |
| ReleasedQuantityendasReleasedQuantity | ||||
| GoodsReceiptQtyendasGoodsReceiptQty | ||||
| OrderQuantityUnit | I_SchedgAgrmtItm | OrderQuantityUnit | Sales Unit | |
| DocumentCurrency | DocumentCurrency | Document Currency | ||
| GoodsReceiptIsExpected | I_SchedgAgrmtItm | GoodsReceiptIsExpected | Goods Receipt | |
| TodayDate | ||||
| PurchasingDocumentItemCategory | PurchasingDocumentItemCategory | Item Category | ||
| Plant | I_SchedgAgrmtItm | Plant | Valuation Area | |
| StorageLocation | I_SchedgAgrmtItm | StorageLocation | StorageLocation | |
| PurchasingDocumentType | ||||
| PurchasingOrganization | ||||
| PurchasingGroup |
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_SchedgAgrmtItmDelivCalc.
-- 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: PSAITMDELCAL
CREATE VIEW P_SchedgAgrmtItmDelivCalc AS
SELECT
SchedulingAgreementItem.SchedulingAgreement AS SchedulingAgreement,
SchedulingAgreementItem.SchedulingAgreementItem AS SchedulingAgreementItem,
NextScheduleLine.ScheduleLine AS ScheduleLine,
SchedulingAgreementItem.TargetQuantity AS TargetQuantity,
SchedulingAgreementItem.NetPriceAmount AS NetPriceAmount,
SchedulingAgreementItem.TargetQuantity * division(SchedulingAgreementItem.NetPriceAmount, SchedulingAgreementItem.NetPriceQuantity, 2) AS NetAmount,
NextScheduleLine.ScheduleLineOrderQuantity AS ScheduleLineOrderQuantity,
NextScheduleLine.RoughGoodsReceiptQty AS RoughGoodsReceiptQty,
case when (_SAItemGR.ReleasedQuantity is null) then cast (0 as abap.quan(13,3)) else _SAItemGR.ReleasedQuantity end as ReleasedQuantity AS ReleasedQuantityendasReleasedQuantity,
case when (_SAItemGR.GoodsReceiptQty is null or SchedulingAgreementItem.GoodsReceiptIsExpected <> 'X') then cast(0 as abap.quan(13,3)) else _SAItemGR.GoodsReceiptQty end as GoodsReceiptQty AS GoodsReceiptQtyendasGoodsReceiptQty,
SchedulingAgreementItem.OrderQuantityUnit AS OrderQuantityUnit,
DocumentCurrency,
SchedulingAgreementItem.GoodsReceiptIsExpected AS GoodsReceiptIsExpected,
$session.system_date AS TodayDate,
PurchasingDocumentItemCategory,
SchedulingAgreementItem.Plant AS Plant,
SchedulingAgreementItem.StorageLocation AS StorageLocation,
SchedulingAgreementItem._Schedgagrmthdr.PurchasingDocumentType AS PurchasingDocumentType,
SchedulingAgreementItem._Schedgagrmthdr.PurchasingOrganization AS PurchasingOrganization,
SchedulingAgreementItem._Schedgagrmthdr.PurchasingGroup AS PurchasingGroup
FROM I_SchedgAgrmtItm AS SchedulingAgreementItem
LEFT OUTER JOIN P_SchedgAgrmtItmSchLineData AS NextScheduleLine ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN P_SchedgAgrmtItmGRQty AS _SAItemGR ON _SAItemGR.SchedulingAgreement = SchedulingAgreementItem.SchedulingAgreement AND _SAItemGR.SchedulingAgreementItem = SchedulingAgreementItem.SchedulingAgreementItem -- 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