P_TrdgContrPricingOverview
P_TrdgContrPricingOverview is a Composite CDS View in SAP S/4HANA. It reads from 9 data sources and exposes 47 fields with key field SourceLotId.
Data Sources (9)
| Source | Alias | Join Type |
|---|---|---|
| P_TradingContractBusinessDets | Business | inner |
| I_ACMContractCommoditySubitem | Comsub | inner |
| P_TradingContractHeader | Header | inner |
| I_ACMTradingContractItemData | Item | inner |
| I_ACMTradingContractItemAddl | ItemAddl | inner |
| I_ACMMaterialMstrData | material | inner |
| I_ACMMntnPrcgPrcFixDetFuture | PriceFixationF | left_outer |
| I_ACMMntnPrcgPrcFixDetNonHedge | PriceFixationNH | left_outer |
| I_ACMTrdgContrPrcAspectDets | PricingAspect | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PTRDGCTRPRC | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #NOT_REQUIRED | view | |
| ClientHandling.type | #INHERITED | view | |
| ClientHandling.algorithm | #SESSION_VARIABLE | view | |
| VDM.viewType | #COMPOSITE | view | |
| VDM.private | true | view | |
| ObjectModel.usageType.dataClass | #TRANSACTIONAL | view | |
| ObjectModel.usageType.serviceQuality | #C | view | |
| ObjectModel.usageType.sizeCategory | #L | view |
Fields (47)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | SourceLotId | I_ACMTrdgContrPrcAspectDets | TrdgContrPrcgAspectSrceLotID | Src. Lot ID |
| TradingContractNumber | P_TradingContractHeader | tkonn | Trading Contract | |
| TradingContractType | P_TradingContractHeader | tctyp | Contract Type | |
| TradingContractTypeName | P_TradingContractHeader | tctyp_descr | ||
| Side | P_TradingContractBusinessDets | DocumentSide | ||
| ContractStatus | P_TradingContractHeader | btbsta | Only Copy Appr.TC | |
| TrdgContrApplStsName | P_TradingContractHeader | bezei | TrContType name | |
| SalesOrganization | P_TradingContractHeader | vkorg | SD Sales Org. | |
| SalesOrgDescr | P_TradingContractHeader | SalesOrgDescr | ||
| DistributionChannel | P_TradingContractHeader | vtweg | RefDistCh-Cust/Mat. | |
| DistributionChannelDescr | P_TradingContractHeader | DistributionChannelDescr | ||
| Division | P_TradingContractHeader | spart | Source supplier | |
| SalesDivisionDescr | P_TradingContractHeader | SalesDivisionDescr | Division Description | |
| PurchasingOrganization | P_TradingContractBusinessDets | PurchasingOrganization | Purchasing Organization | |
| PurchasingOrgDescr | P_TradingContractBusinessDets | ekotx | Description | |
| PurchasingGroup | P_TradingContractBusinessDets | PurchasingGroup | Purchasing Group | |
| PurchasingGroupDescr | P_TradingContractBusinessDets | eknam | Description | |
| TradingContractExternalID | P_TradingContractHeader | tkonn_ex | Ext. Identifier | |
| ContractPlant | I_ACMTradingContractItemData | ContractPlant | ||
| ContractMaterial | I_ACMTradingContractItemData | ContractMaterial | Vehicle Model | |
| TradingContractItem | I_ACMTradingContractItemData | TradingContractItem | Item Number | |
| DocumentDate | P_TradingContractHeader | erdat | Entered On | |
| PersonResponsible | P_TradingContractHeader | tksachb | Pers. Respons. | |
| PersonResponsibleName | P_TradingContractHeader | PersonResponsible | Person Responsible | |
| TradingContractCreatedBy | P_TradingContractHeader | ernam | User Name | |
| TradingContractCreatedByName | P_TradingContractHeader | CreatedBy | User Name | |
| TradingContractChangedBy | P_TradingContractHeader | aenam | User Name | |
| TradingContractChangedByName | P_TradingContractHeader | ChangedBy | User Name | |
| IncotermsClassificationName | P_TradingContractBusinessDets | IncotermsClassificationName | Incoterms Classification Description | |
| PricingApproach | I_ACMTradingContractItemAddl | PricingApproach | Pricing Approach | |
| Commodity | I_ACMMaterialMstrData | Commodity | Commodity Code | |
| CounterpartyendasCounterparty | ||||
| CustomerNameendasCustomerName | ||||
| ACMSlsIncotermsPart1endasIncoterms | ||||
| TrdgContrPurgIncotermsLoc1Text | P_TradingContractBusinessDets | TrdgContrPurgIncotermsLoc1Text | ||
| TrdgContrSlsIncotermsLoc1Text | P_TradingContractBusinessDets | TrdgContrSlsIncotermsLoc1Text | ||
| UoM | I_ACMTrdgContrPrcAspectDets | ContractTradeUnit | UoM of Trade Qty | |
| Quantity | I_ACMTrdgContrPrcAspectDets | ContractTradeQuantity | Qty In Trade UoM | |
| PricingConditionTermendasTERMNO | ||||
| CompanyCode | P_TradingContractHeader | company_code | Company Code | |
| MaturityKeyDateendasMaturityKeyDate | ||||
| PrcgCndnTradingContrCurrency | I_ACMTrdgContrPrcAspectDets | ACMPrcgCndnFlatPrice | Total Amount | |
| CmmdtyDealDetEffectiveFromDate | I_ACMContractCommoditySubitem | TrdgContrCreditSalesFromDate | Validity Start Date | |
| CmmdtyDealDetEffectiveToDate | I_ACMContractCommoditySubitem | TrdgContractCreditSalesToDate | Validity End Date | |
| ACMPrcgIntendedPrcType | I_ACMTradingContractItemAddl | ACMPrcgIntendedPrcType | Intended Price Type | |
| ACMYourReference | P_TradingContractBusinessDets | ACMYourReference | ||
| ACMCustomerReference | P_TradingContractBusinessDets | ACMCustomerReference |
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_TrdgContrPricingOverview.
-- 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: PTRDGCTRPRC
CREATE VIEW P_TrdgContrPricingOverview AS
SELECT
PricingAspect.TrdgContrPrcgAspectSrceLotID AS SourceLotId,
Header.tkonn AS TradingContractNumber,
Header.tctyp AS TradingContractType,
Header.tctyp_descr AS TradingContractTypeName,
Business.DocumentSide AS Side,
Header.btbsta AS ContractStatus,
Header.bezei AS TrdgContrApplStsName,
Header.vkorg AS SalesOrganization,
Header.SalesOrgDescr AS SalesOrgDescr,
Header.vtweg AS DistributionChannel,
Header.DistributionChannelDescr AS DistributionChannelDescr,
Header.spart AS Division,
Header.SalesDivisionDescr AS SalesDivisionDescr,
Business.PurchasingOrganization AS PurchasingOrganization,
Business.ekotx AS PurchasingOrgDescr,
Business.PurchasingGroup AS PurchasingGroup,
Business.eknam AS PurchasingGroupDescr,
Header.tkonn_ex AS TradingContractExternalID,
Item.ContractPlant AS ContractPlant,
Item.ContractMaterial AS ContractMaterial,
Item.TradingContractItem AS TradingContractItem,
Header.erdat AS DocumentDate,
Header.tksachb AS PersonResponsible,
Header.PersonResponsible AS PersonResponsibleName,
Header.ernam AS TradingContractCreatedBy,
Header.CreatedBy AS TradingContractCreatedByName,
Header.aenam AS TradingContractChangedBy,
Header.ChangedBy AS TradingContractChangedByName,
Business.IncotermsClassificationName AS IncotermsClassificationName,
ItemAddl.PricingApproach AS PricingApproach,
material.Commodity AS Commodity,
case Business.DocumentSide when 'M' then Purchase_Counterparty.Counterparty else Sales_Counterparty.Counterparty end as Counterparty AS CounterpartyendasCounterparty,
case Business.DocumentSide when 'M' then Purchase_Counterparty.CustomerName else Sales_Counterparty.CustomerName end as CustomerName AS CustomerNameendasCustomerName,
case Business.DocumentSide when 'M' then Business.ACMPurgIncotermsPart1 else Business.ACMSlsIncotermsPart1 end as Incoterms AS ACMSlsIncotermsPart1endasIncoterms,
Business.TrdgContrPurgIncotermsLoc1Text AS TrdgContrPurgIncotermsLoc1Text,
Business.TrdgContrSlsIncotermsLoc1Text AS TrdgContrSlsIncotermsLoc1Text,
PricingAspect.ContractTradeUnit AS UoM,
PricingAspect.ContractTradeQuantity AS Quantity,
case when PriceFixationF.PricingConditionTerm is null or PriceFixationF.PricingConditionTerm is initial then PriceFixationNH.PricingConditionTerm else PriceFixationF.PricingConditionTerm end as TERMNO AS PricingConditionTermendasTERMNO,
Header.company_code AS CompanyCode,
case when PriceFixationF.MaturityKeyDate is null then PriceFixationNH.MaturityKeyDate else PriceFixationF.MaturityKeyDate end as MaturityKeyDate AS MaturityKeyDateendasMaturityKeyDate,
PricingAspect.ACMPrcgCndnFlatPrice AS PrcgCndnTradingContrCurrency,
Comsub.TrdgContrCreditSalesFromDate AS CmmdtyDealDetEffectiveFromDate,
Comsub.TrdgContractCreditSalesToDate AS CmmdtyDealDetEffectiveToDate,
ItemAddl.ACMPrcgIntendedPrcType AS ACMPrcgIntendedPrcType,
Business.ACMYourReference AS ACMYourReference,
Business.ACMCustomerReference AS ACMCustomerReference
FROM I_ACMTrdgContrPrcAspectDets AS PricingAspect
INNER JOIN I_ACMTradingContractItemData AS Item ON /* join condition not captured in parsed metadata */
INNER JOIN I_ACMTradingContractItemAddl AS ItemAddl ON /* join condition not captured in parsed metadata */
INNER JOIN P_TradingContractHeader AS Header ON /* join condition not captured in parsed metadata */
INNER JOIN P_TradingContractBusinessDets AS Business ON /* join condition not captured in parsed metadata */
INNER JOIN I_ACMContractCommoditySubitem AS Comsub ON /* join condition not captured in parsed metadata */
INNER JOIN I_ACMMaterialMstrData AS material ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ACMMntnPrcgPrcFixDetFuture AS PriceFixationF ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ACMMntnPrcgPrcFixDetNonHedge AS PriceFixationNH 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