P_TradingContractBusinessDets

DDL: P_TRADINGCONTRACTBUSINESSDETS SQL: PTRDGCTRVUS Type: view COMPOSITE

P_TradingContractBusinessDets is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_ContSubItem, I_ACMTrdgContrShadowItemDets) and exposes 25 fields with key field TradingContractNumber. It has 2 associations to related views.

Data Sources (2)

SourceAliasJoin Type
I_ContSubItem Business from
I_ACMTrdgContrShadowItemDets Shadow inner

Associations (2)

CardinalityTargetAliasCondition
[1..1] I_IncotermsClassificationText _IncoDescmm Business.ACMPurgIncotermsPart1 = _IncoDescmm.IncotermsClassification and _IncoDescmm.Language = $session.system_language
[1..1] I_IncotermsClassificationText _IncoDescsd Business.ACMSlsIncotermsPart1 = _IncoDescsd.IncotermsClassification and _IncoDescsd.Language = $session.system_language

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PTRDGCTRVUS 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 #L view

Fields (25)

KeyFieldSource TableSource FieldDescription
KEY TradingContractNumber I_ContSubItem TradingContractNumber Trading Contract
TradingContractItem I_ContSubItem TradingContractItem Item Number
TrdgContrCommoditySubitem I_ContSubItem TrdgContrCommoditySubitem Subitem
PurchaseOrderSupplier I_ContSubItem PurchaseOrderSupplier Supplier
PurchasingOrganization I_ContSubItem PurchasingOrganization Purchasing Organization
PurchasingGroup I_ContSubItem PurchasingGroup Purchasing Group
TradingContractCurrency I_ContSubItem TradingContractCurrency Currency
TrdgContrSalesIncotermsVersion I_ContSubItem TrdgContrSalesIncotermsVersion Inco. Version
TrdgContrSlsIncotermsLoc1Text I_ContSubItem TrdgContrSlsIncotermsLoc1Text Inco. Location1
TrdgContrSlsIncotermsLoc2Text I_ContSubItem TrdgContrSlsIncotermsLoc2Text Inco. Location2
TrdgContrPurgIncotermsVersion I_ContSubItem TrdgContrPurgIncotermsVersion Inco. Version
TrdgContrPurgIncotermsLoc1Text I_ContSubItem TrdgContrPurgIncotermsLoc1Text Inco. Location1
PricingDocument I_ContSubItem PricingDocument Document Condition
ACMPurgIncotermsPart1 I_ContSubItem ACMPurgIncotermsPart1 Incoterms Purch
ACMSlsIncotermsPart1 I_ContSubItem ACMSlsIncotermsPart1 Incoterms Sales
ACMSlsIncotermsPart1endasIncoTerms
DocumentSide I_ACMTrdgContrShadowItemDets DocumentSide
ACMSupplyingPlant I_ContSubItem ACMSupplyingPlant Supplying Plant
TrdgContrPurgPaymentTerms I_ContSubItem TrdgContrPurgPaymentTerms Terms of Payment
TrdgContrSalesPaymentTerms I_ContSubItem TrdgContrSalesPaymentTerms PaytTermsSls
ACMCustomerReferenceendasACMReferencePO
ACMYourReference I_ContSubItem ACMYourReference Your Reference
ACMCustomerReference I_ContSubItem ACMCustomerReference PO Number
ekotx PurchasingOrganizationName PurchasingOrganizationName Purch. Org. Name
eknam PurchasingGroupName PurchasingGroupName Purchasing Grp. Name

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_TradingContractBusinessDets.
-- 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: PTRDGCTRVUS

CREATE VIEW P_TradingContractBusinessDets AS
SELECT
  Business.TradingContractNumber AS TradingContractNumber,
  Business.TradingContractItem AS TradingContractItem,
  Business.TrdgContrCommoditySubitem AS TrdgContrCommoditySubitem,
  Business.PurchaseOrderSupplier AS PurchaseOrderSupplier,
  Business.PurchasingOrganization AS PurchasingOrganization,
  Business.PurchasingGroup AS PurchasingGroup,
  Business.TradingContractCurrency AS TradingContractCurrency,
  Business.TrdgContrSalesIncotermsVersion AS TrdgContrSalesIncotermsVersion,
  Business.TrdgContrSlsIncotermsLoc1Text AS TrdgContrSlsIncotermsLoc1Text,
  Business.TrdgContrSlsIncotermsLoc2Text AS TrdgContrSlsIncotermsLoc2Text,
  Business.TrdgContrPurgIncotermsVersion AS TrdgContrPurgIncotermsVersion,
  Business.TrdgContrPurgIncotermsLoc1Text AS TrdgContrPurgIncotermsLoc1Text,
  Business.PricingDocument AS PricingDocument,
  Business.ACMPurgIncotermsPart1 AS ACMPurgIncotermsPart1,
  Business.ACMSlsIncotermsPart1 AS ACMSlsIncotermsPart1,
  case Shadow.DocumentSide when 'M' then Business.ACMPurgIncotermsPart1 else Business.ACMSlsIncotermsPart1 end as IncoTerms AS ACMSlsIncotermsPart1endasIncoTerms,
  Shadow.DocumentSide AS DocumentSide,
  Business.ACMSupplyingPlant AS ACMSupplyingPlant,
  Business.TrdgContrPurgPaymentTerms AS TrdgContrPurgPaymentTerms,
  Business.TrdgContrSalesPaymentTerms AS TrdgContrSalesPaymentTerms,
  case Shadow.DocumentSide when 'M' then Business.ACMYourReference else Business.ACMCustomerReference end as ACMReferencePO AS ACMCustomerReferenceendasACMReferencePO,
  Business.ACMYourReference AS ACMYourReference,
  Business.ACMCustomerReference AS ACMCustomerReference,
  PurchasingOrganizationName.PurchasingOrganizationName AS ekotx,
  PurchasingGroupName.PurchasingGroupName AS eknam
FROM I_ContSubItem AS Business
INNER JOIN I_ACMTrdgContrShadowItemDets AS Shadow ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_IncotermsClassificationText AS _IncoDescmm ON Business.ACMPurgIncotermsPart1 = _IncoDescmm.IncotermsClassification AND _IncoDescmm.Language = $session.system_language  -- association [1..1]
LEFT OUTER JOIN I_IncotermsClassificationText AS _IncoDescsd ON Business.ACMSlsIncotermsPart1 = _IncoDescsd.IncotermsClassification AND _IncoDescsd.Language = $session.system_language  -- association [1..1]
;