Faa_Anlc1_Stat

DDL: FAA_ANLC1_STAT SQL: FAAV_ANLC1_STAT Type: view

Intern: Verdichten auf SLALITTYPE-Ebene

Faa_Anlc1_Stat is a CDS View that provides data about "Intern: Verdichten auf SLALITTYPE-Ebene" in SAP S/4HANA. It reads from 1 data source (faat_doc_it) and exposes 34 fields.

Data Sources (1)

SourceAliasJoin Type
faat_doc_it faat_doc_it from

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName FAAV_ANLC1_STAT view
EndUserText.label Intern: Verdichten auf SLALITTYPE-Ebene view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view

Fields (34)

KeyFieldSource TableSource FieldDescription
mandt mandt
bukrs bukrs
anln1 anln1
anln2 anln2
gjahr gjahr
afabe afabe
slalittype slalittype
movcat movcat
hsl
ksl
osl
vsl
bsl
csl
dsl
esl
fsl
bukrs bukrs
anln1 anlgr
anln2 anlgr2
gjahr gjahr
afabe afabe
slalittype slalittype
movcat movcat
hsl
ksl
osl
vsl
bsl
csl
dsl
esl
fsl
gsl
@AbapCatalog.sqlViewName: 'FAAV_ANLC1_STAT'
@EndUserText.label: 'Intern: Verdichten auf SLALITTYPE-Ebene'

@ClientHandling.algorithm: #SESSION_VARIABLE
@Metadata.ignorePropagatedAnnotations: true
@AccessControl.authorizationCheck: #NOT_REQUIRED
@ObjectModel.usageType.serviceQuality: #P

// this view is just to condense the data on slalittype level

-------------------------------------------------------------
define view Faa_Anlc1_Stat

as select from faat_doc_it

{     mandt,
      bukrs,
      anln1,
      anln2,
      gjahr,
      afabe,
      slalittype,
      movcat,
//      faat_doc_it.poper as poperx,                                     // note 2364559, 2381967 - performance optimization - ANLC ext. with period

      // 'C7' = unterjährige Altdatenübernahme

      case when (     ( bwasl  <> '999'                                                                            )   // note 2252940

                  and ( movcat <> '00' and movcat <> 'C7' and movcat <> '77' and movcat <> '87' and movcat <> '97' ) ) // note 2252940

           then '999'                    // current year

           else '000' end as poper,      // balance carried forward


  sum ( hsl ) as hsl,
  sum ( ksl ) as ksl,
  sum ( osl ) as osl,
  sum ( vsl ) as vsl,
  sum ( bsl ) as bsl,
  sum ( csl ) as csl,
  sum ( dsl ) as dsl,
  sum ( esl ) as esl,
  sum ( fsl ) as fsl,
  sum ( gsl ) as gsl }

  where anln1 <> ''
    and ( slalittype = '07000' or
          slalittype = '07001' or slalittype = '07002' or slalittype = '07003' or slalittype = '07004' or
          slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or slalittype = '07008' or
          slalittype = '07009' or
          slalittype = '07010' or
                                  slalittype = '07022' or slalittype = '07023' or slalittype = '07024' or
          slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or slalittype = '07028' or
          slalittype = '07040' or
          slalittype = '07041' or slalittype = '07042' or slalittype = '07043' or slalittype = '07044' or
          slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or slalittype = '07048' or
          slalittype = '07050' or
          slalittype = '07203' or slalittype = '07204' or slalittype = '07205' or slalittype = '07206' or
          slalittype = '07207' or slalittype = '07208' or slalittype = '07209' )
    and sdm_status <> '18' 
    and sdm_status <> '19' 
    and sdm_status <> '1A'  // FAAT_DOC_IT entry is comletely migrated to ACDOCA

  //  and not       -- no legacy data transfer ( keine Altdatenübernahme )         // note 2252940

  //      ( movcat     = '77'    or movcat     = '87'    or movcat     = '97'    )


  group by mandt,
           bukrs,
           anln1,
           anln2,
           gjahr,
           afabe,
           slalittype,
           movcat,
//           poper,                          // note 2364559, 2381967 

           bwasl

union all

// the same for group assets

-----------------------------
select from faat_doc_it

{     mandt,
      bukrs,
      anlgr  as anln1,
      anlgr2 as anln2,
      gjahr,
      afabe,
      slalittype,
      movcat,
//      faat_doc_it.poper as poperx,                                     // note 2364559, 2381967  - performance optimization - ANLC ext. with period

      // 'C7' = unterjährige Altdatenübernahme

      case when (     ( bwasl  <> '999'                                                                            )   // note 2252940

                  and ( movcat <> '00' and movcat <> 'C7' and movcat <> '77' and movcat <> '87' and movcat <> '97' ) ) // note 2252940

           then '999'                    // current year

           else '000' end as poper,      // balance carried forward


  sum ( hsl ) as hsl,
  sum ( ksl ) as ksl,
  sum ( osl ) as osl,
  sum ( vsl ) as vsl,
  sum ( bsl ) as bsl,
  sum ( csl ) as csl,
  sum ( dsl ) as dsl,
  sum ( esl ) as esl,
  sum ( fsl ) as fsl,
  sum ( gsl ) as gsl }

  where anlgr <> ''
    and (    ( anlgr <> anln1                       )
          or ( anlgr =  anln1 and anlgr2 <> anln2 ) )
    and ( slalittype = '07000' or
          slalittype = '07001' or slalittype = '07002' or slalittype = '07003' or slalittype = '07004' or
          slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or slalittype = '07008' or
          slalittype = '07009' or
          slalittype = '07010' or
                                  slalittype = '07022' or slalittype = '07023' or slalittype = '07024' or
          slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or slalittype = '07028' or
          slalittype = '07040' or
          slalittype = '07041' or slalittype = '07042' or slalittype = '07043' or slalittype = '07044' or
          slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or slalittype = '07048' or
          slalittype = '07050' or
          slalittype = '07203' or slalittype = '07204' or slalittype = '07205' or slalittype = '07206' or
          slalittype = '07207' or slalittype = '07208' or slalittype = '07209' )
    and sdm_status <> '18' 
    and sdm_status <> '19' 
    and sdm_status <> '1A'  // FAAT_DOC_IT entry is comletely migrated to ACDOCA

  //   and not       -- no legacy data transfer ( keine Altdatenübernahme )

  //        ( movcat     = '77'    or movcat     = '87'    or movcat     = '97'    )


  group by mandt,
           bukrs,
           anlgr,
           anlgr2,
           gjahr,
           afabe,
           slalittype,
           movcat,
//           poper,                          // note 2364559, 2381967 

           bwasl
      
  
  
  
  
  
 /*+[internal] {
"BASEINFO":
{
"FROM":
[
"FAAT_DOC_IT"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/