on 2017 Aug 10 5:14 PM
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
Request clarification before answering.
Hi Experts,
I have a similar requirement where the business wants to Input in USD ( which is reporting currency) and have it converted in LC for specific audit trail and companies and logic should be placed on default.lgf.
Please do let me know how we can achieve using default logic.
Environment : BPC 11.1 NW
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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)You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.