Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

Script Logic - Lookup multiple variables

$
0
0

Hi,

 

I am trying to make simple conversion logic following one blog on SCN. The problem is that the value for last variable in LOOKUP Rates is always overwriting the previous. In the examples below are with EUR and USD. What should be the correct code?



2015-05-22_105531.png

 

 

LGX:

 

 

*XDIM_MEMBERSET ENTITY = DE

*XDIM_MEMBERSET CATEGORY = Actual

*XDIM_MEMBERSET TIME = 2015.01

*XDIM_MEMBERSET RPTCURRENCY = LC

*LOOKUP Rates

*DIM R_ENTITY = "Global"

*DIM SOURCECUR:INPUTCURRENCY = ENTITY.CURRENCY

*DIM DESTCURR1:INPUTCURRENCY = USD

*DIM DESTCURR2:INPUTCURRENCY = EUR

*DIM R_ACCOUNT = ACCOUNT.RATETYPE

*ENDLOOKUP

*WHEN ACCOUNT.RATETYPE

*IS AVG,CLO

*REC(FACTOR = LOOKUP(DESTCURR1),RPTCURRENCY = USD)

*REC(FACTOR = LOOKUP(DESTCURR2),RPTCURRENCY = EUR)

*ENDWHEN

*COMMIT

 

 

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

 

 

LOG BEGIN TIME:2015-05-26 10:34:32

FILE:\ROOT\WEBFOLDERS\TEST_CONSOL \ADMINAPP\Consolidation\TEST.LGF

USER:BPC

APPSET:TEST_CONSOL

APPLICATION:Consolidation

[INFO] GET_DIM_LIST(): I_APPL_ID="Consolidation", #dimensions=10

ACCOUNT,AUDITTRAIL,CATEGORY,ENTITY,FLOW,INTERCO,MEASURES,RPTCURRENCY,SCOPE,TIME

 

 

#dim_memberset=4

ENTITY:DE,1 in total.

CATEGORY:Actual,1 in total.

TIME:2015.01,1 in total.

RPTCURRENCY:LC,1 in total.

 

 

REC :%value%*(LOOKUP(DESTCURR1))

REC :%value%*(LOOKUP(DESTCURR2))

 

 

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 14  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

QUERY LOOKUP DATA FROM APPLICATION: Rates

QUERY TIME : 0.00 ms. 2  RECORDS QUERIED OUT.

CALCULATION TIME IN TOTAL :0.00 ms.

28  RECORDS ARE GENERATED.

CALCULATION END.

 

 

ENDWHEN ACCUMULATION: 28  RECORDS ARE GENERATED.

 

 

DATA TO WRITE BACK:

ACCOUNT AUDITTRAIL CATEGORY ENTITY FLOW INTERCO RPTCURRENCY SCOPE TIME SIGNEDDATA

BS111 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS121 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS122 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS211 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS212 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS213 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS214 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL010 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL020 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL110 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL120 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL310 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL320 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL330 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS111 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS121 Input Actual DE Balance ThirdParty EUR S_None 2015.01 138.75

BS122 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS211 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS212 Input Actual DE Balance ThirdParty EUR S_None 2015.01 - 138.75

BS213 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS214 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL010 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL020 Input Actual DE Balance ThirdParty EUR S_None 2015.01 - 133.20

PL110 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL120 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL310 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL320 Input Actual DE Balance ThirdParty EUR S_None 2015.01 133.20

PL330 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

28  RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :1.00  ms.

 

 

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2015-05-26 10:34:33

 

 

--------------------------------

 

LGX:

 

 

*XDIM_MEMBERSET ENTITY = DE

*XDIM_MEMBERSET CATEGORY = Actual

*XDIM_MEMBERSET TIME = 2015.01

*XDIM_MEMBERSET RPTCURRENCY = LC

*LOOKUP Rates

*DIM R_ENTITY = "Global"

*DIM SOURCECUR:INPUTCURRENCY = ENTITY.CURRENCY

*DIM DESTCURR2:INPUTCURRENCY = EUR

*DIM DESTCURR1:INPUTCURRENCY = USD

*DIM R_ACCOUNT = ACCOUNT.RATETYPE

*ENDLOOKUP

*WHEN ACCOUNT.RATETYPE

*IS AVG,CLO

*REC(FACTOR = LOOKUP(DESTCURR1),RPTCURRENCY = USD)

*REC(FACTOR = LOOKUP(DESTCURR2),RPTCURRENCY = EUR)

*ENDWHEN

*COMMIT

 

 

-------------------------------------------------------------------------------------------------------------------------------------

LOG:

 

 

LOG BEGIN TIME:2015-05-26 10:39:51

FILE:\ROOT\WEBFOLDERS\TEST_CONSOL \ADMINAPP\Consolidation\TEST.LGF

USER:BPC

APPSET:TEST_CONSOL

APPLICATION:Consolidation

[INFO] GET_DIM_LIST(): I_APPL_ID="Consolidation", #dimensions=10

ACCOUNT,AUDITTRAIL,CATEGORY,ENTITY,FLOW,INTERCO,MEASURES,RPTCURRENCY,SCOPE,TIME

 

 

#dim_memberset=4

ENTITY:DE,1 in total.

CATEGORY:Actual,1 in total.

TIME:2015.01,1 in total.

RPTCURRENCY:LC,1 in total.

 

 

REC :%value%*(LOOKUP(DESTCURR1))

REC :%value%*(LOOKUP(DESTCURR2))

 

 

CALCULATION BEGIN:

QUERY PROCESSING DATA

QUERY TIME : 0.00 ms. 14  RECORDS QUERIED OUT.

QUERY REFERENCE DATA

QUERY LOOKUP DATA FROM APPLICATION: Rates

QUERY TIME : 0.00 ms. 2  RECORDS QUERIED OUT.

CALCULATION TIME IN TOTAL :0.00 ms.

28  RECORDS ARE GENERATED.

CALCULATION END.

 

 

ENDWHEN ACCUMULATION: 28  RECORDS ARE GENERATED.

 

 

DATA TO WRITE BACK:

ACCOUNT AUDITTRAIL CATEGORY ENTITY FLOW INTERCO RPTCURRENCY SCOPE TIME SIGNEDDATA

BS111 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS121 Input Actual DE Balance ThirdParty USD S_None 2015.01 133.20

BS122 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS211 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS212 Input Actual DE Balance ThirdParty USD S_None 2015.01 - 133.20

BS213 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS214 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL010 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL020 Input Actual DE Balance ThirdParty USD S_None 2015.01 - 144.30

PL110 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL120 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL310 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

PL320 Input Actual DE Balance ThirdParty USD S_None 2015.01 144.30

PL330 Input Actual DE Balance ThirdParty USD S_None 2015.01 0.00

BS111 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS121 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS122 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS211 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS212 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS213 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

BS214 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL010 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL020 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL110 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL120 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL310 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL320 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

PL330 Input Actual DE Balance ThirdParty EUR S_None 2015.01 0.00

28  RECORDS HAVE BEEN WRITTEN BACK.

WRITING TIME :1.00  ms.

 

 

SCRIPT RUNNING TIME IN TOTAL:1.00 s.

LOG END TIME:2015-05-26 10:39:52


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>