I_TrdgContrItmFnlSetldQtyDets

DDL: I_TRDGCONTRITMFNLSETLDQTYDETS SQL: IFULLFNLSTLQTY Type: view COMPOSITE

Full Finally Settled Qty Details

I_TrdgContrItmFnlSetldQtyDets is a Composite CDS View that provides data about "Full Finally Settled Qty Details" in SAP S/4HANA. It reads from 1 data source (P_TrdgContrItmFnlSetldQtyDets) and exposes 10 fields with key fields ContractNum, ContractItem. It has 2 associations to related views.

Data Sources (1)

SourceAliasJoin Type
P_TrdgContrItmFnlSetldQtyDets StlQty from

Associations (2)

CardinalityTargetAliasCondition
[0..*] P_TrdgContrShadowData _shdw StlQty.ContractNum = _shdw.ContractNum and StlQty.ContractItem = _shdw.ContractItem
[0..1] I_ACMTrdgContrDetmPaidInvc _paidInvc StlQty.SettlementUnitUUID = _paidInvc.SettlementUnitUUID and StlQty.ContractNum = _paidInvc.TradingContractNumber and StlQty.ContractItem = _paidInvc.TradingContractItem

Annotations (11)

NameValueLevelField
AbapCatalog.sqlViewName IFULLFNLSTLQTY view
AccessControl.authorizationCheck #NOT_REQUIRED view
ClientHandling.type #INHERITED view
ClientHandling.algorithm #SESSION_VARIABLE view
VDM.viewType #COMPOSITE view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
ObjectModel.usageType.dataClass #TRANSACTIONAL view
ObjectModel.usageType.serviceQuality #C view
ObjectModel.usageType.sizeCategory #L view
EndUserText.label Full Finally Settled Qty Details view

Fields (10)

KeyFieldSource TableSource FieldDescription
KEY ContractNum P_TrdgContrItmFnlSetldQtyDets ContractNum
KEY ContractItem P_TrdgContrItmFnlSetldQtyDets ContractItem Purchase Contract Item
SettlementUnitUUID P_TrdgContrItmFnlSetldQtyDets SettlementUnitUUID
SettlementGroupId P_TrdgContrItmFnlSetldQtyDets SettlementGroupId
SettlmtDoc P_TrdgContrItmFnlSetldQtyDets SettlmtDoc Settlement Doc.
SettlmtDocYear P_TrdgContrItmFnlSetldQtyDets SettlmtDocYear
SettlmtCat P_TrdgContrItmFnlSetldQtyDets SettlmtCat Settl. Category
SettlementType P_TrdgContrItmFnlSetldQtyDets SettlementType Settlement Type
TrdgContractItemUnitOfMeasure _shdw item_uom ItemUoM
SettlmtQuantityendasACMPaidQty

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_TrdgContrItmFnlSetldQtyDets.
-- 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: IFULLFNLSTLQTY

CREATE VIEW I_TrdgContrItmFnlSetldQtyDets AS
SELECT
  StlQty.ContractNum AS ContractNum,
  StlQty.ContractItem AS ContractItem,
  StlQty.SettlementUnitUUID AS SettlementUnitUUID,
  StlQty.SettlementGroupId AS SettlementGroupId,
  StlQty.SettlmtDoc AS SettlmtDoc,
  StlQty.SettlmtDocYear AS SettlmtDocYear,
  StlQty.SettlmtCat AS SettlmtCat,
  StlQty.SettlementType AS SettlementType,
  _shdw.item_uom AS TrdgContractItemUnitOfMeasure,
  case when _paidInvc.SettlmtQuantity is null or _paidInvc.SettlmtQuantity = 0 then 0 when StlQty.SettlementType = 'S' and _shdw.Numerator = 0 then 0 when StlQty.SettlementType = 'S' and _shdw.Numerator <> 0 and _paidInvc.SettlmtQuantity is not null and _paidInvc.SettlmtQuantity is not initial then division( ( _paidInvc.SettlmtQuantity * _shdw.Denominator ),_shdw.Numerator,9 ) else _paidInvc.SettlmtQuantity end as ACMPaidQty AS SettlmtQuantityendasACMPaidQty
FROM P_TrdgContrItmFnlSetldQtyDets AS StlQty
LEFT OUTER JOIN P_TrdgContrShadowData AS _shdw ON StlQty.ContractNum = _shdw.ContractNum AND StlQty.ContractItem = _shdw.ContractItem  -- association [0..*]
LEFT OUTER JOIN I_ACMTrdgContrDetmPaidInvc AS _paidInvc ON StlQty.SettlementUnitUUID = _paidInvc.SettlementUnitUUID AND StlQty.ContractNum = _paidInvc.TradingContractNumber AND StlQty.ContractItem = _paidInvc.TradingContractItem  -- association [0..1]
;