fmlv_ckmlpr_compat

DDL: FMLV_CKMLPR_COMPAT SQL: FMLVCKMLPRCOMPAT Type: view

Compatibility View for CKMLPR

fmlv_ckmlpr_compat is a CDS View that provides data about "Compatibility View for CKMLPR" in SAP S/4HANA. It reads from 13 data sources and exposes 19 fields with key fields kalnr, curtp, curtp, curtp.

Data Sources (13)

SourceAliasJoin Type
fmlv_curtp_ml curtp inner
fmlv_curtp_ml curtp inner
fmlv_curtp_ml curtp inner
ckmlhd hd inner
mbew m inner
ckmlpr pr union_all
ckmlpr pr union_all
fmlt_price price from
t001k t inner
t001k t inner
R_MatlPriceDataMigrationStatus tf inner
R_MatlPriceDataMigrationStatus tf inner
R_MatlPriceDataMigrationStatus tf inner

Annotations (8)

NameValueLevelField
AbapCatalog.sqlViewName FMLVCKMLPRCOMPAT view
AbapCatalog.compiler.compareFilter true view
AbapCatalog.preserveKey true view
AccessControl.authorizationCheck #CHECK view
EndUserText.label Compatibility View for CKMLPR view
ObjectModel.usageType.serviceQuality #D view
ObjectModel.usageType.sizeCategory #XL view
ObjectModel.usageType.dataClass #TRANSACTIONAL view

Fields (19)

KeyFieldSource TableSource FieldDescription
KEY kalnr fmlt_price kalnr
KEY curtp fmlv_curtp_ml curtp
rldnr fmlt_price rldnr
ext_curtype fmlt_price ext_curtype
peinh fmlt_price peinh
zprsdat fmlt_price date_from
kalnr
KEY curtp fmlv_curtp_ml curtp
rldnr fmlv_curtp_ml rldnr
ext_curtype fmlv_curtp_ml ext_curtype
peinh ckmlpr peinh
zprsdat ckmlpr zprsdat
kalnr
KEY curtp fmlv_curtp_ml curtp
rldnr fmlv_curtp_ml rldnr
ext_curtype fmlv_curtp_ml ext_curtype
peinh ckmlpr peinh
zprsdat ckmlpr zprsdat
zkprs ckmlpr zkprs
@AbapCatalog.sqlViewName: 'FMLVCKMLPRCOMPAT'
@AbapCatalog.compiler.compareFilter: true
@AbapCatalog.preserveKey: true
@AccessControl.authorizationCheck: #CHECK
@EndUserText.label: 'Compatibility View for CKMLPR'
@ObjectModel.usageType.serviceQuality: #D
@ObjectModel.usageType.sizeCategory: #XL
@ObjectModel.usageType.dataClass: #TRANSACTIONAL
define view fmlv_ckmlpr_compat
  as select from fmlt_price    as price 
    inner join R_MatlPriceDataMigrationStatus as tf on ( tf.MatlPriceDataMigrationStatus = 'F' ) 
                                                    or ( tf.MatlPriceDataMigrationStatus = 'R' )
    inner join   fmlv_curtp_ml as curtp on  curtp.rbukrs      = price.bukrs
                                        and curtp.rldnr       = price.rldnr
                                        and curtp.ext_curtype = price.ext_curtype
{
  key price.kalnr,
  key curtp.curtp,
      price.rldnr,
      price.ext_curtype,
      price.peinh,
      price.date_from as zprsdat,
      price.price     as zkprs
}
where
      price_type    = 'FUTURE'
  and price_subtype = ' '

union all select from ckmlpr        as pr
  inner join R_MatlPriceDataMigrationStatus as tf on ( tf.MatlPriceDataMigrationStatus = 'X' ) 
                                                  or ( tf.MatlPriceDataMigrationStatus = 'R' )
  inner join          ckmlhd        as hd    on hd.kalnr = pr.kalnr
  inner join          t001k         as t     on t.bwkey = hd.bwkey
  inner join          fmlv_curtp_ml as curtp on  curtp.rbukrs      = t.bukrs // duplicate entries for additional ledgers

                                             and curtp.ext_curtype = pr.curtp
{
  key pr.kalnr,
  key curtp.curtp,
      curtp.rldnr       as rldnr,
      curtp.ext_curtype as ext_curtype,
      pr.peinh,
      pr.zprsdat,
      pr.zkprs
}
where
  pr.sdm_version is initial

// Include also mother segments in case of split valuation

union all select from ckmlpr        as pr
  inner join R_MatlPriceDataMigrationStatus as tf on ( tf.MatlPriceDataMigrationStatus = 'X' ) 
                                                  or ( tf.MatlPriceDataMigrationStatus = 'R' )
  inner join          mbew          as m     on m.kaln1 = pr.kalnr
  inner join          t001k         as t     on t.bwkey = m.bwkey
  inner join          fmlv_curtp_ml as curtp on  curtp.rbukrs      = t.bukrs // duplicate entries for additional ledgers

                                             and curtp.ext_curtype = pr.curtp
{
  key pr.kalnr,
  key curtp.curtp,
      curtp.rldnr       as rldnr,
      curtp.ext_curtype as ext_curtype,
      pr.peinh,
      pr.zprsdat,
      pr.zkprs
}
where
  pr.sdm_version is initial
  and m.bwtar is initial
  and m.bwtty <> ' '
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"FMLV_CURTP_ML",
"R_MATLPRICEDATAMIGRATIONSTATUS",
"CKMLHD",
"CKMLPR",
"FMLT_PRICE",
"MBEW",
"T001K"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/