Skip to Content
avatar image
Former Member

Transaction currency to Reporting Currency in SAP BPC 10

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Aug 10, 2017 at 07:00 PM

    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?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 10, 2017 at 07:14 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • 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

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

    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)
    Add comment
    10|10000 characters needed characters exceeded

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

    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

    Add comment
    10|10000 characters needed characters exceeded