P_CctrItmDistrConsumptionPct

DDL: P_CCTRITMDISTRCONSUMPTIONPCT SQL: PCPCIDCONPCT Type: view COMPOSITE

P_CctrItmDistrConsumptionPct is a Composite CDS View in SAP S/4HANA. It reads from 1 data source (P_CctrItmDistrConsumedValue) and exposes 11 fields with key fields CentralPurchaseContract, CentralPurchaseContractItem, DistributionKey.

Data Sources (1)

SourceAliasJoin Type
P_CctrItmDistrConsumedValue P_CctrItmDistrConsumedValue from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName PCPCIDCONPCT view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #NOT_REQUIRED view
AccessControl.personalData.blocking #BLOCKED_DATA_EXCLUDED view
VDM.private true view
VDM.viewType #COMPOSITE view

Fields (11)

KeyFieldSource TableSource FieldDescription
KEY CentralPurchaseContract CentralPurchaseContract Purchasing Doc.
KEY CentralPurchaseContractItem CentralPurchaseContractItem Item in Central Purchase Contract
KEY DistributionKey DistributionKey Distr. Number
PurchaseContractType PurchaseContractType Order Type
dec283endasContractConsumptionInPct
CntrlPurContractGRConsumption CntrlPurContractGRConsumption
dec283endasCntrlPurContrGRConsumptionPct
CntrlPurContractGRQuantity CntrlPurContractGRQuantity
CntrlPurContractGRAmount CntrlPurContractGRAmount
ReleaseOrderItemQuantityUnit ReleaseOrderItemQuantityUnit Order Unit
ReleaseOrderCurrency ReleaseOrderCurrency Currency

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_CctrItmDistrConsumptionPct.
-- 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: PCPCIDCONPCT

CREATE VIEW P_CctrItmDistrConsumptionPct AS
SELECT
  CentralPurchaseContract,
  CentralPurchaseContractItem,
  DistributionKey,
  PurchaseContractType,
  case when TargetAmount <= 0.00 then 0 else cast ( ( division (ConsumedAmount, TargetAmount,3) * 100 ) as abap.dec( 28,3 ) ) end as ContractConsumptionInPct AS dec283endasContractConsumptionInPct,
  CntrlPurContractGRConsumption,
  case when TargetAmount <= 0.00 then 0 else cast( ( division( CntrlPurContractGRConsumption, TargetAmount, 3) * 100 ) as abap.dec( 28,3 ) ) end as CntrlPurContrGRConsumptionPct AS dec283endasCntrlPurContrGRConsumptionPct,
  CntrlPurContractGRQuantity,
  CntrlPurContractGRAmount,
  ReleaseOrderItemQuantityUnit,
  ReleaseOrderCurrency
FROM P_CctrItmDistrConsumedValue
;