I_PURCHASECONTRACTRELEVANCE

CDS View

I-view to Calculate Relevance of Purchase Contracts

I_PURCHASECONTRACTRELEVANCE is a CDS View in S/4HANA. I-view to Calculate Relevance of Purchase Contracts. It contains 1 fields. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
C_PurOrdRefDocPC view left_outer CONSUMPTION Reference Documents PO Creation - Purchase Contract Items
P_Contractmaintain_Trans view left_outer COMPOSITE

Fields (1)

KeyField CDS FieldsUsed in Views
ContractConsumptionInPct ContractConsumptionInPct 1
@AbapCatalog.sqlViewName: 'IPCREL'
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #CHECK
@VDM.viewType: #COMPOSITE
@EndUserText.label: 'I-view to Calculate Relevance of Purchase Contracts'

@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #L
@ObjectModel.usageType.dataClass: #MIXED
@AccessControl.personalData.blocking: #('TRANSACTIONAL_DATA')

define view I_PurchaseContractRelevance
  as select from P_PurContrRlvnceCalctWeight
  association [1..1] to I_PurchaseContract      as _PurchaseContract      on  $projection.PurchaseContract                   = _PurchaseContract.PurchaseContract
 
{
  key PurchaseContract,
      //  WeightedRelevance,

//commenting fields not consumed anywhere in stack for performance

 //     OverdueToEndPercent,

      //  F1+ F2 + F3 as WeightedRelevance , Its multipled by 5, for better star rating (acutally moved from ABAP to here)

      (expirydays + WeightedRelevance + TargetAmount) * 5 as WeightedRelevance,
      //due to VDM(GFN issue) commenting existing field and adding new field PurchaseContractConsumedAmount

      //PurContrConsumedVal,

      PurContrConsumedVal as PurchaseContractConsumedAmount,
//Commenting as field type mismatch with GTNC default data element and used any where

//      PurchaseContractTargetAmount,


      //CAST to char34 as same done in CDS P_Contractmaintain_Trans/I_ContractTransientField

      //CDS consuming field ContractConsumptionInPct from I_ContractTransientField will now consume from I_PurchaseContractRelevance

      @VDM.lifecycle.status: #DEPRECATED
      @VDM.lifecycle.successor: 'PurContractCnsmpnInPctValue' 
      cast ( ContractConsumptionInPct as abap.char( 34 ) )  as  ContractConsumptionInPct,
      
      cast ( ContractConsumptionInPct as abap.char( 34 ) )  as  PurContractCnsmpnInPctValue,

//      PurchaseContractClassification,

      _PurchaseContract.PurchaseContractType,
//      ValidityStartDate,

      _PurchaseContract.ValidityEndDate
//      PurchasingDocumentCategory,

//      CreatedByUser


}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_PURCHASECONTRACT",
"P_PURCONTRRLVNCECALCTWEIGHT"
],
"ASSOCIATED":
[
"I_PURCHASECONTRACT"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/