Faa_Anep2

DDL: FAA_ANEP2 SQL: FAAV_ANEP2 Type: view

Intern: Parallele Waehrungen auf AfA-Bereiche mappen

Faa_Anep2 is a CDS View that provides data about "Intern: Parallele Waehrungen auf AfA-Bereiche mappen" in SAP S/4HANA. It reads from 2 data sources (Faa_Anep1, Faa_Curtyp) and exposes 15 fields with key fields mandt, bukrs, anln1, anln2, gjahr.

Data Sources (2)

SourceAliasJoin Type
Faa_Anep1 v1 from
Faa_Curtyp v2 inner

Annotations (6)

NameValueLevelField
AbapCatalog.sqlViewName FAAV_ANEP2 view
EndUserText.label Intern: Parallele Waehrungen auf AfA-Bereiche mappen view
ClientHandling.algorithm #SESSION_VARIABLE view
Metadata.ignorePropagatedAnnotations true view
AccessControl.authorizationCheck #NOT_REQUIRED view
ObjectModel.usageType.serviceQuality #P view

Fields (15)

KeyFieldSource TableSource FieldDescription
KEY mandt Faa_Anep1 mandt
KEY bukrs Faa_Anep1 bukrs
KEY anln1 Faa_Anep1 anln1
KEY anln2 Faa_Anep1 anln2
KEY gjahr Faa_Anep1 gjahr
KEY lnran Faa_Anep1 lnran
KEY afabe Faa_Curtyp afabe
zucod zucod
belnr belnr
buzei buzei
bzdat bzdat
bwasl bwasl
slalittype slalittype
lnsan lnsan
augln augln
@AbapCatalog.sqlViewName: 'FAAV_ANEP2'
@EndUserText.label: 'Intern: Parallele Waehrungen auf AfA-Bereiche mappen'

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

// this view is just to map parallel currencies to depr. areas

--------------------------------------------------------------
define view Faa_Anep2

as select from Faa_Anep1   as v1

inner join     Faa_Curtyp  as v2
        on v1.bukrs = v2.bukrs
       and v1.afabe = v2.lead_afabe

//inner join     t093        as v3     // Note 2135855

//        on v3.afapl  = v2.afapl

//       and v3.afaber = v2.afabe


{ key v1.mandt as mandt,
  key v1.bukrs as bukrs,
  key v1.anln1 as anln1,
  key v1.anln2 as anln2,
  key v1.gjahr as gjahr,
  key v1.lnran as lnran,
  key v2.afabe as afabe,
      zucod,
      belnr,
      buzei,
      bzdat,
      bwasl,
      slalittype,
      lnsan,
      augln,

  case
  when v2.hsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

//             or (     ( slalittype = '07002' or slalittype = '07022' or slalittype = '07042' )

//                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or

//                        movcat     = '14'                            )

//                  and ( v3.vzansw  = '0'                             )) )  // Note 2135855

  then cast( v1.hsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.ksl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

//             or (     ( slalittype = '07002' or slalittype = '07022' or slalittype = '07042' )

//                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or

//                        movcat     = '14'                            )

//                  and ( v3.vzansw  = '0'                             )) )  // Note 2135855

  then cast( v1.ksl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.osl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

//             or (     ( slalittype = '07002' or slalittype = '07022' or slalittype = '07042' )

//                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or

//                        movcat     = '14'                            )

//                  and ( v3.vzansw  = '0'                             )) )  // Note 2135855

  then cast( v1.osl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.vsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

//             or (     ( slalittype = '07002' or slalittype = '07022' or slalittype = '07042' )

//                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or

//                        movcat     = '14'                            )

//                  and ( v3.vzansw  = '0'                             )) )  // Note 2135855

  then cast( v1.vsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.bsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.bsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.csl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.csl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.dsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.dsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.esl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.esl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.fsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.fsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  when v2.gsl = 'X'
   and not (    (     ( slalittype = '07900' or slalittype = '07940' )
                  and ( movcat     = 'B8'    or movcat     = '12'    ))
             or (     ( slalittype = '07901'                         )
                  and ( movcat     = 'A8'    or movcat     = '12'    ))
             -- or (     ( slalittype = '07006' or slalittype = '07007' or
             --            slalittype = '07008'                         )
             --      and ( movcat     = '56'    or movcat     = '59'    ))
             or (     ( slalittype = '07003' or slalittype = '07023' or slalittype = '07043' or
                        slalittype = '07008' or slalittype = '07028' or slalittype = '07048' or
                        slalittype = '07025' or slalittype = '07026' or slalittype = '07027' or
                        slalittype = '07045' or slalittype = '07046' or slalittype = '07047' or
                        slalittype = '07005' or slalittype = '07006' or slalittype = '07007' or
                        slalittype = '07008' ) // note  2420878

                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '56'    or movcat     = '59'    ))                        // note  2446873

             or (     ( slalittype = '07004' or slalittype = '07024' or slalittype = '07044' )
                  and ( movcat     = '11'    or movcat     = '12'    or movcat     = '13'    or
                        movcat     = '14'    or movcat     = '15'    or
                        movcat     = '61'    or movcat     = '65'    )) )   // note  2459507 - 2497351

  then cast( v1.gsl as aufwp ) //AFLE Enablement abap.dec(13,2)


  else cast(   0    as aufwp ) end as amount } //AFLE Enablement abap.dec(13,2)








/*+[internal] {
"BASEINFO":
{
"FROM":
[
"FAA_ANEP1",
"FAA_CURTYP"
],
"ASSOCIATED":
[],
"BASE":
[],
"ANNO_REF":
[],
"SCALAR_FUNCTION":
[],
"VERSION":0,
"ANNOREF_EVALUATION_ERROR":""
}
}*/