cancel
Showing results for 
Search instead for 
Did you mean: 

currency conversion not working

former_member200880
Participant
0 Kudos

Dear All

we have recently upgraded SAP BPC from SP09 to SP 16 and EPM addin from SP13 to SP18.

The data posted in LC is not getting converted to CAD.

is there any limitation or bug in currency conversion for SP16.

Please advise.

The currency conversion is done by script logic, which we have placed it in Default logic. It did work well in Production environment where it was with BPC10.0 SP09. However after upgrading to SP16 and epm addin upgraded to SP18, the currency conversion not working. This is preventing gollive.

Attaching script logic.

Please advise .

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Hi Vijay,

Due to SP upgrade your logic calculation engine was changed from JavaScript to ABAP and the function: Math.round is not available in ABAP!

You can switch engine back to javascript or better use standard currency conversion function:

Vadim

former_member186338
Active Contributor
0 Kudos

P.S. Something like:

*FOR %VER%=%VERSION_SET% // CURR_CONVERSION is limited to single CATEGORY member

*RUN_PROGRAM CURR_CONVERSION

CATEGORY     = %VER%

CURRENCY     = CAD

TID_RA       = %TIME_SET%

OTHER        = [COST_CTR=%COST_CTR_SET%]

RATEENTITY   = GLOBAL

*ENDRUN_PROGRAM

*NEXT

former_member200880
Participant
0 Kudos

hi Vadim

thanks for the prompt reply.

we are not converting by account, however we are proceeding with all at a time whenver input has been loaded. Thats why we placed it in default logic.

please advise, how can we overcome this math.round javacript syntax

thanks

former_member186338
Active Contributor
0 Kudos

"we are not converting by account, however we are proceeding with all at a time whenver input has been loaded. Thats why we placed it in default logic." - what do you mean by "not converting by account"??? CURR_CONVERSION will process all accounts! And it can be placed in default logic...

What dimensions do you have in the cube?

former_member200880
Participant
0 Kudos

hi Vadim

If we switch engine back to Javascript, will it effect any other templates/or process etcs..,

please advise, if there is any replacement for the keyword math.round

thanks

former_member186338
Active Contributor
0 Kudos

If you switch engine back to JavaScript the scripts will run slower then with ABAP engine! But with ABAP there is no replacement of JavaScript keyword math.round!

I still do not understand why you are reinventing the wheel instead of CURR_CONVERSION???

The other line can be improved to reduce scope like:

OTHER = [ENTITY=%ENTITY_SET%;FLOW=%FLOW_SET%;AUDITTRAIL=%AUDITTRAIL_SET%]

Where ENTITY, FLOW and AUDITTRAIL are the real dimension names. If you have some user defined dimension you can also add it to OTHER...

former_member200880
Participant
0 Kudos

hi Vadim

I  am sorry for confusion. We are not using RUN_Curr , its commented in script.

here is the piece of code

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

*LOOKUP RATE

*DIM R_ACCT = AVG

*DIM R_ENTITY = GLOBAL

*DIM L_RATE_USD:INPUTCURRENCY = USD

*DIM L_RATE_GBP:INPUTCURRENCY = GBP

*DIM L_RATE_EUR:INPUTCURRENCY = EUR

*DIM L_RATE_NOK:INPUTCURRENCY = NOK

*ENDLOOKUP

*XDIM_MAXMEMBERS COST_CTR=5000

*WHEN CURRENCY

*IS LC

*WHEN COST_CTR.CURRENCY

*IS CAD

*REC(EXPRESSION=%VALUE%,CURRENCY=CAD)

*IS USD

*REC(EXPRESSION=Math.round(%VALUE%/LOOKUP(L_RATE_USD)*100)/100,CURRENCY=CAD)

*IS GBP

*REC(EXPRESSION=Math.round(%VALUE%/LOOKUP(L_RATE_GBP)*100)/100,CURRENCY=CAD)

*IS EUR

*REC(EXPRESSION=Math.round(%VALUE%/LOOKUP(L_RATE_EUR)*100)/100,CURRENCY=CAD)

*IS NOK

*REC(EXPRESSION=Math.round(%VALUE%/LOOKUP(L_RATE_NOK)*100)/100,CURRENCY=CAD)

*ENDWHEN

*ENDWHEN

*COMMIT

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

as you said if we switch back to javascript performance slows down and also you mentioned no replacement for math.round.

Please advise how to overcome this issue

Here are the dimensions

Account_Pay_bank

Cost_CTR=

Costy_Type=CT_NULL

Currency=LC

PART_COST_CTR

Scenario

Sender_Receiver

Time=

Version

Measures=Periodic

thanks

former_member186338
Active Contributor
0 Kudos

Same question - why you are not running standard and efficient CURR_CONVERSION and use WHEN/ENDWHEN with LOOKUP instead????

Please provide dimension types:

Costy_Type

PART_COST_CTR

Scenario

Sender_Receiver

Like: COST_CTR - Entity, VERSION - Category, TIME - Time...