P_TrdgContrItemCalcCommonQty
P_TrdgContrItemCalcCommonQty is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (I_TrdgContrItemOriginalQty) and exposes 5 fields with key fields ContractNum, TradingContractItem. It has 5 associations to related views.
Data Sources (1)
| Source | Alias | Join Type |
|---|---|---|
| I_TrdgContrItemOriginalQty | OriginalQty | from |
Associations (5)
| Cardinality | Target | Alias | Condition |
|---|---|---|---|
| [0..*] | I_TrdgContrItemConsumedQty | _consumedQty | OriginalQty.ContractNum = _consumedQty.ContractNum and OriginalQty.TradingContractItem = _consumedQty.TradingContractItem |
| [0..*] | P_TrdgContItemApplTotalQty | _appl | OriginalQty.ContractNum = _appl.ContractNum and OriginalQty.TradingContractItem = _appl.ContractItem |
| [0..*] | P_CancelledQuantity | _cancQty | OriginalQty.ContractNum = _cancQty.ContractNum and OriginalQty.TradingContractItem = _cancQty.ContractItem |
| [0..*] | P_WashoutQuantity | _wshoutQty | OriginalQty.ContractNum = _wshoutQty.ContractNum and OriginalQty.TradingContractItem = _wshoutQty.ContractItem |
| [0..*] | P_TrdgContrShadowData | _shdw | OriginalQty.ContractNum = _shdw.ContractNum and OriginalQty.TradingContractItem = _shdw.ContractItem |
Annotations (10)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PTRDGCONCALCCOMN | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view | |
| VDM.private | true | view | |
| VDM.viewType | #COMPOSITE | view |
Fields (5)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | ContractNum | I_TrdgContrItemOriginalQty | ContractNum | Trading Contract |
| KEY | TradingContractItem | I_TrdgContrItemOriginalQty | TradingContractItem | Item Number |
| TradingContractCategory | I_TrdgContrItemOriginalQty | TradingContractCategory | Cont. Category | |
| TradingContractType | I_TrdgContrItemOriginalQty | TradingContractType | Contract Type | |
| TrdgContractItemUnitOfMeasure | _shdw | item_uom | ItemUoM |
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_TrdgContrItemCalcCommonQty.
-- 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: PTRDGCONCALCCOMN
CREATE VIEW P_TrdgContrItemCalcCommonQty AS
SELECT
OriginalQty.ContractNum AS ContractNum,
OriginalQty.TradingContractItem AS TradingContractItem,
OriginalQty.TradingContractCategory AS TradingContractCategory,
OriginalQty.TradingContractType AS TradingContractType,
_shdw.item_uom AS TrdgContractItemUnitOfMeasure
FROM I_TrdgContrItemOriginalQty AS OriginalQty
LEFT OUTER JOIN I_TrdgContrItemConsumedQty AS _consumedQty ON OriginalQty.ContractNum = _consumedQty.ContractNum AND OriginalQty.TradingContractItem = _consumedQty.TradingContractItem -- association [0..*]
LEFT OUTER JOIN P_TrdgContItemApplTotalQty AS _appl ON OriginalQty.ContractNum = _appl.ContractNum AND OriginalQty.TradingContractItem = _appl.ContractItem -- association [0..*]
LEFT OUTER JOIN P_CancelledQuantity AS _cancQty ON OriginalQty.ContractNum = _cancQty.ContractNum AND OriginalQty.TradingContractItem = _cancQty.ContractItem -- association [0..*]
LEFT OUTER JOIN P_WashoutQuantity AS _wshoutQty ON OriginalQty.ContractNum = _wshoutQty.ContractNum AND OriginalQty.TradingContractItem = _wshoutQty.ContractItem -- association [0..*]
LEFT OUTER JOIN P_TrdgContrShadowData AS _shdw ON OriginalQty.ContractNum = _shdw.ContractNum AND OriginalQty.TradingContractItem = _shdw.ContractItem -- association [0..*]
;
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