P_ReportedFinancialData_RT_03

DDL: P_REPORTEDFINANCIALDATA_RT_03 SQL: PREPFINDRT_03 Type: view COMPOSITE

P_ReportedFinancialData_RT_03 is a Composite CDS View in SAP S/4HANA. It reads from 2 data sources (I_FSItemMappingAssgmtWithVers, P_ReportedFinancialData_RT_02) and exposes 51 fields.

Data Sources (2)

SourceAliasJoin Type
I_FSItemMappingAssgmtWithVers I_FSItemMappingAssgmtWithVers left_outer
P_ReportedFinancialData_RT_02 P_ReportedFinancialData_RT_02 from

Parameters (2)

NameTypeDefault
p_timestamp_from timestamp
p_timestamp_to timestamp

Annotations (12)

NameValueLevelField
AbapCatalog.preserveKey true view
AbapCatalog.sqlViewName PREPFINDRT_03 view
AbapCatalog.compiler.compareFilter true view
VDM.viewType #COMPOSITE view
AccessControl.authorizationCheck #NOT_REQUIRED view
VDM.private true view
ClientHandling.algorithm #SESSION_VARIABLE view
ObjectModel.usageType.serviceQuality #X view
ObjectModel.usageType.dataClass #MIXED view
ObjectModel.usageType.sizeCategory #XL view
AccessControl.personalData.blocking #NOT_REQUIRED view
Metadata.ignorePropagatedAnnotations true view

Fields (51)

KeyFieldSource TableSource FieldDescription
ritem I_FSItemMappingAssgmtWithVers FinancialStatementItem
ConsolidationChartOfAccounts I_FSItemMappingAssgmtWithVers ConsolidationChartOfAccounts
rbuptr
rgcurr P_ReportedFinancialData_RT_02 gcurr
rlcurr P_ConsolidationUnitCurrency curr
rdimen P_ReportedFinancialData_RT_02 rdimen
rldnr_fin P_ReportedFinancialData_RT_02 rldnr_fin
docln_fin P_ReportedFinancialData_RT_02 docln_fin
robukrs P_ReportedFinancialData_RT_02 robukrs
rassc P_ReportedFinancialData_RT_02 rassc
rvers P_ReportedFinancialData_RT_02 rvers
rbunit P_ReportedFinancialData_RT_02 rbunit
budat P_ReportedFinancialData_RT_02 budat
belnr P_ReportedFinancialData_RT_02 belnr
docln P_ReportedFinancialData_RT_02 docln
sbusa P_ReportedFinancialData_RT_02 sbusa
rldnr P_ReportedFinancialData_RT_02 rldnr
rtcur P_ReportedFinancialData_RT_02 rtcur
runit P_ReportedFinancialData_RT_02 runit
poper P_ReportedFinancialData_RT_02 poper
ryear P_ReportedFinancialData_RT_02 ryear
rmvct P_ReportedFinancialData_RT_02 rmvct
rfarea P_ReportedFinancialData_RT_02 rfarea
rcntr P_ReportedFinancialData_RT_02 rcntr
prctr P_ReportedFinancialData_RT_02 prctr
rbusa P_ReportedFinancialData_RT_02 rbusa
blart P_ReportedFinancialData_RT_02 blart
gjahr P_ReportedFinancialData_RT_02 gjahr
racct P_ReportedFinancialData_RT_02 racct
tsl P_ReportedFinancialData_RT_02 tsl
hsl P_ReportedFinancialData_RT_02 hsl
ksl P_ReportedFinancialData_RT_02 ksl
osl P_ReportedFinancialData_RT_02 osl
vsl P_ReportedFinancialData_RT_02 vsl
bsl P_ReportedFinancialData_RT_02 bsl
csl P_ReportedFinancialData_RT_02 csl
dsl P_ReportedFinancialData_RT_02 dsl
esl P_ReportedFinancialData_RT_02 esl
fsl P_ReportedFinancialData_RT_02 fsl
gsl P_ReportedFinancialData_RT_02 gsl
msl P_ReportedFinancialData_RT_02 msl
activ P_ReportedFinancialData_RT_02 activ
refdocnr P_ReportedFinancialData_RT_02 refdocnr
refryear P_ReportedFinancialData_RT_02 refryear
refactiv P_ReportedFinancialData_RT_02 refactiv
usnam P_ReportedFinancialData_RT_02 usnam
awtyp P_ReportedFinancialData_RT_02 awtyp
aworg P_ReportedFinancialData_RT_02 aworg
logsys P_ReportedFinancialData_RT_02 logsys
gcurr P_ReportedFinancialData_RT_02 gcurr
Segment P_ReportedFinancialData_RT_02 Segment
@AbapCatalog.preserveKey: true
@AbapCatalog.sqlViewName: 'PREPFINDRT_03'
@AbapCatalog.compiler.compareFilter: true

@VDM.viewType: #COMPOSITE
@AccessControl.authorizationCheck: #NOT_REQUIRED
@VDM.private:true
@ClientHandling.algorithm: #SESSION_VARIABLE
//@AccessControl.authorizationCheck: #NOT_ALLOWED

@ObjectModel.usageType.serviceQuality: #X
@ObjectModel.usageType.dataClass: #MIXED
@ObjectModel.usageType.sizeCategory: #XL
@AccessControl.personalData.blocking: #NOT_REQUIRED
@Metadata.ignorePropagatedAnnotations: true

define view P_ReportedFinancialData_RT_03
  with parameters
    p_timestamp_from :timestamp,
    p_timestamp_to   :timestamp

  as select from           P_ReportedFinancialData_RT_02
                 (p_timestamp_from : :p_timestamp_from,
                              p_timestamp_to   : :p_timestamp_to)

    left outer to one join P_ConsolidationUnitCurrency   on  P_ReportedFinancialData_RT_02.rdimen = dimen
                                                         and P_ReportedFinancialData_RT_02.rbunit = bunit
                                                         and P_ReportedFinancialData_RT_02.ryear  = CalendarYear

// begin of bbrCC1808: Use new FS item mapping

//////  //  T004: Get group chart of accounts (KKTPL) for local chart of accounts (KTOPL)

//////  //    inner join t004 t004                    on  P_ReportedFinancialData_RT_02.ktopl = t004.ktopl

//////    left outer to one join I_ChartOfAccounts             on P_ReportedFinancialData_RT_02.ktopl = I_ChartOfAccounts.ChartOfAccounts

//////

//////  //  SKA1: G/L Account Master Data

//////  //    inner join ska1 ska1 on  P_ReportedFinancialData_RT_02.ktopl = ska1.ktopl

//////  //                         and P_ReportedFinancialData_RT_02.racct = ska1.saknr

//////    left outer to one join I_GLAccountInChartOfAccounts  on  P_ReportedFinancialData_RT_02.ktopl = I_GLAccountInChartOfAccounts.ChartOfAccounts

//////                                                         and P_ReportedFinancialData_RT_02.racct = I_GLAccountInChartOfAccounts.GLAccount


    left outer join I_FSItemMappingAssgmtWithVers on P_ReportedFinancialData_RT_02.impvs = FSItemMappingVersion
                                                         and P_ReportedFinancialData_RT_02.fiscal_year_period between ValidityStartFiscalYearPeriod and ValidityEndFiscalYearPeriod
                                                         and P_ReportedFinancialData_RT_02.ktopl = ChartOfAccounts
                                                         and P_ReportedFinancialData_RT_02.racct = GLAccount
                                                         // &NORELEASE is a dummy FS item, G/L accounts with this target must be ignored

                                                         and FinancialStatementItem <> '&NORELEASE'                 //bbr n2843448

// end of bbrCC1808


    left outer to one join tfin010                       on  P_ReportedFinancialData_RT_02.rdimen = tfin010.dimen
                                                         and P_ReportedFinancialData_RT_02.rassc  = tfin010.rcomp
                                                         and tfin010.contp = '1'
                                                         and tfin010.rcomp           <> ''                          //bbr n3265126

{
  //RITEM

//begin of bbrCC1808

//////  case

//////      when I_ChartOfAccounts.CorporateGroupChartOfAccounts = ''

//////        or I_ChartOfAccounts.CorporateGroupChartOfAccounts = P_ReportedFinancialData_RT_02.ktopl

//////  //          Group chart of accounts = Local chart of accounts

//////  //          -> item = G/L account

//////          then P_ReportedFinancialData_RT_02.racct

//////  //      else

//////      when I_ChartOfAccounts.CorporateGroupChartOfAccounts <> ''

//////       and I_ChartOfAccounts.CorporateGroupChartOfAccounts <> P_ReportedFinancialData_RT_02.ktopl

//////  //          Group chart of accounts <> Local chart of accounts

//////  //          -> item = Group account (BILKT) of G/L account

//////          then I_GLAccountInChartOfAccounts.CorporateGroupAccount

//////  // Evaluation of ranges if specified in TFIN200 not necessary:

//////  // Only for secondary cost elements, not available in S/4

//////  end                                                                 as ritem,


  I_FSItemMappingAssgmtWithVers.FinancialStatementItem as ritem,
//'' as ritem,

  I_FSItemMappingAssgmtWithVers.ConsolidationChartOfAccounts,
//end of bbrCC1808


  coalesce(tfin010.bunit,'') as rbuptr,                     //gew2781691


  P_ReportedFinancialData_RT_02.gcurr                                 as rgcurr,

  P_ConsolidationUnitCurrency.curr                                    as rlcurr,
  P_ConsolidationUnitCurrency.curr_local_send,

  //  tgsb.gsber_kons                                                     as sitem_gsber,


  P_ReportedFinancialData_RT_02.rdimen,
  P_ReportedFinancialData_RT_02.rldnr_fin,
  P_ReportedFinancialData_RT_02.docln_fin,
  P_ReportedFinancialData_RT_02.robukrs,
  P_ReportedFinancialData_RT_02.rassc,
  P_ReportedFinancialData_RT_02.rvers,
  P_ReportedFinancialData_RT_02.rbunit,
  P_ReportedFinancialData_RT_02.budat,
  P_ReportedFinancialData_RT_02.belnr,
  P_ReportedFinancialData_RT_02.docln,
  P_ReportedFinancialData_RT_02.sbusa,
  P_ReportedFinancialData_RT_02.rldnr,
  P_ReportedFinancialData_RT_02.rtcur,
  P_ReportedFinancialData_RT_02.runit,
  P_ReportedFinancialData_RT_02.poper,
  P_ReportedFinancialData_RT_02.ryear,
  P_ReportedFinancialData_RT_02.fiscal_year_period,     //bbrCC1908

  P_ReportedFinancialData_RT_02.rmvct,
  P_ReportedFinancialData_RT_02.rfarea,
  P_ReportedFinancialData_RT_02.rcntr,
  P_ReportedFinancialData_RT_02.prctr,
  P_ReportedFinancialData_RT_02.rbusa,
  P_ReportedFinancialData_RT_02.blart,
  P_ReportedFinancialData_RT_02.gjahr,
  P_ReportedFinancialData_RT_02.racct,
  P_ReportedFinancialData_RT_02.tsl,
  P_ReportedFinancialData_RT_02.hsl,
  P_ReportedFinancialData_RT_02.ksl,
  P_ReportedFinancialData_RT_02.osl,
  P_ReportedFinancialData_RT_02.vsl,
  P_ReportedFinancialData_RT_02.bsl,
  P_ReportedFinancialData_RT_02.csl,
  P_ReportedFinancialData_RT_02.dsl,
  P_ReportedFinancialData_RT_02.esl,
  P_ReportedFinancialData_RT_02.fsl,
  P_ReportedFinancialData_RT_02.gsl,
  P_ReportedFinancialData_RT_02.msl,
  P_ReportedFinancialData_RT_02.activ,
  P_ReportedFinancialData_RT_02.refdocnr,
  P_ReportedFinancialData_RT_02.refryear,
  P_ReportedFinancialData_RT_02.refactiv,
  P_ReportedFinancialData_RT_02.usnam,
  P_ReportedFinancialData_RT_02.awtyp,
  P_ReportedFinancialData_RT_02.aworg,
  P_ReportedFinancialData_RT_02.logsys,
  P_ReportedFinancialData_RT_02.curr_group_send,
  P_ReportedFinancialData_RT_02.gcurr,
  P_ReportedFinancialData_RT_02.Segment
}

/*+[internal] {
"BASEINFO":
{
"FROM":
[
"I_FSITEMMAPPINGASSGMTWITHVERS",
"P_CONSOLIDATIONUNITCURRENCY",
"P_REPORTEDFINANCIALDATA_RT_02",
"TFIN010"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/