P_DMVCACTIVITYMATERIALPAIR

CDS View

P_DMVCACTIVITYMATERIALPAIR is a CDS View in S/4HANA. 2 CDS views read from this table.

CDS Views using this table (2)

ViewTypeJoinVDMDescription
P_DMVCActivityMaterialPairCCS view from COMPOSITE
P_DMVCGroupedActyMaterialPair view from COMPOSITE
@AbapCatalog.sqlViewName: 'PDMVCAMPAIR'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true

@ClientHandling.algorithm: #SESSION_VARIABLE

@AccessControl.authorizationCheck: #PRIVILEGED_ONLY

@VDM.viewType: #COMPOSITE
@VDM.private:true
define view P_DMVCActivityMaterialPair
  with parameters
    P_DateFrom     : calendardate,
    P_DateTo       : calendardate,
    P_CurrencyType : fins_curtype,
    P_Ledger       : fins_ledger
  as select from P_MaterialLedgerDocument as _MaterialLedgerDocument

  association [0..1] to I_BusinessTransactionType as _BusinessTransactionType on _MaterialLedgerDocument.glvor = _BusinessTransactionType.BusinessTransactionType
  association [0..1] to P_MLProcessCategory       as _ProcessCategory         on _MaterialLedgerDocument.ProcessCategory = _ProcessCategory.ProcessCategory //ckmlmv009

{
  key case
        when ProcessCategory like 'B%' then ProductionProcess
        when ProcessCategory like 'V%' then CostEstimate
      end   as MaterialValueChainNodeFrom,
  key case
        when ProcessCategory like 'B%' then CostEstimate
        when ProcessCategory like 'V%' then ProductionProcess
      end   as MaterialValueChainNodeTo,

      @ObjectModel.foreignKey.association: '_ProcessCategory'
      @ObjectModel.text.element: 'ProcessCategoryName'
  key ProcessCategory,

      docref as DocumentReference,

      Plant,

      @ObjectModel.foreignKey.association: '_BusinessTransactionType'
      @ObjectModel.text.element: 'BusinessTransactionTypeName'
      glvor as BusinessTransactionType,
      _BusinessTransactionType._Text[1:Language = $session.system_language].BusinessTransactionTypeName,

      _ProcessCategory._Text[1:Language = $session.system_language].ProcessCategoryName,
      LedgerValuationCurrencyRole,

      // Quantities

      @Semantics.quantity.unitOfMeasure: 'ValuationQuantityUnit'
      ValuationQuantity,


      @Semantics.unitOfMeasure: true
      ValuationQuantityUnit,


      // Amounts

      @Semantics.amount.currencyCode: 'Currency'
      InventoryAmtInCCCrcy,
      @Semantics.amount.currencyCode: 'Currency'
      PriceDifferenceAmtInCCCrcy,
      @Semantics.amount.currencyCode: 'Currency'
      ExchRateDiffAmtInCoCodeCrcy,


      @Semantics.currencyCode: true
      Currency,

      _BusinessTransactionType,
      _ProcessCategory
}
where
      CostEstimate != '000000000000'
  and ProductionProcess != '000000000000'
  and PostingDate                 >= $parameters.P_DateFrom
  and PostingDate                 <= $parameters.P_DateTo
  and LedgerValuationCurrencyRole = $parameters.P_CurrencyType
  and (Ledger = :P_Ledger or Ledger = ' ')
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_BUSINESSTRANSACTIONTYPE",
"I_BUSTRANSACTIONTYPETEXT",
"P_MATERIALLEDGERDOCUMENT",
"P_MLPROCESSCATEGORY",
"P_MLPROCESSCATEGORYTEXT"
],
"ASSOCIATED":
[
"I_BUSINESSTRANSACTIONTYPE",
"P_MLPROCESSCATEGORY"
],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/