I_ContItem

DDL: I_CONTITEM SQL: PCONTRACTITEM Type: view COMPOSITE

Contract Item

I_ContItem is a Composite CDS View that provides data about "Contract Item" in SAP S/4HANA. It reads from 4 data sources (I_ContSubItem, I_ACMTrdgContractBusinessData, I_ACMTradingContractItemData, wbhk) and exposes 21 fields with key fields TradingContractNumber, TradingContractItem.

Data Sources (4)

SourceAliasJoin Type
I_ContSubItem _sub inner
I_ACMTrdgContractBusinessData I_WBHD left_outer
I_ACMTradingContractItemData wbhi inner
wbhk wbhk from

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName PCONTRACTITEM view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
EndUserText.label Contract Item 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 (21)

KeyFieldSource TableSource FieldDescription
KEY TradingContractNumber I_ACMTradingContractItemData TradingContractNumber Trading Contract
KEY TradingContractItem I_ACMTradingContractItemData TradingContractItem Item Number
TrdgContrCommoditySubitem I_ACMTradingContractItemData TrdgContrCommoditySubitem Subitem
ContractMaterial I_ACMTradingContractItemData ContractMaterial
ContractPlant I_ACMTradingContractItemData ContractPlant
ContractStorageLocation I_ACMTradingContractItemData ContractStorageLocation
TrdgContrSalesQuantity I_ACMTradingContractItemData TrdgContrSalesQuantity
BaseUnit I_ACMTradingContractItemData BaseUnit Unit of Measure
PrcgCndnTradingContrCurrency I_ACMTradingContractItemData PrcgCndnTradingContrCurrency Term Currency
TradingContractSalesCurrency I_ACMTradingContractItemData TradingContractSalesCurrency
Commodity I_ACMTradingContractItemData Commodity Commodity Code
ProfitCenter I_ACMTradingContractItemData ProfitCenter Profit Center
knumv_sd wbhk knumv_sd Doc. Condition
tkonn
tposn
PurchaseOrderSupplierendaselifn
PurchasingOrganizationendasekorg
PurchasingGroupendasekgrp
ACMPurgIncotermsPart1endasinco1_mm
ACMSlsIncotermsPart1endasinco1_sd
PricingDocumentendasknumv_mm

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 I_ContItem.
-- 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: PCONTRACTITEM

CREATE VIEW I_ContItem AS
SELECT
  wbhi.TradingContractNumber AS TradingContractNumber,
  wbhi.TradingContractItem AS TradingContractItem,
  wbhi.TrdgContrCommoditySubitem AS TrdgContrCommoditySubitem,
  wbhi.ContractMaterial AS ContractMaterial,
  wbhi.ContractPlant AS ContractPlant,
  wbhi.ContractStorageLocation AS ContractStorageLocation,
  wbhi.TrdgContrSalesQuantity AS TrdgContrSalesQuantity,
  wbhi.BaseUnit AS BaseUnit,
  wbhi.PrcgCndnTradingContrCurrency AS PrcgCndnTradingContrCurrency,
  wbhi.TradingContractSalesCurrency AS TradingContractSalesCurrency,
  wbhi.Commodity AS Commodity,
  wbhi.ProfitCenter AS ProfitCenter,
  wbhk.knumv_sd AS knumv_sd,
  case when I_WBHD.PurchaseOrderSupplier is null then _sub.PurchaseOrderSupplier else I_WBHD.PurchaseOrderSupplier end as elifn AS PurchaseOrderSupplierendaselifn,
  case when I_WBHD.PurchasingOrganization is null then _sub.PurchasingOrganization else I_WBHD.PurchasingOrganization end as ekorg AS PurchasingOrganizationendasekorg,
  case when I_WBHD.PurchasingGroup is null then _sub.PurchasingGroup else I_WBHD.PurchasingGroup end as ekgrp AS PurchasingGroupendasekgrp,
  case when I_WBHD.ACMPurgIncotermsPart1 is null then _sub.ACMPurgIncotermsPart1 else I_WBHD.ACMPurgIncotermsPart1 end as inco1_mm AS ACMPurgIncotermsPart1endasinco1_mm,
  case when I_WBHD.ACMSlsIncotermsPart1 is null then _sub.ACMSlsIncotermsPart1 else I_WBHD.ACMSlsIncotermsPart1 end as inco1_sd AS ACMSlsIncotermsPart1endasinco1_sd,
  case when I_WBHD.PricingDocument is null then _sub.PricingDocument else I_WBHD.PricingDocument end as knumv_mm AS PricingDocumentendasknumv_mm
FROM wbhk
INNER JOIN I_ACMTradingContractItemData AS wbhi ON /* join condition not captured in parsed metadata */
LEFT OUTER JOIN I_ACMTrdgContractBusinessData AS I_WBHD ON /* join condition not captured in parsed metadata */
INNER JOIN I_ContSubItem AS _sub ON /* join condition not captured in parsed metadata */
;