P_SchedLineGIQty
P_SchedLineGIQty is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_SubcontractingComponent) and exposes 12 fields with key fields PurchasingDocument, PurchasingDocumentItem, ScheduleLine, Material, Supplier. It has 2 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_SubcontractingComponent | I_SubcontractingComponent | from |
Associations (2)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [1..1] | P_GdsIssQtyAggrgn | _GdsIssQtyAggrgn | _GdsIssQtyAggrgn.PurchasingDocument = $projection.PurchasingDocument and _GdsIssQtyAggrgn.PurchasingDocumentItem = $projection.PurchasingDocumentItem and _GdsIssQtyAggrgn.Material = $projection.Material and _GdsIssQtyAggrgn.Supplier = $projection.Supplier and _GdsIssQtyAggrgn.Plant = $projection.Plant |
| [1..1] | P_SubcontrgOrdsSchedLines | _SubcontrgOrdsSchedLines | _SubcontrgOrdsSchedLines.PurchasingDocument = $projection.PurchasingDocument and _SubcontrgOrdsSchedLines.PurchasingDocumentItem = $projection.PurchasingDocumentItem and _SubcontrgOrdsSchedLines.ScheduleLine = $projection.ScheduleLine and _SubcontrgOrdsSchedLines.Material = $projection.Material and _SubcontrgOrdsSchedLines.Supplier = $projection.Supplier and _SubcontrgOrdsSchedLines.Plant = $projection.Plant and _SubcontrgOrdsSchedLines.RequirementDate = $projection.RequirementDate and _SubcontrgOrdsSchedLines.Reservation = $projection.Reservation and _SubcontrgOrdsSchedLines.ReservationItem = $projection.ReservationItem |
Annotations (6)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PSCHGIQTY | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #PRIVILEGED_ONLY | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view |
Fields (12)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | PurchasingDocument | PurchasingDocument | Purchasing Document | |
| KEY | PurchasingDocumentItem | PurchasingDocumentItem | Purchasing Doc. Item | |
| KEY | ScheduleLine | ScheduleLine | Schedule Line | |
| KEY | Material | Material | Vehicle Model | |
| KEY | Supplier | Supplier | Supplier | |
| KEY | Plant | Plant | Valuation Area | |
| KEY | RequirementDate | RequirementDate | Requirement Date | |
| KEY | Reservation | Reservation | Reservation | |
| KEY | ReservationItem | ReservationItem | Reservation Item | |
| TotalGIPerPO | _GdsIssQtyAggrgn | TotalGIPerPO | ||
| CummulativeSheduleQuantity | _SubcontrgOrdsSchedLines | CummulativeSheduleQuantity | ||
| quan133asGIDonePerScheduleLineQty |
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_SchedLineGIQty.
-- 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: PSCHGIQTY
CREATE VIEW P_SchedLineGIQty AS
SELECT
PurchasingDocument,
PurchasingDocumentItem,
ScheduleLine,
Material,
Supplier,
Plant,
RequirementDate,
Reservation,
ReservationItem,
_GdsIssQtyAggrgn.TotalGIPerPO AS TotalGIPerPO,
_SubcontrgOrdsSchedLines.CummulativeSheduleQuantity AS CummulativeSheduleQuantity,
cast( case when _SubcontrgOrdsSchedLines.CummulativeSheduleQuantity is null and _GdsIssQtyAggrgn.TotalGIPerPO is null then cast (0 as bdmng) when _GdsIssQtyAggrgn.TotalGIPerPO is null then (0 - _SubcontrgOrdsSchedLines.CummulativeSheduleQuantity) else (_GdsIssQtyAggrgn.TotalGIPerPO - coalesce( _SubcontrgOrdsSchedLines.CummulativeSheduleQuantity, 0 ) ) end as abap.quan(13,3)) as GIDonePerScheduleLineQty AS quan133asGIDonePerScheduleLineQty
FROM I_SubcontractingComponent
LEFT OUTER JOIN P_GdsIssQtyAggrgn AS _GdsIssQtyAggrgn ON _GdsIssQtyAggrgn.PurchasingDocument = PurchasingDocument AND _GdsIssQtyAggrgn.PurchasingDocumentItem = PurchasingDocumentItem AND _GdsIssQtyAggrgn.Material = Material AND _GdsIssQtyAggrgn.Supplier = Supplier AND _GdsIssQtyAggrgn.Plant = Plant -- association [1..1]
LEFT OUTER JOIN P_SubcontrgOrdsSchedLines AS _SubcontrgOrdsSchedLines ON _SubcontrgOrdsSchedLines.PurchasingDocument = PurchasingDocument AND _SubcontrgOrdsSchedLines.PurchasingDocumentItem = PurchasingDocumentItem AND _SubcontrgOrdsSchedLines.ScheduleLine = ScheduleLine AND _SubcontrgOrdsSchedLines.Material = Material AND _SubcontrgOrdsSchedLines.Supplier = Supplier AND _SubcontrgOrdsSchedLines.Plant = Plant AND _SubcontrgOrdsSchedLines.RequirementDate = RequirementDate AND _SubcontrgOrdsSchedLines.Reservation = Reservation AND _SubcontrgOrdsSchedLines.ReservationItem = ReservationItem -- 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