Skip to Content
0

Transaction currency to Reporting Currency in SAP BPC 10

Aug 10, 2017 at 04:14 PM

186

avatar image
Former Member

Hi Experts,

Please help me with typical Scenario of Converting Transactional (Document Currency) into Reporting Currency USD.

I have seen a blog in this regards and tried this Code but this is actually gving weird values. It's not even picking up right Exvhange Rates I maintained in Rates application for this period.

Actually I'm maintaining INPUTCURRENCY Dimension in the Model where Users key in Budget Numbers in their desired Transactional Currency and when they save their data they want this data to be converted in USD(Reporting Currency)

Even if this Code works for one Single period, I want to make it more generic in terms of the COMPANY, OFFICE, TITLE, ACCOUNT_PLN, EMPLOYEE, TIME.

Highly appreciates any quick help in this regards.

Thanks again

Regards,

Krishna

Sample Code I tried is pasted below.

*LOOKUP Rates

*DIM RATEGBPCUR: TIME = "2017.07"

*DIM RATEGBPCUR:CATEGORY = "Budget"

*DIM RATEGBPCUR:R_ACCOUNT = "BDG"

*DIM RATEGBPCUR:R_ENTITY = "Global"

*DIM RATEGBPCUR:INPUTCURRENCY = "CAD"

*DIM RATEGBPCUR:MEASURES ="PERIODIC"

*ENDLOOKUP *FOR COMPANY =US11

*WHEN ACCOUNT_PLN *IS "STAND_RATE_TK"

*REC(EXPRESSION = %VALUE%/LOOKUP(RATEGBPCUR), INPUTCURRENCY= USD)

*ENDWHEN

*NEXT

*COMMIT

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Vadim Kalinin Aug 10, 2017 at 07:00 PM
0

Why do you fix period in lookup? Just remove this line and the period will be selected from current value saved. Are you talking about default.lgf?

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 10, 2017 at 07:14 PM
0

Hi Vadim,

I'm testing this logic first in UJKT T-Code to see if this works there. Do you want me to comment this line?

*DIM RATEGBPCUR: TIME = "2017.07"

Meanwhile I checked other posts relating this topic. Few suggesting to add IC(INVOICE CURRENCY) OR TC (TRANSACTION CURRENCY) as one more member in RPTCURRENCY dimension but not sure how that helps.

As still I need to give my Users to pick any Document Currency they want to Budget upon for a given COMPANY, OFFICE, TITLE, EMPLOYEE, ACCOUNT_PLN, and TIME.

I want to avoid any BADI and want to accomplish this by Script Logic itself.

Thanks for helping me out.

Regards,

Krishna

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Sorry, but you have to clearly explain the user input!

0
Former Member

Hi Vadim,

Thanks for the response. Please find the attached Sample Input Template I'm using to test Transaction Currency to Reporting Currency Conversion Scenario using the following Script.

I have removed INPUTCURRENCY from the Planning cube and added RPTCURRENCY by adding few Currencies like GBP, CAD , EUR. For arugument sake I have saved GBP to USD ratio as 0.5

trn-currncy-conv-gbp.png

But the Code below is more like a hard-coded in particular for RPTCURRECNY and COMPANY Dimensions. I want to make this applicable for any COMPANY CODE and any RPTCURRENCY. I'm seriously concerned with the performance of the code as even 2,3 records change also taking more time.

I highly appreciates your valuable inputs.

Thanks again.

Regards,

Krishna

Script Logic Used:-

*LOOKUP Rates

*DIM RATEGBPCUR: TIME = "2017.07"

*DIM RATEGBPCUR:CATEGORY = "Budget"

*DIM RATEGBPCUR:R_ACCOUNT = "BDG"

*DIM RATEGBPCUR:R_ENTITY = "Global"

*DIM RATEGBPCUR:INPUTCURRENCY = "GBP"

*DIM RATEGBPCUR:MEASURES ="PERIODIC"

*ENDLOOKUP

*FOR COMPANY =GB11

*WHEN ACCOUNT_PLN

*IS "STAND_RATE_TK"

*WHEN RPTCURRENCY

*IS GBP

*REC(EXPRESSION = %VALUE%/LOOKUP(RATEGBPCUR), RPTCURRENCY= USD)

*ENDWHEN

*ENDWHEN

*NEXT

*COMMIT

0
avatar image
Former Member Aug 14, 2017 at 09:50 PM
0

Hi Vadim,

Thanks for the response. Please find the attached Sample Input Template I'm using to test Transaction Currency to Reporting Currency Conversion Scenario using the following Script.

I have removed INPUTCURRENCY from the Planning cube and added RPTCURRENCY by adding few Currencies like GBP, CAD , EUR. For arugument sake I have saved GBP to USD ratio as 0.5

trn-currncy-conv-gbp.png

But the Code below is more like a hard-coded in particular for RPTCURRECNY and COMPANY Dimensions. I want to make this applicable for any COMPANY CODE and any RPTCURRENCY. I'm seriously concerned with the performance of the code as even 2,3 records change also taking more time.

I highly appreciates your valuable inputs.

Thanks again.

Regards,

Krishna

Script Logic Used:-

*LOOKUP Rates

*DIM RATEGBPCUR: TIME = "2017.07"

*DIM RATEGBPCUR:CATEGORY = "Budget"

*DIM RATEGBPCUR:R_ACCOUNT = "BDG"

*DIM RATEGBPCUR:R_ENTITY = "Global"

*DIM RATEGBPCUR:INPUTCURRENCY = "GBP"

*DIM RATEGBPCUR:MEASURES ="PERIODIC"

*ENDLOOKUP

*FOR COMPANY =GB11

*WHEN ACCOUNT_PLN

*IS "STAND_RATE_TK"

*WHEN RPTCURRENCY

*IS GBP

*REC(EXPRESSION = %VALUE%/LOOKUP(RATEGBPCUR), RPTCURRENCY= USD)

*ENDWHEN

*ENDWHEN

*NEXT

*COMMIT

trn-currncy-conv-gbp.png (13.3 kB)
Show 5 Share
10 |10000 characters needed characters left characters exceeded

Sorry, but I do not understand what are you doing... something strange...

Please read my answer once again.

0
Former Member

Hi Vadim,

This Code, I'm testing in UJKT T-Code hence hard-coded TIME. Let me rephrase my context in a better way.

I'm trying to do Currency Translation from TRANSACTION CURRENCY to REPORTING CURRENCY. As I read BPC Regular Currency Conversion Logic works only for translations between LOCAL CURRENCY and REPORTING CURRENCY.

But here our Users want to enter BUDGETED BILL RATES in different Transaction Currencies and would like them to convert to REPORTING CURRENCY USD.

I tried the Code given in this blog http://scn.sap.com/docs/DOC-26482

It kind of worked but it's almost like I hard coded it for one COMPANY CODE GB11 na dfor one Currency GBP. I want this to work for all Currencies and Companies. Also I'm concerned with PERFORMANCE issues in doing this Transaction Currency Conversion as oppose to LC Conversion regular script.

Also I read some where we can write BADI to handle this scenario but I want to avoid BADI if possible.

Once again, attached Sample Input Template where I enter some values in GBP and executed below Script Logic and was able to see those Values populated in USD (RC).

Hope this helps.

Script Logic Used:-

*LOOKUP Rates

*DIM RATEGBPCUR: TIME = "2017.07"

*DIM RATEGBPCUR:CATEGORY = "Budget"

*DIM RATEGBPCUR:R_ACCOUNT = "BDG"

*DIM RATEGBPCUR:R_ENTITY = "Global"

*DIM RATEGBPCUR:INPUTCURRENCY = "GBP"

*DIM RATEGBPCUR:MEASURES ="PERIODIC"

*ENDLOOKUP

*FOR COMPANY =GB11

*WHEN ACCOUNT_PLN

*IS "STAND_RATE_TK"

*WHEN RPTCURRENCY

*IS GBP

*REC(EXPRESSION = %VALUE%/LOOKUP(RATEGBPCUR), RPTCURRENCY= USD)

*ENDWHEN

*ENDWHEN

*NEXT

*COMMIT

trn-currncy-conv-gbp.png (13.3 kB)

Thanks and regards,

Krishna

0

Please read again my first answer "Why do you fix period in lookup?"

If you don't specify member in LOOKUP then current member of WHEN/ENDWHEN loop will be used!

Reposting the same text will not help!

0
Former Member

Hi Vadim,

Thanks for responding. As I said this Code I'm testing in UJKT to see if this code works atleast for one Period in which I maintained Exchange rates as a Test Case.

Shall I remove this Statement?

*DIM RATEGBPCUR: TIME = "2017.07"

Highly appreciates all your valuable inputs.

Thanks again,

Krishna

0

Yes, you have to remove this line!

Also the line

*DIM RATEGBPCUR:CATEGORY = "Budget"

if you are working with Budget...

0
avatar image
Former Member Aug 15, 2017 at 09:58 PM
0

Hi Vadim,

This Code, I'm testing in UJKT T-Code hence hard-coded TIME. Let me rephrase my context in a better way.

I'm trying to do Currency Translation from TRANSACTION CURRENCY to REPORTING CURRENCY. As I read BPC Regular Currency Conversion Logic works only for translations between LOCAL CURRENCY and REPORTING CURRENCY.

But here our Users want to enter BUDGETED BILL RATES in different Transaction Currencies and would like them to convert to REPORTING CURRENCY USD.

I tried the Code given in this blog http://scn.sap.com/docs/DOC-26482

It kind of worked but it's almost like I hard coded it for one COMPANY CODE GB11 and for one Currency GBP. I want this to work for all Currencies and Companies. Also I'm concerned with PERFORMANCE issues in doing this Transaction Currency Conversion as oppose to LC Conversion regular script.

Also I read some where we can write BADI to handle this scenario but I want to avoid BADI if possible.

Once again, attached Sample Input Template where I enter some values in GBP and executed below Script Logic and was able to see those Values populated in USD (RC).

Hope this helps.

Script Logic Used:-

*LOOKUP Rates

*DIM RATEGBPCUR: TIME = "2017.07"

*DIM RATEGBPCUR:CATEGORY = "Budget"

*DIM RATEGBPCUR:R_ACCOUNT = "BDG"

*DIM RATEGBPCUR:R_ENTITY = "Global"

*DIM RATEGBPCUR:INPUTCURRENCY = "GBP"

*DIM RATEGBPCUR:MEASURES ="PERIODIC"

*ENDLOOKUP

*FOR COMPANY =GB11

*WHEN ACCOUNT_PLN

*IS "STAND_RATE_TK"

*WHEN RPTCURRENCY

*IS GBP

*REC(EXPRESSION = %VALUE%/LOOKUP(RATEGBPCUR), RPTCURRENCY= USD)

*ENDWHEN

*ENDWHEN

*NEXT

*COMMIT

trn-currncy-conv-gbp.png (13.3 kB)

Thanks and regards,

Krishna

Share
10 |10000 characters needed characters left characters exceeded