@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":""
}
}*/
Depth:
1
2
3
4
5
All
Reload