Currency Conversion in Expert Routine

Hi
We have written a expert routine for calculating some amount fields. Now these amount fields get local currency from the source. We need to change it to USD using a standard conversion type. This conversion type already exists. Now how can this be done in expert routine?
Regards
Merlin

Hi Merlin,
You could use Currency Translation with in BEx Query (It is available on conversion tab of the key figure properties) and use conversion type of USD on the key figure for Amout/Value
regards
Kulmohan

Similar Messages

  • End routine for Currency conversion

    Hi,
    I have a requirement in which i have to convert sales and cost into three types of currency as GBP, INR and EUR in cube. i made 3 different fields for sales as well as for cost. But i am unable to write end routine for it.
    Can anyone please help me that how can i solve this problem.
    Roma

    Hi,
    In transformation itself you can do your currency conversion.
    http://help.sap.com/saphelp_nw70/helpdata/en/de/6372426f0f9041e10000000a1550b0/content.htm
    If you want to write a routine in to do conversion, you have to go for start routine instead of end routine.
    Thanks
    BVR

  • Need Urgent Help on Currency Conversion Routine

    I am trying to load data from Cube2 to cube1. If cube2 has static currency as EUro then i have to convert the amount into GBP. I managed to convert the amount, but it Local currency is still showing as Euro where it should have been GBP. Any ideas? Please let me know if i need to put fullstop(.) or , in the code.
    The code i am using is as follows:
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
    EXPORTING
    CLIENT = SY-MANDT
    DATE = COMM_STRUCTURE-pstng_date
    FOREIGN_AMOUNT = COMM_STRUCTURE-inv_rc_val
    FOREIGN_CURRENCY = COMM_STRUCTURE-loc_currcy
    LOCAL_CURRENCY = 'GBP'
    RATE = 0
    TYPE_OF_RATE = 'M'
    READ_TCURR = 'X'
    IMPORTING
    local_amount = RESULT
    EXCEPTIONS
    NO_RATE_FOUND = 1
    OVERFLOW = 2
    NO_FACTORS_FOUND = 3
    NO_SPREAD_FOUND = 4
    DERIVED_2_TIMES = 5
    OTHERS = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endif.

    Hi Swapna,
    Just mark 'Unit Conversion in the Routine' in update rules.
    system provides two new lines of coding
    result value of the unit
      UNIT = .
    Just add desired currency ( e.g. UNIT = 'GBP' . )
    Hope this helps
    Joe

  • Currency Conversion Issue in Infocube Purchasing Data (0PUR_C01) Routine

    Hi Gurus,
         We are using SAP BI 7.0, We are having reports on Purchasing Data (0PUR_C01) under that 2 updates rules are there.
    For the field Effective purchase order value (0ORDER_VAL), there is one standard routine only from the Datasource 2LIS_02_SCL.
    My problem is that when there is Currency other than Local currency in field Order Currency, we dont get the Purchase Order Value though there is PO Quantity.
    Thanks in advance.
    Regards,
    Rajdeep.

    Hi Rajdeep,
    Please verify that the PSA contains data in the fields mapped to the objects below, as they are all used in the currency conversion routine:
    ORDER_VAL
    DOC_DATE
    ORDER_CURR
    LOC_CURRCY
    EXCHG_RATE
    If something is mapped incorrectly or something like that the currency conversion might fail.
    Hope it helps.
    BR
    Stefan

  • Currency conversion via routine in transformation BI 7.0

    Hi,
    for an international data model we want to translate currencies via data load using a routine in the transformations. We are thinking about creating 2 key figures for local currency and group currency. Group currency is always EUR. We found to function modules but we are not sure about the differences and if we can us them at all: CONVERT_TO_LOCAL_CURRENCY and RSW_CURRENCY_TRANSLATION
    Does anyone of you implemented currency conversion in a transformation before using a routine. And does anyone have experience with those function modules and can explain the differences? Thanks a lot in advance! Any help is appreciated!
    Aline

    Hi,
    You can use the readily available functionality to convert the amounts from one currency to other.
    Use transaction RSCUR (maintain currency translation types) to create the currency translation type nad use it directly in the transformations.
    Regards,
    Yogesh

  • Currency Conversion - YTD - for experts

    Hello,
    I have following scenario in BEx.
    YTD BEx variable with "From" and "To" value.
    Example: User enters: 02.2007 - 05.2007 and wants to convert in USD.
    The requirement is that all months (02.2007, 03.2007, 04.2007 and 05.2007)
    are converted with the currency conversion of 05.2007 (in this example).
    In rrc2 I saw as time reference: "Fixed time reference" and "Time Base from variable".
    Where can I create a variable for "Time base from variable"?
    In cube I have 0FISCPER and 0CALMONTH.
    Any idea?

    Create a step 2 OLAP variable in cmod based on Fiscal Period - this then gets the data from the To section of the YTD BEx variable
    Then use this variable in Time Base from Variable

  • Currency Conversion for Exchange rate type "AS02"

    Hi Experts,
    I am gonna post the most challenging problem (regarding currency conversion) I ever faced in my 1 year of BW Carrier.Kindly provide a solution.
    There are three types of currency to be used in the query for Key Figure 0NET_VALUE (so total 3 Key Figures to be created)
       1.Document currency (may be any currency)
       2.Local Currency (must be EURO)
       3.Global Currency (must be USD)
    From Document currency to Local Currency(EURO) we are using Exchange rate Type "M" (in Conversion Type created in Trans RRC1) [There is no problem in this conversion]
    Problem starts now--->
    From Local Currency(EURO) to Global Currency(USD) we have to use Exchange rate type "AS02" (in conversion type to be created in RRC1)
    but there is a Business requirement  that currency rate should be as per the last day of the entered period;and this logic should work for the range of periods also.
    Example :
    we are executing query for the period 006/2006 (posting Period)
    Last day of this period is 06/30/2006,
    Currency rate would be as per 06/30/2006
    And this currency rate should be same throughout the period 006/2006 in query
    The example was for single period,but logic must be incorporated for the range of the periods.

    Hi..
    There is no corresponding source key figure in the InfoSource for the target key figureof the InfoCube.
    a. A source key figure of the same type can be assigned to the target key figure
    (for example, sales revenue instead of sales quantity revenue).
    If the currencies of both of the key figures are the same, no currency
    translation can take place.
    If the currencies are different, a translation can take place either using a
    currency translation type or by simply assigning a currency.
    The following table provides an overview of possible combinations with different
    currencies in the source and target key figures:
    if Source key figure currency  is fixed , Target key figure currency is variable  then Currency translation (CT)  No CT
    if Source key figure currency  is fixed , Target key figure currency is fixed  then Currency translation (CT)   CT
    if Source key figure currency  is variable , Target key figure currency is fixed then Currency translation (CT)   CT
    if Source key figure currency  is variable  , Target key figure currency is variable  then Currency translation (CT)  CT or assignment
    b. If there is no corresponding source key figure of the same type, then you have
    to fill the key figure for the data target from a routine.
    If the target key figure has a fixed currency, no currency translation is
    carried out. This means that if translation is required, you have to execute
    it in the routine.
    If the target key figure has a variable currency, you also have to assign
    a variable source currency to the routine. Using the F4 help you can
    select a currency from the variable currencies in the communication
    structure. You have two options:
    – You can select a variable currency and assign it.
    – You select a currency translation type and a currency into which you
    wish to translate (‘To’ currency).
    The ‘To’ currency is, by default, the target currency if it is included in the
    communication structure.
    Creating a Routine for Currency Translation:
    If you want to translate currencies in the update even though the currency translation is not
    available for one of the above reasons, you can create a routine. Choose Routine, set the
    Unit Calculation in the Routine and choose Create Routine. In the routine editor you get
    the additional return parameter UNIT, the value of which is used to determine the target
    1.  save the query  and it under role
       see to it is in   :  Restricted and calculated key figures --->   properties of k.f
    2. exeute the query
    3. the currency translation --> by target currency  usd  choose  OK
    conversion type :  MEANTODAY Fixed target currency current date (MT)
    4.  Go back to the query definition by chossing chage query ( global definiton)
    5.  in the context menu for % share sales vouume of incoming orders,  choose properties --> formula collision -->  result form this formula choose OK
    Note that -
      your should alos set the currency translation in the  properties for the  two key figures sales voule EUR , choose properties ---> currency  conversion key :  fixed target currency ,  currrent date ( MT) -->  target currency  : American Dollar .  choose   OK
    <b>The translation key is a combination of different parameters that establish how the exchange rate for the translation is executed.
    The parameters that determine the exchange rate are the source and the target currency, the exchange rate type and the time reference for the translation.</b>
    The source currency is determined from the data record or dynamically from the master data of the specified InfoObject (currency attribute)
    The target currency can either be fixed in the translation key or selected at the time of translation.
    You can also use an InfoObject (currency attribute) to determine the target currency.
    The exchange rate type distinguishes exchange rates that are valid in the same time frame next to each other, for example, the bid rate, ask rate or middle rate. The exchange rate types are stored and can be maintained in a central table (TCURV).
    The time reference for the currency translation can be either fixed or variable
    The fixed time reference can either be a fixed key date that is stored in the translation type, or be determined using the system date when executing the currency translation.
    If the time reference is variable, then the point in time for the exchange rate determination comes from the value of a time characteristic (InfoObject). The reference can, for example, be the end or the start of a fiscal year or a calendar year, a period and a month – or even to the exact day. It can also be determined using a customer-specific InfoObject (for example, trading day).
    Currency translation in the BEx
    When selecting a translation key with a fixed target currency     this currency will be added automatically to the query definition
    Also, you can use translation keys selecting their target currency at the time of translation. These can be applied in two different ways:
    Selection of a specific target currency in the query definition (1)
    Entry by variable (2)
    Dynamic translation keys require input from the InfoCube !
    InfoObject value will be read during query execution
    Examples:
    dynamic time reference (p.eg. 0CALDAY)
          time characteristic
    target currency determined by InfoObject (currency attribute)
         characteristic which contains currency in its attribute table
    the corresponding InfoObject has to be part of the InfoCube
    1.Define the currency attribute in the InfoObject maintenance
    The currency attribute has to be a unit InfoObject of type currency
    The unit InfoObject must be an attribute of the characteristic
    The currency attribute should be filled in the master data table of the corresponding InfoObject (manual maintenance or upload via InfoSource)
    2.Enter the InfoObject in the translation key maintenance
    Only InfoObjects with a currency attribute can be used in translation keys (p.eg. 0COMP_CODE)
    At the time of currency translation the value for the source currency / target currency is then derived for every record from the master data table of the specified InfoObject
    All values for a query are translated ad hoc (after having executed the query) using a translation key
    Depending on the translation key a fixed target currency will be used for translation or you will be able to select the target currency
    The ad hoc currency translation offers only restricted functionality (selection of translation key and target currency) compared to the currency translation in the query definition
    Do not forget to create your translation keys before starting your work in the Business Explorer Analyzer
    Example:
    You load the following record to your InfoCube:
    Company Code:                1000
    Amount in Source Currency:      500,-
    Source Currency:                FRF
    Target Currency:               ?
    In the Update rules, you are now using a translation key which derives the target currency from the InfoObject 0COMP_CODE. During the Update Process the target currency will then be read for Company Code 1000 from the master date table of 0COMP_CODE.
    With the currency translation in the Business Explorer, the source currency can currently only be determined from the data record.
    Only translation keys with a fixed exchange rate type can be used in the BEx
    Translation keys with a dynamic time reference (from an InfoObject) can only be used in the query definition. It is not possible to fill the InfoObject by a variable !
    Translation keys getting their target currency from a currency attribute can only be selected in the query definition
    When getting the dynamic reference from an InfoObject (p.eg. 0CALDAY) the currency translation will apply to each record read from the database. That means it will use the date in this record for the currency translation.
    When using a variable you will restrict the output of your query to a certain amount of data. For example, you would translate all invoices of March 11 with the translation date March 11
    This means, the requirement “show me all invoices in my cube in group currency, conversion date: 14.07.2001” could not be solved by a variable input for 0CALDAY
    I hope this would help...
    with regards,
    hari

  • Issue regarding currency conversion

    Hi Experts,
    I'm having issue with currency conversion. Default report output values are displaying in 'EURO' and I had created a toolabar with currency conversion buttons. When this button is selected, values has to be changed into user select currency like INR, USD, AUD. Here im triggering with issues, all the values are converted into 0's. Total value is only converting for first time. From next time. its not converting. I'm using FM's  CONVERT_FOREIGN_TO_FOREIGN_CUR,CONVERT_TO_LOCAL_CURRENCY,READ_EXCHANGE_RATE.
    Please provide ur solutions to solve the issue.  
    Thanks and Regards,
    Bharat

    Hi ,
    You can use this block of code..It is used in our project.
      data : l_rate type ukurs_curr,           "Exchange rate
             l_rate_type type kurst_curr,      "Type of rate
             l_l_fact type i,                  "Local factor
             l_f_fact type i.                  "Foreign factor
    check local currency ,foreign currency local amount are not initial
      check foreign_currency is not initial and
            local_currency is not initial and
            local_amount is not initial.
    Calculate exchange rate
        if local_currency = 'MXN' and foreign_currency = 'USD'.
          l_rate_type = 'MXNT'.
       else.
         l_rate_type = 'M'.
       endif.
    *Call FUNCTION module to get exchange rate
      call function 'READ_EXCHANGE_RATE'
        exporting
          date                    = sy-datum
          foreign_currency        = local_currency
          local_currency          = foreign_currency
          type_of_rate            = l_rate_type
       importing
         exchange_rate           = l_rate
         foreign_factor          = l_f_fact
         local_factor            = l_l_fact
       exceptions
         no_rate_found           = 1
         no_factors_found        = 2
         no_spread_found         = 3
         derived_2_times         = 4
         overflow                = 5
         zero_rate               = 6
         others                  = 7
      if sy-subrc eq 0.
    if l_rate le 0.
      l_rate = l_rate * -1.
    endif.
    Foreign amount
      if l_rate_type = 'MXNT'.
        foreign_amount = local_amount / l_rate .
      else.
        foreign_amount = local_amount * l_rate .
    endif.
      endif.

  • Error during currency conversion and consistency check in a sales order

    Hi Experts,
    I am facing the below error in the sales order. The sales order is having so many items. The below error is coming for few items only. I have checked the currency exchange rates also. All are maintained properly.
    Please advice me how to fix this error or which class,methods are responsible for checking the above details while saving the order.
    Thanks,
    Sri

    Hi Christophe,
    FYI
    Error during currency conversion frm &1 to &2 (date &3, ref. curr. &4)
    Message Class - CRM_CUMULATED_I
    Message No     - 013
    Error during currency conversion for &1 and &2
    Message Class - CRM_CUMULATED_I
    Message No     - 008
    Consistency check: Logical key does not match
    Message Class - CRM_CUMULATED_I
    Message No     - 011
    Thanks,
    Sri

  • Currency conversion issue while creating PO from Shopping cart

    Hello Experts,
    I'm facing an issue in SRM during Limit purchase order creation from Limit shopping cart.
    Scenario:
    Shopping cart was created on 1st of June and Approved on 20th June & Po was created on the same day. But the currency conversion is no ware matching and couldn't able to trace out the same. I have tried several times to replicate the issue it never done in test environments.
    But the PO is creating with refer to Vendor currency. For example if SC was created in USD and vendor order currency in EUR then PO is created in EUR.
    the relevant notes were already updated in the system and it is working fine when the SC is created and approved on the same day.
    Please give me some idea how to fix this issue.
    Is there any way to make SC currency is priority than Vendor Order Currency while creating PO?
    Regards
    Pratap J

    Hello,
    Read information available in KBA 1862453.
    It mentions this issue.
    Regards,
    Ricardo

  • Sorting Currency conversion Variables in Query Selection screen

    Hi Experts,
    I have an issue in sorting variables.
    A Currency translation is used here which has two selection options here, one for "Currency" and one for "Currency conversion date". They just pop in somewhere in the selection screen with out order. I want to put them together either in the middle or at the bottom.
    They are not visible in the Variable sequence tab of query properties.
    I changed the text for each of them (Ex. "XCurrency"), so that it sorts alphabetically, but no difference.
    Had anybody come accross this issue before.
    regards
    G Rai

    Hi,
    This seems strange that the variable does not show in the query properties. One thing I can suggest it to try changing the technical name/desciption of the variable if that changes the order.
    Please update back the thread if that helps.

  • Currency Conversion Issue

    HI experts,
    i have an issue with my currency report,
    where user want see the sales volume data converting from CAD to US $.
    when i checked the query the conversion type is Avg rate M source to CAD and the Target currency is CAD only.
    but when he execute the report he want to see the volume data in USD $.
    and when i execute the report i can see below error.
    Could not find any data to display. This might be due to the current selection of variable or filter values.
    can some please help me out this issue.
    thanks
    Raj

    Hi venu
    thanks for the post,
    there's no selection criteria being used by the user, has web link, once he click on link, he directly checking the report.
    so there's no section screen available.
    and there's no variable created for the  currency conversion type .
    here my requirement is to display currency in USD $ from CAD $.
    target currency maintained as CAD in RSCUR tcode.
    how would i do this,
    and again the same report is being used by CAD user also, so view shouldn't be change for the both users.
    what im thinking is
    is there any possibility to create variable on currency to select the required currency dynamically by user in selection screen
    please let us know possible solutions like without changing the view for CAD users
    please let me know for more info
    regards
    raj

  • Currency Conversion for historical Amount

    Hello Experts,
    Can some one help me to find a solution for my reporting requirement.
    As part of GL reporting, I have a report which shows accumulated balance for given fiscal year/period. If the currency is in USD,I have no issues. When the currency is in non USD(Ex: EUR) I need to convert it into USD at BW side.
    Here is the example:
    User Enters: Fiscal Year/Period : 2007003
    Accumulated Balance for particular GL account might be 300 EUR.
    But actual posting might be happened in 2006012.
    While converting it to USD it should take the 2006012 exchage rate from TCURR and convert it.
    I have created a RRC1 object and used it in Query but it is using 2007003 exchange rate.
    Please help me to solve this problem.
    Thanks,
    Bobby

    Hi,
    make your currency conversion type time dependent that is the the exchange rates should be picked based on the date when the G/L account was posted.
    Go to transaction RRC1 chose your exchange rate type and in the time ref. tab give key date as the posting date it will pick the exchange rate as the date when the doc was posted.
    Hope it clears
    Thanks

  • Currency conversion Error in 0sd_c15

    Hello Experts,
       I am having a problem in the ETl of the cube 0SD_C15 .Its showing Currency conversion error
    0MEANTODAY while loading data.Please help me in this regard
    Prasad

    Hi
    You will find the transfer global settings for the source system where you are extracting the data.
    Select the source sytem, right click,go to transfer gloabal settings, (select the currencies in this)
    Then Reload the data into the cube,
    After, Reloading the data into the cube replicate the master data, and activate the mappings,and load the data.
    I think, this will work....
    Regards
    Sudheer

  • Key figures with currency conversion showing weird values.

    Hi Experts,
    I have a variable screen,
    User can key in Target Currency, and Month.
    Say,
    (Scenario 1) User keys in Target Currency "MYR", and Month "4"
    The report will show
    Jan| Feb| March| April| May| June| ...
    2| 3| 5| 7| 0| 0| 0 ...
    This is correct.
    (Scenario 2) User keys in Target Currency "USD", and Month "4"
    The report will show
    Jan| Feb| March| April| May| June| ...
    2| 3| 5| 7| 3| 5| 7 ...
    This is wrong, should not show figures for month May and onwards.
    (Scenario 3) User keys in Target Currency "SGD", and Month "4"
    The report will show
    Jan| Feb| March| April| May| June| ...
    1| 2| 3| 4| 0| 0| 0 ...
    This is correct.
    *In the infoprovider, the key figure is tied to currency "MYR".
    In developement system, i replicated the exchange rate table, and the problem (Scenario 2) is solved.
    In test system, i replicated the exchange rate table, and the problem (Scenario 2) is still there.
    I am not sure what is happening here.
    Please could you please kindly advise.
    Thanks.
    Tee

    There appear to be two factors happening here.. one is how you have your query restrictions set up, and the other is the currency translation method that you are using. What results a currency translation provides depends on both the translation key definition AND the availability of a valid currency translation for the appropriate period.
    First, review transaction RSCUR and see how your currency translation is defined.
    Then review transaction oB08 and see if there is a valid currency conversion factor during the affected time.
    Once you're certain all that is correct, review your query and how it is functioning. The fact that you wish to display months for which you do not wish to return data seems to indicate your 0CALMONTH2 restriction is not set up properly.

Maybe you are looking for

  • APP-Run Payments in Local Currency

    Hi, Iam trying to process a payment in INR for the invoices which have been booked in USD. While Iam doing the log that is getting generated in APP is as follows:- Payment with currency USD, payment method : No valid payment procedure Configurations

  • How can I add a watermark via JavaScript that includes the current datestamp?

    Part of my daily work process here is to scan in a huge stack of inbound mail. I then OCR the scans, delete the blank pages, and add a watermark. I've got a batch process set up for the first two steps, but I can't make a watermark for the datestamp

  • Sequence Number

    HI guyz, I have one problem with my forms. i would like to create Seqeunce number in my field by using when button pressed trigger which shows next next sequence number. how can i do this? Regards

  • TS3276 my e mail has suddenly stopped working

    my e mail suddenly stopped working , having been receiving messages all morning

  • SCOM 2012 License for SCOM 2012 R2

    Hi, I want to upgrade SCOM 2012 SP1 to SCOM 2012 R2. Do I need to have any additional license for this upgrade or SCOM 2012 RTM license will work for R2 as well?