P_ACMTradingContractDetails
P_ACMTradingContractDetails is a Composite CDS View in SAP S/4HANA. It reads from 3 data sources (P_TradingContractBusinessDets, I_ACMTrdgContrTypeWithSide, P_TradingContractHeader) and exposes 37 fields with key field TradingContractNumber.
Data Sources (3)
| Source | Alias | Join Type |
|---|---|---|
| P_TradingContractBusinessDets | Business | inner |
| I_ACMTrdgContrTypeWithSide | ContractType | inner |
| P_TradingContractHeader | Header | from |
Annotations (11)
| Name | Value | Level | Field |
|---|---|---|---|
| AbapCatalog.sqlViewName | PTRDGCONTRCTDTLS | view | |
| AbapCatalog.compiler.compareFilter | true | view | |
| AbapCatalog.preserveKey | true | view | |
| AccessControl.authorizationCheck | #CHECK | 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 | #XL | view |
Fields (37)
| Key | Field | Source Table | Source Field | Description |
|---|---|---|---|---|
| KEY | 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 | |
| TrdgContractCategory | I_ACMTrdgContrTypeWithSide | ACMTradingContractCategory | Document Type | |
| sdwrsendasTradingContractCurrency | ||||
| SalesOrganization | P_TradingContractHeader | vkorg | SD Sales Org. | |
| DistributionChannel | P_TradingContractHeader | vtweg | RefDistCh-Cust/Mat. | |
| Division | P_TradingContractHeader | spart | Source supplier | |
| PurchasingOrganization | P_TradingContractBusinessDets | PurchasingOrganization | Purchasing Organization | |
| ekotx | P_TradingContractBusinessDets | ekotx | Description | |
| PurchasingGroup | P_TradingContractBusinessDets | PurchasingGroup | Purchasing Group | |
| eknam | P_TradingContractBusinessDets | eknam | Description | |
| TradingContractExternalID | P_TradingContractHeader | tkonn_ex | Ext. Identifier | |
| 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 | |
| TradingContractChangedOnDate | P_TradingContractHeader | aedat | Obsolete | |
| DistributionChannelDescr | P_TradingContractHeader | DistributionChannelDescr | ||
| SalesDivisionDescr | P_TradingContractHeader | SalesDivisionDescr | Division Description | |
| SalesOrgDescr | P_TradingContractHeader | SalesOrgDescr | ||
| DocumentSide | Side | DomainText | Short Description | |
| Counterparty | Counterparty | Counterparty | Supplier | |
| ACMSlsIncotermsPart1endasIncoterms | ||||
| IncotermsClassificationName | P_TradingContractBusinessDets | IncotermsClassificationName | Incoterms Classification Description | |
| CompanyCode | company_code | Company Code | ||
| TradingContractTradeOffice | TradeOffice | TradingContractTradeOffice | ||
| TradingContractCreditSales | TradingContractCreditSales | |||
| ACMSignedStatus | ACMSignedStatus | |||
| 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_ACMTradingContractDetails.
-- 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: PTRDGCONTRCTDTLS
CREATE VIEW P_ACMTradingContractDetails AS
SELECT
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,
ContractType.ACMTradingContractCategory AS TrdgContractCategory,
case Business.DocumentSide when 'M' then Business.TradingContractCurrency else Header.sdwrs end as TradingContractCurrency AS sdwrsendasTradingContractCurrency,
Header.vkorg AS SalesOrganization,
Header.vtweg AS DistributionChannel,
Header.spart AS Division,
Business.PurchasingOrganization AS PurchasingOrganization,
Business.ekotx AS ekotx,
Business.PurchasingGroup AS PurchasingGroup,
Business.eknam AS eknam,
Header.tkonn_ex AS TradingContractExternalID,
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,
Header.aedat AS TradingContractChangedOnDate,
Header.DistributionChannelDescr AS DistributionChannelDescr,
Header.SalesDivisionDescr AS SalesDivisionDescr,
Header.SalesOrgDescr AS SalesOrgDescr,
Side.DomainText AS DocumentSide,
Counterparty.Counterparty AS Counterparty,
case Business.DocumentSide when 'M' then Business.ACMPurgIncotermsPart1 else Business.ACMSlsIncotermsPart1 end as Incoterms AS ACMSlsIncotermsPart1endasIncoterms,
Business.IncotermsClassificationName AS IncotermsClassificationName,
company_code AS CompanyCode,
TradeOffice.TradingContractTradeOffice AS TradingContractTradeOffice,
TradingContractCreditSales,
ACMSignedStatus,
Business.ACMYourReference AS ACMYourReference,
Business.ACMCustomerReference AS ACMCustomerReference
FROM P_TradingContractHeader AS Header
INNER JOIN I_ACMTrdgContrTypeWithSide AS ContractType ON /* join condition not captured in parsed metadata */
INNER JOIN P_TradingContractBusinessDets AS Business 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