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

LOOKUP Rates BPC 10.1 Script Logic

$
0
0

Hi gurus.

Please i need some help with a conversion currency Script Logic.

I'm trying to do a LOOKUP to the model "Rates" from the model "Gastos" and i can´t find all my records.

 

When i try to find one specific register the script logic works well, but when i try to find two or more registers, the script logic only rescues the last record.

 

My firts script logic(Working well)

 

//Seleccion

*SELECT(%CAT%,"[ID]","CATEGORY",ID = %CATEGORY_SET%)

*SELECT(%MONEDA%,"[ID]","RPTCURRENCY",ID = CLP)

*SELECT(%MONEDAS%,"[ID]","RPTCURRENCY",ID = AUD, USD)

 

 

*XDIM_MEMBERSET RPTCURRENCY = <ALL>

*XDIM_MEMBERSET DRIVERS = TARIFA, IMPORTE

*XDIM_MEMBERSET CATEGORY = %CAT%

*XDIM_MEMBERSET CECO = CCA11

*XDIM_MEMBERSET CONCEPT = NO_CTO

*XDIM_MEMBERSET F_ACCOUNT = <ALL>

*XDIM_MEMBERSET TIME = 2013.01

 

*LOOKUP Rates

  *DIM R_ENTITY = "Global"

  *DIM R_ACCOUNT = "AVG"

  *DIM TIME = 2013.01

  *DIM MEASURES = PERIODIC

  *DIM C_USD:INPUTCURRENCY = "USD"

*ENDLOOKUP

*ENDWHEN

 

*WHEN RPTCURRENCY.ID

  *IS USD

  *REC(EXPRESSION = LOOKUP(C_USD),RPTCURRENCY = CLP, TIME = 2013.02)

*ENDWHEN

 

*COMMIT

 

The second script logic(More than two records)

 

//Seleccion

*SELECT(%CAT%,"[ID]","CATEGORY",ID = %CATEGORY_SET%)

*SELECT(%MONEDA%,"[ID]","RPTCURRENCY",ID = CLP)

*SELECT(%MONEDAS%,"[ID]","RPTCURRENCY",ID <> CLP)

 

 

*XDIM_MEMBERSET RPTCURRENCY = <ALL>

*XDIM_MEMBERSET DRIVERS = TARIFA, IMPORTE

*XDIM_MEMBERSET CATEGORY = %CAT%

*XDIM_MEMBERSET CECO = CCA11

*XDIM_MEMBERSET CONCEPT = NO_CTO

*XDIM_MEMBERSET F_ACCOUNT = <ALL>

*XDIM_MEMBERSET TIME = 2013.01

 

 

*LOOKUP Rates

  *DIM CATEGORY = "PLAN1"

  *DIM R_ENTITY = "Global"

  *DIM R_ACCOUNT = "AVG"

  *DIM TIME = 2013.01

  *DIM MEASURES = PERIODIC

  *DIM RATESOURCE:INPUTCURRENCY = CLP

  *DIM RATEAUD:INPUTCURRENCY = AUD

  *DIM RATEEUR:INPUTCURRENCY = EUR

  *DIM RATEUSD:INPUTCURRENCY = USD

  *DIM RATEUTM:INPUTCURRENCY = UTM

  *DIM RATEUF:INPUTCURRENCY = UF

  *DIM RATEJPY:INPUTCURRENCY = JPY

*ENDLOOKUP

 

*WHEN DRIVERS

  *IS IMPORTE, TARIFA

  *WHEN RPTCURRENCY

  *IS CLP

  *REC(EXPRESSION = 0)

  *ENDWHEN

*ENDWHEN

 

*WHEN RPTCURRENCY.ID

  *IS USD

  *REC(EXPRESSION = (%VALUE%*LOOKUP(RATEUSD)),RPTCURRENCY = CLP)

*ENDWHEN

*WHEN RPTCURRENCY.ID

  *IS EUR

  *REC(EXPRESSION = %VALUE%*LOOKUP(RATEEUR),RPTCURRENCY = CLP)

*ENDWHEN

*WHEN RPTCURRENCY.ID

  *IS AUD

  *REC(EXPRESSION = %VALUE%*LOOKUP(RATEAUD), RPTCURRENCY = CLP)

*ENDWHEN

*WHEN RPTCURRENCY.ID

  *IS JPY

  *REC(EXPRESSION = %VALUE%*LOOKUP(RATEJPY), RPTCURRENCY = CLP)

*ENDWHEN

*WHEN RPTCURRENCY.ID

  *IS UF

  *REC(EXPRESSION = %VALUE%*LOOKUP(RATEUF), RPTCURRENCY = CLP)

*ENDWHEN

*WHEN RPTCURRENCY.ID

  *IS UTM

  *REC(EXPRESSION = %VALUE%*LOOKUP(RATEUTM), RPTCURRENCY = CLP)

*ENDWHEN

*COMMIT

 

Then, i tried to do a FOR/Next sentences in the LOOKUP but it's not working properly.

 

 

 

Please, I hope that somebody can help me.

Sorry for my basic english.

 

Best regards.

 

Cristobal Alcalde A.


Viewing all articles
Browse latest Browse all 5414

Trending Articles



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