cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic to copy LC to RC

Former Member
0 Kudos

Hello fellow BPC gurus,

I am in the process of modifying a Currency translation Script logic that currently translates Actuals TC to 5 different Reporting currencies. A bit of background - we import TC  and LC directly from FICO into BPC  at summary level after TC has been translated to LC in FICO using several translation rules. Problem is for certain company codes, some of these FICO translation rules and FX rates cannot be replicated into BPC by translating from TC to Reporting currencies Translation Script logics, as the FX rules used in FICO are at transactional level and very complex.

We have therefore decided to do a direct copy of LC (imported from  into BPC) into RC in BPC for those specific company codes impacted. Other company codes are translating okay from TC to RC using fixed AVG /END FX rates

Anyone  with suggestions on a Script Logic code we can include in our Trans logic to achieve this LC to RC copy in BPC?

Thank you!

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member228522
Active Participant
0 Kudos

Hi Deepa,

You can achieve this with script logic as mentioned in below sample code:

*SELECT(%FX_RATES%, "[ID]", "R_ACCOUNT", "[GROUP] = 'FX RATE'")

*XDIM_MEMBERSET COMPANY = %COMPANY_SET%

*LOOKUP Rates

*DIM R_ENTITY="Global"

*DIM R_ACCOUNT=EXPACCOUNT.RATETYPE

*DIM SOURCECURR:INPUTCURRENCY=COMPANY.CURRENCY

//*FOR %CURR%=%REPORTING_CURRENCIES%

*DIM C_CURR:INPUTCURRENCY="USD"

//*NEXT

*ENDLOOKUP

//_____________________________________________________________

// define the translation rule

//____________________________________________________________________

*WHEN EXPACCOUNT

*IS *

*WHEN RPTCURRENCY

*IS "LC"

*WHEN EXPACCOUNT.RATETYPE

*IS "NOTRANS"

// skip

*IS AVG,END,ENDFLOW

// translate

//*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(FACTOR=LOOKUP(SOURCECURR)/LOOKUP(C_CURR),RPTCURRENCY="USD")

//*NEXT

*ELSE

// take as is

*FOR %CURR%=%REPORTING_CURRENCIES%

*REC(RPTCURRENCY="%CURR%")

*NEXT

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

*DESTINATION_APP = EXPENSEDETAIL

*WHEN EXPACCOUNT

*IS *

*WHEN EXPACCOUNT.RATETYPE

*IS "NOTRANS"

*IS AVG,END,ENDFLOW

*WHEN RPTCURRENCY

*IS "USD"

*REC(FACTOR = 1/LOOKUP(SOURCECURR),RPTCURRENCY = "LC")

//*ELSE

//*REC(FACTOR = LOOKUP(SOURCECURR),RPTCURRENCY = "USD")

*ENDWHEN

*ENDWHEN

*ENDWHEN

*COMMIT

Best Regards,

Deepak

Former Member
0 Kudos

Hi Deepak,

I see there is a lot of focus on ExpenseAccounts in your proposed logic. We arent focused on running this for Expense accounts only.

However we will need some restrictions on  certain Company Codes.

Thanks.

former_member228522
Active Participant
0 Kudos

Hi Deepa,

This is only sample script logic code. You need to change it according to your requirement.

Best Regards,

Deepak