I_PurchaseContractRelevance

DDL: I_PURCHASECONTRACTRELEVANCE SQL: IPCREL Type: view COMPOSITE Package: ODATA_MM_CTR_MAINTAIN

I-view to Calculate Relevance of Purchase Contracts

I_PurchaseContractRelevance is a Composite CDS View that provides data about "I-view to Calculate Relevance of Purchase Contracts" in SAP S/4HANA. It reads from 1 data source (P_PurContrRlvnceCalctWeight) and exposes 8 fields with key field PurchaseContract. It has 1 association to related views. Part of development package ODATA_MM_CTR_MAINTAIN.

Data Sources (1)

SourceAliasJoin Type
P_PurContrRlvnceCalctWeight P_PurContrRlvnceCalctWeight from

Associations (1)

CardinalityTargetAliasCondition
[1..1] I_PurchaseContract _PurchaseContract $projection.PurchaseContract = _PurchaseContract.PurchaseContract and $projection.ActivePurchasingDocument = _PurchaseContract.ActivePurchasingDocument

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName IPCREL view
AbapCatalog.compiler.compareFilter true view
AccessControl.authorizationCheck #CHECK view
VDM.viewType #COMPOSITE view
EndUserText.label I-view to Calculate Relevance of Purchase Contracts view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #L view
ObjectModel.usageType.dataClass #MIXED view

Fields (8)

KeyFieldSource TableSource FieldDescription
KEY PurchaseContract PurchaseContract Purchasing Doc.
WeightedRelevance
PurchaseContractConsumedAmount PurContrConsumedVal Consumed Value
ContractConsumptionInPct Consumption Pct
PurContractCnsmpnInPctValue Consumption Pct
PurchaseContractType _PurchaseContract PurchaseContractType Order Type
ValidityEndDate _PurchaseContract ValidityEndDate ValidTo
ActivePurchasingDocument ActivePurchasingDocument Active Purchase Doc

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_PurchaseContractRelevance.
-- 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: IPCREL

CREATE VIEW I_PurchaseContractRelevance AS
SELECT
  PurchaseContract,
  (expirydays + WeightedRelevance + TargetAmount) * 5 AS WeightedRelevance,
  PurContrConsumedVal AS PurchaseContractConsumedAmount,
  cast ( ContractConsumptionInPct as abap.char( 34 ) ) AS ContractConsumptionInPct,
  cast ( ContractConsumptionInPct as abap.char( 34 ) ) AS PurContractCnsmpnInPctValue,
  _PurchaseContract.PurchaseContractType AS PurchaseContractType,
  _PurchaseContract.ValidityEndDate AS ValidityEndDate,
  ActivePurchasingDocument
FROM P_PurContrRlvnceCalctWeight
LEFT OUTER JOIN I_PurchaseContract AS _PurchaseContract ON PurchaseContract = _PurchaseContract.PurchaseContract AND ActivePurchasingDocument = _PurchaseContract.ActivePurchasingDocument  -- association [1..1]
;