P_INVPRICESMAXFIS

CDS View

P_INVPRICESMAXFIS is a CDS View in S/4HANA. 1 CDS views read from this table.

CDS Views using this table (1)

ViewTypeJoinVDMDescription
I_InvtryPrcBasicByKeyDate view from COMPOSITE Basic view to display inventory Price at a specific date.
@AbapCatalog.sqlViewName: 'PINVPRMAXFIS'
@VDM.private: true
@VDM.viewType: #COMPOSITE
@AbapCatalog.compiler.compareFilter: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ClientHandling.algorithm: #SESSION_VARIABLE
@AbapCatalog.preserveKey:true 
define view P_InvPricesMaxFis

  with parameters
    P_CalendarDate : calendardate

  as select from P_MLValAreaMaxPeriod(P_CalendarDate : $parameters.P_CalendarDate) as it
    inner join   R_MatlPriceDataMigrationStatus as tf on(
      tf.MatlPriceDataMigrationStatus                                                   = 'X'
    )
                                                      or(
                                                        tf.MatlPriceDataMigrationStatus = 'R'
                                                      )                                                                            
    inner join   ckmlhd                     as hd on hd.kalnr = it.CostEstimate
    inner join   I_MLInventoryPriceRawData  as cr on  cr.CostEstimate  = it.CostEstimate
                                                  and ToFiscalYearPeriod = cr.FiscalYearPeriod
{
  key it.CostEstimate,
      it.ValuationArea,
      cr.InventoryPrice,
      cr.Currency,
      cr.MaterialPriceUnitQty
}
where ( ( hd.price_sdm_yearper = '0000000' or hd.price_sdm_yearper > ToFiscalYearPeriod ) or tf.MatlPriceDataMigrationStatus = 'X' )


union all
 select from I_MaterialLedgerPrice            as price
  inner join R_MatlPriceDataMigrationStatus as tf on(
    tf.MatlPriceDataMigrationStatus                                                 = 'F'
  )
                                                  or(
                                                    tf.MatlPriceDataMigrationStatus = 'R'
                                                  )                                                                              
  inner join ckmlhd                           as hd         on hd.kalnr = price.CostEstimate
  inner join I_MatlLedgerValnCrcyRoleName     as lcurtp     on lcurtp.CompanyCode  = price.CompanyCode
                                                           and lcurtp.CurrencyRole = price.CurrencyRole
                                                           and lcurtp.Ledger       = price.Ledger
                                                           and lcurtp.LedgerValnCrcyRoleIsUsedInLogs = 'X'
{
  key price.CostEstimate,
      price.ValuationArea,
      price.MaterialPrice as InventoryPrice,
      price.Currency,
      price.MaterialPriceUnitQty
}
where ( ( hd.price_sdm_yearper <> '0000000' and hd.price_sdm_yearper <= price.MatlPrcValdtyStrtFsclYearPerd ) or tf.MatlPriceDataMigrationStatus = 'F' ) 

   and price.MaterialPriceType = 'INVPR'
   and price.MaterialPriceSubtype = ' '
   and price.MaterialPriceValidityStartDate <= :P_CalendarDate
   and price.MaterialPriceValidityEndDate   >= :P_CalendarDate
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_MATERIALLEDGERPRICE",
"I_MATLLEDGERVALNCRCYROLENAME",
"I_MLINVENTORYPRICERAWDATA",
"P_MLVALAREAMAXPERIOD",
"R_MATLPRICEDATAMIGRATIONSTATUS",
"CKMLHD"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/