P_QuantityContract
P_QuantityContract is a Consumption CDS View in SAP S/4HANA. It reads from 4 data sources (I_PurContractClassification, I_PurchaseContract, I_PurchaseContractItem, I_CalendarDate) and exposes 16 fields.
Data Sources (4)
| Source | Alias | Join Type |
|---|---|---|
| I_PurContractClassification | ContractClassification | inner |
| I_PurchaseContract | PurchaseContract | inner |
| I_PurchaseContractItem | PurchaseContractItem | from |
| I_CalendarDate | RelevantDates | inner |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| AbapCatalog.sqlViewName | PQTYCONTRACT | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #BLOCKED_DATA_EXCLUDED | view |
Fields (16)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| PurchaseContract | I_PurchaseContract | ActivePurchasingDocument | Active Purchase Doc | |
| PurchaseContractType | I_PurchaseContract | PurchaseContractType | Order Type | |
| PurchasingOrganization | I_PurchaseContract | PurchasingOrganization | Purchasing Organization | |
| PurchasingGroup | I_PurchaseContract | PurchasingGroup | Purchasing Group | |
| Plant | Plant | Valuation Area | ||
| PurchaseContractItem | I_PurchaseContractItem | PurchaseContractItem | Item | |
| CalendarYear | CalendarYear | Year | ||
| CalendarQuarter | CalendarQuarter | Calendar Quarter | ||
| CalendarMonth | CalendarMonth | Calendar Month | ||
| CalendarWeek | CalendarWeek | Calendar Week | ||
| OrderQuantityUnit | OrderQuantityUnit | Sales Unit | ||
| ValidityStartDate | I_PurchaseContract | ValidityStartDate | Validity Start Date | |
| ValidityEndDate | I_PurchaseContract | ValidityEndDate | ValidTo | |
| TargetQuantity | TargetQuantity | Target Quantity | ||
| TargetAmount | TargetAmount | Target Value | ||
| CONT_LEN |
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_QuantityContract.
-- 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: PQTYCONTRACT
CREATE VIEW P_QuantityContract AS
SELECT
PurchaseContract.ActivePurchasingDocument AS PurchaseContract,
PurchaseContract.PurchaseContractType AS PurchaseContractType,
PurchaseContract.PurchasingOrganization AS PurchasingOrganization,
PurchaseContract.PurchasingGroup AS PurchasingGroup,
Plant,
PurchaseContractItem.PurchaseContractItem AS PurchaseContractItem,
CalendarYear,
CalendarQuarter,
CalendarMonth,
CalendarWeek,
OrderQuantityUnit,
PurchaseContract.ValidityStartDate AS ValidityStartDate,
PurchaseContract.ValidityEndDate AS ValidityEndDate,
TargetQuantity,
TargetAmount,
dats_days_between(ValidityStartDate, ValidityEndDate) AS CONT_LEN
FROM I_PurchaseContractItem AS PurchaseContractItem
INNER JOIN I_PurchaseContract AS PurchaseContract ON /* join condition not captured in parsed metadata */
INNER JOIN I_CalendarDate AS RelevantDates ON /* join condition not captured in parsed metadata */
INNER JOIN I_PurContractClassification AS ContractClassification ON /* join condition not captured in parsed metadata */
;
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