P_QuantityContractRelHistory
P_QuantityContractRelHistory
P_QuantityContractRelHistory is a Consumption CDS View that provides data about "P_QuantityContractRelHistory" in SAP S/4HANA. It reads from 2 data sources (I_PurchaseContractHistory, P_QuantityContract) and exposes 21 fields. Part of development package ODATA_MM_ANALYTICS.
Data Sources (2)
| Source | Alias | Join Type |
|---|---|---|
| I_PurchaseContractHistory | I_PurchaseContractHistory | left_outer |
| P_QuantityContract | P_QuantityContract | from |
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 | PQTYCONTRACTR | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| VDM.private | true | view | |
| VDM.viewType | #CONSUMPTION | view | |
| AccessControl.personalData.blocking | #NOT_REQUIRED | view |
Fields (21)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| PurchaseContract | P_QuantityContract | PurchaseContract | Purchasing Doc. | |
| PurchaseContractItem | P_QuantityContract | PurchaseContractItem | Item | |
| ReleaseOrder | ReleaseOrder | Purchasing Doc. | ||
| CalendarYear | CalendarYear | Year | ||
| CalendarQuarter | CalendarQuarter | Calendar Quarter | ||
| CalendarMonth | CalendarMonth | Calendar Month | ||
| CalendarWeek | CalendarWeek | Calendar Week | ||
| OrderQuantityUnit | OrderQuantityUnit | Sales Unit | ||
| ValidityStartDate | ValidityStartDate | Validity Start Date | ||
| ValidityEndDate | ValidityEndDate | ValidTo | ||
| TargetQuantity | TargetQuantity | Target Quantity | ||
| TargetAmount | TargetAmount | Target Value | ||
| ReleaseOrderItemNetAmount | I_PurchaseContractHistory | ReleaseOrderItemNetAmount | Net Value | |
| ReleaseOrderItemOrderQuantity | I_PurchaseContractHistory | ReleaseOrderItemOrderQuantity | PO Quantity | |
| ReleaseOrderCurrency | I_PurchaseContractHistory | ReleaseOrderCurrency | Currency | |
| ReleaseOrderItemLastChgDate | I_PurchaseContractHistory | ReleaseOrderItemLastChgDate | Changed On | |
| PurchaseContractType | PurchaseContractType | Order Type | ||
| PurchasingGroup | PurchasingGroup | Purchasing Group | ||
| PurchasingOrganization | I_PurchaseContractHistory | PurchasingOrganization | Purchasing Organization | |
| Plant | P_QuantityContract | Plant | Valuation Area | |
| CONT_LEN | 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_QuantityContractRelHistory.
-- 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: PQTYCONTRACTR
CREATE VIEW P_QuantityContractRelHistory AS
SELECT
P_QuantityContract.PurchaseContract AS PurchaseContract,
P_QuantityContract.PurchaseContractItem AS PurchaseContractItem,
ReleaseOrder,
CalendarYear,
CalendarQuarter,
CalendarMonth,
CalendarWeek,
OrderQuantityUnit,
ValidityStartDate,
ValidityEndDate,
TargetQuantity,
TargetAmount,
I_PurchaseContractHistory.ReleaseOrderItemNetAmount AS ReleaseOrderItemNetAmount,
I_PurchaseContractHistory.ReleaseOrderItemOrderQuantity AS ReleaseOrderItemOrderQuantity,
I_PurchaseContractHistory.ReleaseOrderCurrency AS ReleaseOrderCurrency,
I_PurchaseContractHistory.ReleaseOrderItemLastChgDate AS ReleaseOrderItemLastChgDate,
PurchaseContractType,
PurchasingGroup,
I_PurchaseContractHistory.PurchasingOrganization AS PurchasingOrganization,
P_QuantityContract.Plant AS Plant,
CONT_LEN
FROM P_QuantityContract
LEFT OUTER JOIN I_PurchaseContractHistory 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