Code for currency translation

All records from ECC will be translated using the daily exchange rate to be aligned with ECC. Created a  new key figure with the local currency and added to cube, no rules set for this keyfigure. Need to get the daily exchange rate for this field using settlement date. Source currency used as doc currency and target currency as local currency.  I think adding code in end routine would be good. Pls suggest and provide the code .

Hi,
Code for rouine :
LOOP AT RESULT_PACKAGE assigning <RESULT_FIELDS>.
  CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
    EXPORTING
      DATE             = SY-DATUM
      FOREIGN_CURRENCY = <RESULT_FIELDS>-S_CURR
      LOCAL_CURRENCY   =  <RESULT_FIELDS>-T_CURR
      FOREIGN_AMOUNT   =  <RESULT_FIELDS>-S_AMT
      TYPE_OF_RATE     =     'XRATE'
      LOCAL_AMOUNT      = RESULT_FIELDS>-T_AMT
    EXCEPTIONS
      NO_RATE_FOUND    = 4
      NO_FACTORS_FOUND = 8.
ENDLOOP.
Just replace
<RESULT_FIELDS>-S_CURR
<RESULT_FIELDS>-T_CURR
<RESULT_FIELDS>-S_AMT
<RESULT_FIELDS>-T_AMT
by fieldnames provided in youtrmodel,
XRATE by symbol representing type of daily exchange rate
and make sure, as already mentioned above , that this type is
updated before running DTP.
Hope this helps
Joe

Similar Messages

  • Error while running FX restatement process for currency translation

    Hi Experts,
    I am facing errors while trying to run FX_Restatement process to do currency translation.
    I am having the error: RUN_LOGIC:Member u201CXXXu201D not exist => where XXX is any currency I am trying to convert.
    Below is the script logic (FXTRANS.LGF)used.
    *RUN_PROGRAM CURR_CONVERSION
          CATEGORY     = %FX_CATEGORY_SET% 
          CURRENCY     = %FX_INPCURRENCY_SET% 
          TID_RA = %FX_TIME_SET%
          OTHER = [ENTITY=%FX_ENTITY_SET%]     
          RATEENTITY = GLOBAL
          //For More than one other scope parameters: OTHER = [ENTITY=%FX_ENTITY_SET%;INTCO=%INTCO_SET%...]
    *ENDRUN_PROGRAM
    I am working on BPC 7.5 NW version.
    Can you help us with this?

    For the currency you are converting to: XXX
    INPUTCURRENCY dimension must have XXX as a member with "REPORTING" property set to "Y"
    and
    RPTCURRENCY dimension must have XXX as a member with "REPORTING" property set to "Y" and "CURRENCY_TYPE" property set to "R"
    It needs to be in both dimensions with the right properties.  INPUTCURRENCY is the currency dimension in the RATE cube, RPTCURRENCY is the currency dimension in the financial or consolidations cube.

  • Report Painter - new Basic Key Figure for Currency Translation

    Hi,
    I need a report painter report which allows to translate the company code currency HSL in GLPCT into several target currencies. Theoretically I need to translate each month with an own translation rate and possible different translation keys.
    In table T804B I tried to create a new basic key figure for GLPCT in order to translate the HSL amount with a second TCURR rate. I copied the original basic key figure GLPCT - CC_HSL. I selected structure GLBDZ and fields CCH++ as data source and assigned new variables for the TCURR selection.
    The report painter report is setup with three columns : one in HSL, one with CC_HSL and one with the new key figure. In the selection screen of the report painter report I can enter two rates. But after execution the translation of the new basic key figures is done with the same rate as the CC_HSL column is using.
    Did anybody encounter an equal problem?
    Many thanks and regards
    Markus

    have you created a new calculation routine in form pool SAPFGRWG equivalent to E06_CALC_CURR_CONV_HSL? doesnt this explicitly get the company code currencies

  • F4 help not showing for currency translation types

    Friends,
    I have a scenario where I need to convert currencies in my query based of different tranlastion types. I maintained a variable in RRC1 and it's working fine when I execute the query. It asks for the variable - shows different available options under F4 help and calculates the results as expected.
    Now the problem I am facing ....
    When I have exceuted the query and want to select a different translation type using context menu on any amount field, it gives me only one option "Average rate for the current date". I am expecting all the available translation types to choose from, here as well.
    Can someone help me with that?
    AK

    Anybody out there ???
    AK

  • Time reference for Currency translation keys

    Hello!
    I need to recalculate transactions from Company Code currency to a new target currency. By using RRC1 I created a translation key, but it does not work as I hoped.
    The whole year should be calculated based on the exchange rate in the period selected.
    By using "Variable Time Ref." combined with key "3 End of period", it calculates each period with its exchange rate. My hope was that it could calculate all periods back with the exchange rate of this period.
    Did not find any places to configure this either. Anyone with a good suggestion?
    Best regards
    Preben

    good news: it works!
    i forgot to update tcurf
    gunter

  • Error While Sending Data for Currency Translation

    Hello Experts,
    I am trying to send data via template. Data is getting saved but I am getting following error displayed.
    1.) When I try to enter data for a particular month then, error as FX-200.
    2.) When I try to enter data accross months of more than year then , FX-045 and FX-310 error.
    I had look on various SAP Notes available for the errors.
    As per them, I ran Full optimization, I checked rates are maintained for previous year too, I checked for LC Currency Type Property is maintained as L.
    But nothing Worked.
    Currently only the 3 members are maintained in Rate Dimension, so exceeding the size limit cannot be an issue.
    Kindly Suggest, what could be another possible reason for the errors.
    Regards,
    Apoorva Garg

    Hello,
    1.)  I am getting issues  for example for 2010.Mar, 2010.Dec, 2013.Dec, 2012.Dec
    2.)  Business Rules Maintained
    3.) Business Rule called via Default Script Logic
    // Default base level logic - applies to all base members in all dimensions
    *INCLUDE system_constants.lgl
    //Process_Each_Member = TIME
    *RUN_STORED_PROCEDURE=SPRUNCONVERSION('%APP%','KPI_Working_Act_FX','','GLOBAL','%SCOPETABLE%','%LOGTABLE%')
    *COMMIT
    //*RUN_STORED_PROCEDURE=SPRUNCONVERSION('%APP%','KPI_Working_AOP_FX','','GLOBAL','%SCOPETABLE%','%LOGTABLE%')
    //*COMMIT
    Regards,
    Apoorva

  • Foreign Currency Translation at Year End - How SAP Works for P&L items?

    Hi All,
    I wanted to know "How SAP works on Foreign Currency Translation at year end" from Local Currency to Group Currency for P&L Items.
    I know how SAP works for Balance sheet items but am really confused with when the translation was done for P&L Items.
    Configuration:
    We are on ECC 6.0 . Local Currency is CAD and we have 2nd Local Currency as "USD - Group Curr".
    We have set up Valuation Method - 4
    We have set up Valuation Area - 40
    For Account Determination for Currency Translation, GL accounts (Loss, Gain and B/S Adj)  were setup for the combination of Chart of Accounts, Val Area and Fin Stmt Ver.
    Sales Account Balance
    CAD (LC)        USD (2nd LC)       
    1000                   920                        
    Using tcode "FAGL_FC_TRANS", we translated our P&L items.
    Local Currency is CAD and Group Currency is USD.
    CAD 1000 and USD 920 are cumulative balances over a period of time.
    Since at the end of year CAD became stronger, exchange rate is 1.11 as an example
    Sales Account Balance
    CAD (LC)        USD (2nd LC)        Translated Value in USD
    1000                   920                        900
    System passed the following entry in USD:
    Debit Balance Sheet Adj A/c 20
    Credit Translation Gain / Loss A/c 20
    Here are the questions:
    1. How does over all translation work? - Should we get any Gain / Loss and have an effect on P&L when all accounts (P&L, B/S) are translated?
    2. How can there be a gain entry when USD value has really fallen from 920 to 900 in the current case.
    Thanks for your time.
    Vijay

    Hi,
    I had this issue too.  The entry was just opposite to what it should be.  I just flipped the accounts in table FAGL_T030TR.
    Example: 410000 is sales account which normally should have a credit balance.  Here are some entries that were posted to sales in 03/2009 and I am running FAGL_FC_TRANS at the end of the month.
    March 1, 2009 Cr. Sales CAD 1000- USD 900-
    March 2, 2009 Cr. Sales CAD  500- USD 480-
    During FC translation transaction, system takes the balance in the account for the period (if you execute it with 'Val. period balance only' checkbox checked) and not the cumulative balance.  SAP recommends translating period balance only (and not cumulative balance) for P&L accounts.  It sees a balance in LC (this again depends on the config. you have in OB22 - whether the indicator is 1 (TC as source currency) or 2 (LC as source currency for translation)) which is 1500, converts that at month end rate.  After conversion, lets say the balance is 1400-.
    In this case, we expect a credit entry on sales account
    March 31, 2009 Cr. Sales CAD 0  USD 20-
    But system was just posting the opposite.  I then flipped the accounts in FC translation configuration.  I know it is misleading.  In that configuration, system says balance sheet adjustment account, but what you should actually give there is your gain/loss account.  Our gain/loss a/c. falls in the same GL account range as the main account.  For example, for 410000, it is 410999 and for 510000, it is 510999.  We report accounts 410000 to 410999 in the same node in the FSV.
    Pl. feel free to ask further questions about this.  Pl. test in your system and correct me if my above reply is wrong.
    Cheers!

  • Skip currency translation for certain data source members

    I have got percentage data againist some data source members which I do want to translate when the currency translation is executed. Is there a way to achieve this? The business rules for currency translations only have account and flow dimensions and does not include data source dimension so I am not able to filter out datasource dimension members in currency translation business rules.
    Any suggestion how it may be possible to filter data source member during currency translation execution?
    Thanks in advance.

    Hi there,
    You can use the *XDIM_MEMBERSET with the DATASRC dimension to limit what data gets translated (7.0 M SP9)
    Please see [Note 1522149|https://service.sap.com/sap/support/notes/1522149] - XDIM_MEMBERSET can be used with DataSrc in Business Rule
    Also, the IS_CONVERTED property in the DataSrc dimension can also be used:
    The IS_CONVERTED property
    The members of the DATASRC dimension will be processed according to the value of the property IS_CONVERTED, as per the following rules:
    IS_CONVERTED = N: These members are ignored in the conversion
    IS_CONVERTED = Y: These members are converted from LC into the desired currency
    IS_CONVERTED = G (group): These members are copied from the reporting currency of the GROUP being translated into the currency member corresponding to the given group.
    This obviously only applies if the translation is run for a GROUP and not for a reporting currency.
    All members of the DATASRC dimension having the property IS_CONVERTED not set to u2018Yu2019 will be skipped.
    Thanks,
    John

  • Currency translation from EUR to USD

    Dear all,
    Our local currency is TWD and we need to convert document currency in sales order from EUR to the third currency (e.g. USD) when executing BW query in BEx Analyzer. Currently we only have exchange rates for all currencies to TWD in exchange rate table. Except for defining exchange rate of EUR to USD in exchange rate table, is it possible to convert EUR to USD (e.g. convert EUR to TWD first and then convert TWD to USD)?

    Hi,
    This info may be of help for you.
    Check these tables Exchange rates are maintained here.
    Table TCURR - Exchange rates
    Table TCURF
    Table TCURV - Exchange rate types for currency translation
    Table TCUR*
    Table TCURC - Currency Codes
    The update of exchange rates is updating tables TCURR and TCURV. If you run at the same place the transfer of global settings, the tables TCURF, TCURS, TCURT, TCURV, TCURW, TCURX, TCURC and TCURN are updated.
    For details check the programs RSIMPCUST (global settings) vs. RSIMPCURR (exchange rates).
    You can maintain exchange rate factors in TCURF table via RSA1>source system>context menu (transfer global settings check only currencies)/transfer exchange rates, this updates TCURF table but also updates all currency related tables. You need to check what all tables you need to update. Also you can look into standard program RSIMPCUST to know what all currency tables will be updated.
    If you want to maintain them directly in BW then go to SPRO > Genral settings and Currencies (SPRO -> Global Settings -> Currencies).
    OB08 maintains the enties for currency conversion, here you can check whether the exchange rate is maintained to convert the currency from one curr to other.
    Thanks,
    JituK

  • Currency Translation Using 'Time Reference'

    Hey Experts,
    Quick question.
    Has anybody had experience performing the planning function 'Currency Translation' <b>BUT</b> using the 'Time Reference' field.
    My goal is to have it translate the currency based on Fiscal year/period, using the fiscal 'year/period END' to determine the translation date.
    However in the paremeter group for currency translation, when I click on the 'Time reference' Drop-down button to select, it's blank, and give me no choices to pick anything. Have I missed something here? Are there any other prior steps I've ignored?
    I already have the fiscal year/period characteristic defined on my level.. and I've defined my 'Targ.Curr' as USD.
    I can't find much documantation except for the basic help button, but that doesn't really say much.
    Any advice..?
    Thank All.

    Hi,
    If I understand you correctly, am I then to assume using the Fiscal year/Period '0FISCPER' will not work. The F1 help say it should.
    And are you saying if I use Fiscal year '0FISCYEAR' and/or Posting Period '0FISCPER3' instead, it should work by giving me the option of choosing the start or end of these two fields when I click on the drop-down of the Time Reference??
    The way I have this defined is as follows.
    At the level I have both:
    Fiscal year/Period '0FISCPER' -> 001/2006 to 012/2007.
    Fiscal year '0FISCYEAR' -> 2006 to 2007.
    In my Paramter Group I have the following definition:
    Target Key Figure:  Value in Object currency
    Source Key Figure:  Value in CO Currency
    Exch.Rate: 001P
    Char.Target.Crcy: Currency
    Curr,Date:  Is currenctly Flagged, but will remove it once I have the Time Reference field working.
    At the Planning area, I have a characteristic relationship defined as a derivation using 'Type' reference data, whereby the Fiscal year (0FISCYEAR) is referenced from the Fiscal year/Period (0FISCPER), and the Posting period (0FISCPER3) also references the Fiscal year/Period (0FISCPER) that are currently stored in my transactional cube.
    Based on the above, I still don't get anything to choose from when I click on the drop-down for the 'Time Reference' field in the currency translation.
    If you could perhaps do some screen dumps of the level you defined, characteristic relationship, as well as how u defined the parameter group, that may help.
    You can attach email it to  '[email protected]'.
    Sorry for the confusion, but I think I'm missing something obvious and simple here..!!
    Thanks
    Message was edited by: Ehab Mansour

  • Currency Translation at the Web Template level (standard functionality)

    Hi Experts ,
    We are currently working in BI 7.0 env. with source system ECC 5.0.
    We are working for a task where we need to make the BEx  queries enabled for currency translation .
    The requirement is :-
    The user should be enable to give/opt/choose for the follwoing options:-
    Currency type (target currency in which the translation is aimed)
    Exchange Rate ( Standard(M) or other(P) or something else) and
    Key date: The translation will be performed taking the exchange rate on that particular date.
    We do have 2 option to perform the task...
    1:- Either we do it thru currency translation type definition(RSCUR) and then attaching this currency translation for every amount key figure values at each query level. OR
    2:- If we can go and find something at the Web Template level and add/modify the template in such a way so that it gives us the functionality to translate a source currency into a desired one with desired exchange rate type (currently either M or P) and for a specific date.
    At this point of time when we do have numerous sub-areas holding hundreds of queries, we want something which should be available as the modification/addition to standard functionality at the web template level and not at the query level as changing each and every one of them and testing would be a cumbersome process and would be costly and risky at the same time. So we are just wondering if we can find something with option no. 2 and add/modify something in the standard functionality.
    Please ask for any more information required.
    Thanks very much.
    regds.

    Hi Amit,
    You would still need to define the Currency Translation using RSCUR where you would specify
    -the exchange rate type (either fixed or variable)
    -the target currency (either fixed or variable)
    -the reference date
    You don't need to modify any of your queries. You can instead use 'Translate Currency'/[SET_CURRENCY_TRANSLATION] command in WAD & specify the Currency Translation as defined in RSCUR. If you want the target currency & exchange rate type to be driven by user input, you can define these as variables in RSCUR & invoke the variable screen using 'OPEN_VARIABLE_DIALOG' in WAD for user input just before calling 'SET_CURRENCY_TRANSLATION' command.
    --Priya

  • Currency translation on future dates in SAP BW-BEX

    Hello All We have a requirement where in user needs to do a currency translation at run time for data in future periods. For example : Savings data on a purchase order .Total savings for PO is $100,000.00 in year/month 2014/008 . We have a from and to date based on which the savings is equally distributed for each month. From 008/2014 to 008/2015. So each month savings in this case is $8333.33. This data is stored in cubes.  Currency translation is based on data in TCURR and TCURX tables . We do not have future currency rates in these tables. Table is up to date only as of today . Therefore the question arises WHAT RATE WILL BEX USE TO CALCULATE DATA IN FUTURE PERIODS? (It is doing the conversion from USD to CAD - but there is no idea what rate it is using? The currency translation variable is based on 0calmonth. Please help me understand what are the default settings for currency translations in this case ? Thank your your help. Sainath Kumar

    Hello Yasemin Thank you for your answer, we too think that could be the case. But is there any documentation confirming the same. Also in this case the future values will keep changing based on the availability of the data in TCURR table. Thus the report values will not be constant.Technically it makes no sense to convert rate today for a value in future. I am looking for a concrete answer from SAP saying that this is what the Bex query will do in case the future rates are not present. This will give the business a base to work with .

  • S_ALR_87012168   currency translation type

    In this report  S_ALR_87012168 - Due Date Analysis for Open Items you can select a translation key  "currency translation type"
    How you know wat is what ? is there a table / transaction where you can see this?

    Hi,
    In this report S_ALR_87012168 - Due Date Analysis for Open Items you can select a Currency & translation key "currency translation type". That means in which currency user want to see the open items of Receivables. You have to mentioned the Translation type also, because the selling rate/buying rate may be different for different currencies. Standard SAP gives a lot of options to select for currency translation type.
    Hope i clarified your doubt.
    Cheers,
    Aparna

  • Currency Translation question

    When the currency translation is executed..it overwrite the reporting currency by new amount.
    Q1>>How to find out additive impact by each each account for currency translation changes.?
    For example I have 1000 accounts, which for which currency translation is executed. Can I know the currency translation changes per each account seperately for reporting purpose?
    Client wants to do the complete audit trail of amount posted by currency translation. is it possible..
    How it is possible. Is it possible thru movement type to track the currency translation by each account?
    Q2>>DATASRC dimension has a property IS_CONSOLIDATED? has some one used it before? What it is used for?
    Please explain a bit..because the documentation from SAP is very brief..
    Apprecaite inputs...

    Hi Doodwala,
    I'm not sure I'm following your question 1. Do you mean that you want to track the difference between the new and old reporting currency amount when the LC amount changes? Or do you want to track the change in the translated amount if the rate changes (or more likely using a different rate)?
    If your audit requirement is to track every record change then it is going to be very arduous to do this in a custom way. I'd recommend looking into the delivered audit trail functionality to see if that meets your requriements. There is a bit of information about this functionality here: [http://help.sap.com/saphelp_bpc70sp02/helpdata/en/e1/8999faf82c4a61acd65683a8cedafe/frameset.htm]
    Question 2 was asked and answered in this thread: [IS_CONSOLIDATED in DATASRC;
    Ethan

  • Currency translation type NOT appearing in BEX

    Hi All,
    I'm having trouble displaying the currency translation type in BEX after running the query.  When I use the context menu for 'Currency Translation', I do not see the desired curr tran types in the drop down list.  They are available in the Query Designer but not after I've executed the query.
    I also noticed that the ones that ARE available all have 'Fixed time ref' or 'Query key date' in the Time ref.  The ones I would like to view have a 'Variable Time Ref' but not sure why this is causing a problem.  Any help is appreciated.
    Thanks
    Senthil

    Hi Senthil,
    I believe this is happening because when you have run the report and got data, it means that this data refers to a particular time. If BEx allows you a variable time reference for the currency conversion, after the report has been run taking into account a different time...I am not sure if it would make sense...

Maybe you are looking for