Fml_Relind_Bwkey

DDL: FML_RELIND_BWKEY SQL: FMLV_RELIND_BWKE Type: view

ML Relevant Indicators per Bwkey

Fml_Relind_Bwkey is a CDS View that provides data about "ML Relevant Indicators per Bwkey" in SAP S/4HANA. It reads from 14 data sources and exposes 14 fields.

Data Sources (14)

SourceAliasJoin Type
finsc_ld_cmp f from
t001k k inner
I_Ledger l inner
ckmlct mlb left_outer
ckmlct mlc left_outer
ckmlct mld left_outer
ckmlct mle left_outer
ckmlct mlf left_outer
ckmlct mlg left_outer
ckmlct mlh left_outer
ckmlct mlk left_outer
ckmlct mlo left_outer
ckmlct mlv left_outer
t001 t inner

Annotations (7)

NameValueLevelField
AbapCatalog.sqlViewName FMLV_RELIND_BWKE view
AbapCatalog.compiler.compareFilter true view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view
EndUserText.label ML Relevant Indicators per Bwkey view

Fields (14)

KeyFieldSource TableSource FieldDescription
mandt finsc_ld_cmp mandt
rldnr finsc_ld_cmp rldnr
bukrs finsc_ld_cmp bukrs
bwkey t001k bwkey
curtph finsc_ld_cmp curtph
curtpk finsc_ld_cmp curtpk
curtpo finsc_ld_cmp curtpo
curtpv finsc_ld_cmp curtpv
curtpb finsc_ld_cmp curtpb
curtpc finsc_ld_cmp curtpc
curtpd finsc_ld_cmp curtpd
curtpe finsc_ld_cmp curtpe
curtpf finsc_ld_cmp curtpf
curtpg finsc_ld_cmp curtpg
@AbapCatalog.sqlViewName: 'FMLV_RELIND_BWKE'
@AbapCatalog.compiler.compareFilter: true
@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #P
@EndUserText.label: 'ML Relevant Indicators per Bwkey'
//--------------------------------------------------------------------------------------------

// Per each valuation area:

// The view shows the ML relevant indicator. The relevant indivator is set in a

// FINSC_LD_CMP - cell ( Ledger / Currency Group ), if the corrspodning currency is a ML

// Currency and if the ledger is a basis ledger and if the fiscal year variant is

// the same as for the compay.

//

// ATTENTION: to be used only in scenarios where CKMLCT is still reliable

//   - parallel accounting = OFF

//   - during migration / XPRA phase

//--------------------------------------------------------------------------------------------


define view Fml_Relind_Bwkey
  as

  select from       finsc_ld_cmp as f

    // Join to T001 entry for correct BUKRS-PERIV

    inner join      t001         as t   on  f.mandt = t.mandt
                                        and f.bukrs = t.bukrs
                                        and f.periv = t.periv

    // Join to T001K (we need one entry per RLDNR and BWKEY)

    inner join      t001k        as k   on  f.mandt = k.mandt
                                        and f.bukrs = k.bukrs

    // Join to FINSC_LEDGER (Take only Standard Ledger)

    inner join      I_Ledger     as l   on  f.mandt      = l.mandt
                                        and f.rldnr      = l.Ledger
                                        and l.LedgerType = ' '

    // Try to add ML curtp to H-Group

    left outer join ckmlct       as mlh on  f.mandt  = mlh.mandt
                                        and k.bwkey  = mlh.bwkey
                                        and f.curtph = mlh.curtp

    // Try to add ML curtp to K-Group

    left outer join ckmlct       as mlk on  f.mandt  = mlk.mandt
                                        and k.bwkey  = mlk.bwkey
                                        and f.curtpk = mlk.curtp

    // Try to add ML curtp to O-Group

    left outer join ckmlct       as mlo on  f.mandt  = mlo.mandt
                                        and k.bwkey  = mlo.bwkey
                                        and f.curtpo = mlo.curtp

    // Try to add ML curtp to V-Group

    left outer join ckmlct       as mlv on  f.mandt  = mlv.mandt
                                        and k.bwkey  = mlv.bwkey
                                        and f.curtpv = mlv.curtp

    // Try to add ML curtp to B-Group

    left outer join ckmlct       as mlb on  f.mandt  = mlb.mandt
                                        and k.bwkey  = mlb.bwkey
                                        and f.curtpb = mlb.curtp

    // Try to add ML curtp to C-Group

    left outer join ckmlct       as mlc on  f.mandt  = mlc.mandt
                                        and k.bwkey  = mlc.bwkey
                                        and f.curtpc = mlc.curtp

    // Try to add ML curtp to D-Group

    left outer join ckmlct       as mld on  f.mandt  = mld.mandt
                                        and k.bwkey  = mld.bwkey
                                        and f.curtpd = mld.curtp

    // Try to add ML curtp to E-Group

    left outer join ckmlct       as mle on  f.mandt  = mle.mandt
                                        and k.bwkey  = mle.bwkey
                                        and f.curtpe = mle.curtp

    // Try to add ML curtp to F-Group

    left outer join ckmlct       as mlf on  f.mandt  = mlf.mandt
                                        and k.bwkey  = mlf.bwkey
                                        and f.curtpf = mlf.curtp

    // Try to add ML curtp to G-Group

    left outer join ckmlct       as mlg on  f.mandt  = mlg.mandt
                                        and k.bwkey  = mlg.bwkey
                                        and f.curtpg = mlg.curtp

{
  f.mandt      as mandt,
  f.rldnr      as rldnr,
  f.bukrs      as bukrs,
  k.bwkey      as bwkey,

  // Determine CURTPH and MLRELINDH

  f.curtph     as curtph,
  case when mlh.curtp is null then ' '
  else 'X' end as mlrelindh,

  // Determine CURTPK and MLRELINDK

  f.curtpk     as curtpk,
  case when mlk.curtp is null then ' '
  else 'X' end as mlrelindk,

  // Determine CURTPO and MLRELINDO

  f.curtpo     as curtpo,
  case when mlo.curtp is null then ' '
  else 'X' end as mlrelindo,

  // Determine CURTPV and MLRELINDV

  f.curtpv     as curtpv,
  case when mlv.curtp is null then ' '
  else 'X' end as mlrelindv,

  // Determine CURTPB and MLRELINDB

  f.curtpb     as curtpb,
  case when mlb.curtp is null then ' '
  else 'X' end as mlrelindb,

  // Determine CURTPC and MLRELINDC

  f.curtpc     as curtpc,
  case when mlc.curtp is null then ' '
  else 'X' end as mlrelindc,

  // Determine CURTPD and MLRELINDD

  f.curtpd     as curtpd,
  case when mld.curtp is null then ' '
  else 'X' end as mlrelindd,

  // Determine CURTPE and MLRELINDE

  f.curtpe     as curtpe,
  case when mle.curtp is null then ' '
  else 'X' end as mlrelinde,

  // Determine CURTPF and MLRELINDF

  f.curtpf     as curtpf,
  case when mlf.curtp is null then ' '
  else 'X' end as mlrelindf,

  // Determine CURTPG and MLRELINDG

  f.curtpg     as curtpg,
  case when mlg.curtp is null then ' '
  else 'X' end as mlrelindg

}
/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_LEDGER",
"CKMLCT",
"FINSC_LD_CMP",
"T001",
"T001K"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/