Exchange rate function module

Dear Forum,
I tried READ_EXCHANGE_RATE and CALCULATE_EXCHANGE_RATE but both no result.
The local currency is INR and transaction is posted in EUR. Now I want to get the exchange rate in USD which is conversion from EUR to USD. local currency INR not needed.
Which function module can fulfill my needs?
Thanks

Hi,
Ok you want it in exchange rates,
CONVERT_AMOUNT_TO_CURRENCY  Convert an amount from a currency to another (exchange rate taken from database tables) 
CONVERT_CURRENCY_BY_RATE  Convert an amount from a currency to another, according to the passed exchange rate 
  or
BAPI_EXCHANGERATE_GETDETAIL
cheers,
bhavana
Edited by: Bhavana Amar on Jun 4, 2010 12:53 PM

Similar Messages

  • Exchange rate function

    Hi!
    I would know if there is a similar function like BAPI_EXCHRATE_CREATEMULTIPLE or if this function really exists in R/3 4.0 version . I´ll reward, I promise!
    Thanks in advance,
    Éder

    hi eder,
    it realy exists.
    other FM are BAPI_EXCHRATE_GETCURRENTRATES
    and
    BAPI_EXCHRATE_GETLISTRATETYPES
    chk this also
    CALL FUNCTION 'READ_EXCHANGE_RATE'
          EXPORTING
            DATE             = SY-DATUM
            FOREIGN_CURRENCY = L_CURR
            LOCAL_CURRENCY   = P_WAERK
          IMPORTING
            EXCHANGE_RATE    = V_RATE
          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 <> 0.
        ENDIF.
        X_CURR-CURR = L_CURR.
        X_CURR-RATE = V_RATE.
        APPEND X_CURR TO IT_CURR.
        L_VALUE = L_VALUE * V_RATE.
    another  fm - >CALCULATE_EXCHANGE_RATE
    rgds
    anver
    Message was edited by: Anversha s

  • Exchange rate, Plan exchange rate Programs & Function modules in SAPBW ....

    Hi Friends,
    Could anybody please tell me what are the  " Exchange rate, & Plan exchange rate " Programs & Function modules.
    If any customized also , I can do modify and i will use it.
    Thanks in advance,
    Ramesh

    Hi there
    Exchange rates are used for currency conversion rules in queries, data loads, etc.
    You can export exchange rates from R/3 (or other system) to SAP BI, and change them or define your own exchange rates.
    For planning, you can create exchange rates specifically for that purpose.
    In currecny conversion rules you can tell the system which exchange rate to use (for example EURX from EUR->USD)
    To view/mantain exchange rates go to transaction SPRO->SAP Reference IMG->SAP Netweaver->General Settings->Currencies->Enter Exchange Rates
    Diogo.

  • Exchange rate, plan exchange rate Programs & Function modules in SAP ....

    Hi Friends,
    Could anybody please tell me  what are the  " Exchange rate " & Plan exchange rate "  standard programs, function modules  avaialble in SAP  .
    Thanks in advance,
    Ramesh.

    Check via transaction OB07 (or SPRO - General Settings - Currencies - Check exchange rate types) usually you will find a "M" average exchange rate (which is used operationally everywhere in Logistics) and a "P" planned exchange rate (used for cost planning)
    Exchange rates are maintained via transaction OB08 (or SPRO, same tree - last node - Enter exchange rates)
    When programming, use tables TCUR* or FM of function groups like SCUR "Translation of Currency Amounts etc." (CONVERT_TO_FOREIGN_CURRENCY, CONVERT_TO_LOCAL_CURRENCY and READ_EXCHANGE_RATE among others)
    Regards,
    Raymond

  • Exchange Rate Differences function and when to use

    The company I am asking about is based in the US, but also has offices and transactions in Canada.  Does the Exchange Rate Differences function need to be run at month-end before finalizing the financials, in order to "re-value" the Canadian accounts, such as Accts Receivable, Accts Payable, Fixed Assets, etc. that may not have changed during the last month (no activity during the "current" month)?  The financials are expressed in US Currency.  Transactions during the month to the various Canadian accounts are "re-valued" at the time of the transaction entry, since the exchange rates are updated every day in the system.  We need a clear-cut idea of when the Exchange Rate Differences function should be run.

    I would say that you do need to do it. This is very important to ensure your account receivable control account (or payable) is revalued at the end of the month based on the new exchange rate.
    I know some companies do not revalue the balances as it is not required. I think, revaluating the balance makes sense as it will give you a true picture of your payable or receivable at the end of the month. This is also a good way of accruing your exchange rate loss/gain.
    Vincent

  • Function Module to get the GST tax rate on basis of posting date

    Hi Guys,
    Can somebody suggest any function module to get GST tax rate (Canada) according to the posting date. I have already tried GET_TAX_PERCENTAGE. It is not giving me any results.
    Is there any other functions modules.?
    What is the the name of table for finding the tax?

    hi,
    CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
          EXPORTING
            I_GJAHR        = GV_GJHAR
            I_PERIV        = GC_24
            I_POPER        = GV_POPER
          IMPORTING
            E_DATE         = S_FKDAT-LOW
          EXCEPTIONS
            INPUT_FALSE    = 1
            T009_NOTFOUND  = 2
            T009B_NOTFOUND = 3
            OTHERS         = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
          EXPORTING
            I_GJAHR        = GV_GJHAR
            I_PERIV        = GC_24
            I_POPER        = GV_POPER
          IMPORTING
            E_DATE         = S_FKDAT-HIGH
          EXCEPTIONS
            INPUT_FALSE    = 1
            T009_NOTFOUND  = 2
            T009B_NOTFOUND = 3
            OTHERS         = 4.
        IF SY-SUBRC <> 0.
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                  WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ags.

  • Need Function Module for Printing Rates,Discounts and Taxes in Invoice.

    Hi All,
    For our Invoice printing I need to get a function module which will provide me the rates,discounts and taxes against each item line of the Invoice No.
    Finall it will be printed accordingly.
    Can anyone help me regarding this with input parameter example.
    Thx in Adv.

    Hi,
    As far as I know there is no fun module to print all this stuff.
    You have to get this data from KONV table by passing the VBRK table KNUMV field.
    Then check for all the Rates and amount KBETR and KWERT fields for the respective condition Types.
    You have to loop the KONV internal table and write all the condition rates and amounts in the script driver program.
    see any Std script for this.
    Regards,
    Anji

  • GETTING DATA FROM ODS BY USING A FUNCTION MODULE..

    Hi Frnzs,
    Here is my issue..Plz go thru it..
    I  have a function module (YFSF_ICR_GET_EXCHG_RATE_ODS).
    the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
    concultion : Based on flag I_ICR ni , we have to read new exchange rates ( From ODS)
    the fucntion module code is here
    FUNCTION yfsf_icr_get_exchg_rate_ods.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_PLANCYC) TYPE  /BIC/OIYPLANCYC OPTIONAL
    *"     REFERENCE(I_SALESORG) TYPE  /BI0/OISALESORG OPTIONAL
    *"     REFERENCE(I_IC) TYPE  /BIC/OIYINVCURR
    *"     REFERENCE(I_RC) TYPE  /BIC/OIYREPCURR
    *"     REFERENCE(I_FISCPER) TYPE  /BI0/OIFISCPER
    *"  EXPORTING
    *"     REFERENCE(E_EXG) TYPE  /BI0/OIEXCHG_RATE
    *"  EXCEPTIONS
    *"      NO_RATE_FOUND
      DATA: l_s_exg TYPE /bic/ayfsfexg00,
            l_t_exg TYPE /bic/ayfsfexg00 OCCURS 0,
            l_year TYPE /bi0/oifiscyear.
      IF i_plancyc IS INITIAL.
    Actuals
        FREE l_t_exg.
        SELECT *
          INTO CORRESPONDING FIELDS OF TABLE l_t_exg
          FROM /bic/ayfsfexg00
          WHERE fiscper <= i_fiscper
            AND fiscvarnt = 'JJ'
            AND /bic/yrepcurr = i_rc
            AND /bic/yinvcurr = i_ic
            AND /bic/yplancyc = ''
            AND /bic/yexchtype = 'SPOT'
         ORDER BY fiscper DESCENDING.
        IF sy-subrc <> 0.
          RAISE no_rate_found.
        ELSE.
          READ TABLE l_t_exg INTO l_s_exg INDEX 1.
          e_exg = l_s_exg-exchg_rate.
        ENDIF.
      ELSE.
    Forecasts
        l_year = i_fiscper+0(4).
        SELECT SINGLE *
          INTO l_s_exg
          FROM /bic/ayfsfexg00
          WHERE fiscvarnt = 'JJ'
            AND fiscyear = l_year
            AND salesorg = i_salesorg
            AND /bic/yrepcurr = i_rc
            AND /bic/yinvcurr = i_ic
           AND /bic/yplancyc = i_plancyc
            AND /bic/yplancyc = ''
            AND /bic/yexchtype = 'S'
            AND exchg_rate GE '0.0000001'.
        IF sy-subrc <> 0.
          RAISE no_rate_found.
        ELSE.
          e_exg = l_s_exg-exchg_rate.
        ENDIF.
      ENDIF.
    ENDFUNCTION.
    ok
    now my requirement is that I need to enhance the Function module for reading exchange rates.
    for this i got the following information:
    - It requires an additional flag I_ICR for instance that can be empty or 'X'
    for instance
       - If the flag is empty, the function performs the current logic without any changes,
    that is reading SPOT rates for actuals (the planning cycle is empty) or S rates
    for forecasts based on the planning cycle. Nothing needs to be changed here
       - If the flag is 'X', the function reads a new exchange rate type, let's call
    it "ICR". As stated in the requirements and functional specs, these exchange rates
    are the Reuter rates valid for a complete year. These are fixed rates so no planning
    cycle. The users will enter records in the format (year, reporting currency, invoicing
    currency, exchange rate). If the input flag I_ICR is X, the function determines
    the year based on the input period, then, based on the year it selects on the same
    table as for the other exchange rates with a restriction on exchange rate type "ICR",
    year, from and to currency and return the exchange rate
    Update rules. There are two:
       - To the consolidation ODS. No changes are required there; the function has to
    read either S or SPOT rates (I_ICR flag is empty)
       - From the consolidation ODS to the cube. As stated in my previous email, the
    from currency is the one available in the data package. The to currency is determined by reading the sales organization master data (reporting currency attribute) based on the inter-company sales organization (also available in the incoming record). It then calls the function module above with the parameter I_ICR set to 'X' so it reads the Reuter rates.
    I guess i need to create another function module and can be used.
    Observation
    ODS table fields.
    - FISCPER
    - FISCVARNT JJ
    - FISCYEAR 2006
    - /BIC/YREPCURR EUR
    - /BIC/YINVCURR JPY
    - SALESORG 0010
    - /BIC/YMRC 3090
    - /BIC/YPLANCYC
    - /BIC/YEXCHTYPE S
    - - RECORDMODE
    Thanx in advance..

    Haii
    I have given below the basic functionality..u can go throught the api and start working..
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import java.io.File;
    import org.w3c.dom.Document;
    public class OrderProcessor {
       public static void main (String args[]) {
          File docFile = new File("orders.xml");
          Document doc = null;     
          try {
             DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
             DocumentBuilder db = dbf.newDocumentBuilder();
             doc = db.parse(docFile);
           Element root = doc.getDocumentElement();
          System.out.println("The root element is " + root.getNodeName());
         NodeList children = root.getChildNodes();
       System.out.println("There are "+children.getLength()
                                      +" nodes in this document.");
          } catch (Exception e) {
             System.out.print("Problem parsing the file.");
    }regards
    Shanu

  • Ambiguous INR/EUR exchange rate relations

    HI Experts,
    I am stuck with this problem from past one week please help.
    I have loaded data from SRM system to BI system and there is no problem with data in PSA but when tried to load data from PSA to ODS using DTP i get
    "Ambiguous INR/EUR exchange rate relations" Message and click of OK it dumps with message_x
    i further debuged and that this is happening in RSW_CURRENCY_TRANSLATION FM where it is trying to convert Document currency to local currency.
    I also check in OB08 where exchange rate is also maintain properly
    below is the parameter i am sending to FM
    Test for function group RSW0
    Function module RSW_CURRENCY_TRANSLATION
    Uppercase/Lowercase
    Import parameters Value
    I_CTTNM 0SR_DEFCUR
    I_AMOUNT 0,0000000000000000E+00
    I_SCUR INR
    I_TCUR EUR
    I_TIME_IOBJVL 20070323
    I_SCUR_IOBJVL
    I_TCUR_IOBJVL
    I_PERIV
    I_RATE 0,0000000000000000E+00
    I_VDATE
    and below are the entried maintained in OB08
    M 01.10.2005 X 1 EUR = 56,00000 X 1 INR
    0022 01.03.2000 X 1 INR = 1,00000 X 1 EUR
    M 01.10.2005 X 1 INR = 0,01700 X 1 EUR
    M 01.03.2000 X 1 INR = 1,00000 X 1 EUR
    Please help.......
    Best Regards
    Falgun

    Hi Anil,
    I am getting the same problem. How did you solve the problem in your system?
    Thanks and regards,
    Renato Morais

  • ME22N change Exchange rate type at price condition level

    Hello,
    In ME22N exchange rate type is 'M' by default. When a price condition has currency different than purchase order this 'M' rate is used.
    Now I need to change this 'M' rate but for particular price conditions (and exchange rate type can be different for each price condition). Don't ask me why:-) This requirement comes from business consultant and he knows that there is no user exit for this. I need to modify standard. The problem concerns items price conditions.
    I'm not asking you for a complete solution, but maybe you can give me a hint where to start? What is the function module which perform price calculation (where exchange rate is used) in ME22N.
    I tried to change KOMK-KURST in price condition rule (the procedure which is called to check if price condition has to be calculated or not). It is called for each price condition and I know a name of price condition. But I think the exchange rate type is read at the beginning and stays unchanged even I changed KURST.
    I also found function module READ_EXCHANGE_RATE, which has rate type 'M' by default. I could put my modification in place where it is called. But it is not called when I press button Update price. It is only called when I change the currency of condition and press enter. This FM is called in few places in ME22N but not when I'm refreshing prices. Maybe during a refresh it has already an exchange rate? If so, READ_EXCHANGE_RATE could be a solution, but... It is not called when price conditions are created for the very first time (when I create PO item). Maybe system calls different FM?
    I also tried to use trace (ST05) to see where systems reads from TCURR, but I think some buffers are used and TCURR is not in trace.
    So now I'm stuck hoping for your help.
    Best regards
    Rafal

    Prabhu Peram wrote:
    Hello Rafal ,
    >
    > still im trying to understand your requirements , anyhow if you change/propose new exchange rate at header level , then system wont put type as 'M'.
    >
    The problem is that if I set a new exchange rate type, it will be the same for all price conditions. My requirement is to have different exchange rate type for each price condition. The pricing procedure will loop at each price condition, and depending on condition name I need to have different exchange rate type.
    Example:
    condition XMER is in EUR and must be converted to USD (factor should be 1,234)
    condition XMET is in EUR and must be converted to USD (factor should be 1,567)
    Now the factor is the same for all price conditions.
    I have found interesting table XKOMV. It contains price conditions and there is a field with factor value. Now I will look for the place where this table is filled with data or for the place where I can modify factor values before XKOMV is used in pricing procedure.
    Best regards
    Rafal

  • Use of FOREIGN_FACTOR and LOCAL_FACTOR in Function module CONVERT_TO_LOCAL_

    Hi all ,
               could anyone tell me what is the use of  following two Export parameters in function module    CONVERT_TO_LOCAL_CURRENCY and why they are used for ,
    1.   FOREIGN_FACTOR (Factor for the foreign currency units)      and
    2.  LOCAL_FACTOR ( Factor for the local currency units ) .

    Hi Ramya ,
                        Thanks for your reply . But i would like to know what is the use of those two parameters and in what calculation it    is used. 
    The value which is to be converted is passed through  'foreign_amount ' parameter and it is returned after convertion by
    'local_amount ' parameter in the function module 'CONVERT_TO_LOCAL_CURRENCY' . Other than this  if we want to change the currency of another variable which is not passed to this function module  how can i do it ? Is it enough if i multiply that variable with the FIXED_RATE parameter which is returned by this function module as its value is same as exchange rate or do i need to
    use FOREIGN_FACTOR  and LOCAL_FACTOR  also for this calculation?
    Edited by: archana_nayak on Apr 25, 2010 9:52 AM

  • New G/L Line item Datasource 0FI_GL_14 not extracting exchange rate field

    Hi,
    We are implementing new G/L Line item datasource and standarad field of this datasource KURSE - exchange rate field  not extracting  data.
    Debugged standard extractor function module but field for exchange rate is not populating even there is a value in the base table BKPF.
    Please advise on this.
    Thanks
    UDAY
    Edited by: Udaybi on Apr 12, 2011 5:30 AM

    Did you solve the issue? I am facing the same issue too.

  • Exchange rate and PO printing form

    Hi Experts
    I hale problem with PO printing form. 
    I have to add one field to layout. Itu2019s exchange rate. We have price condition defined in inforecord  in USD. This price is change to local currency, and based on this system calculated value of the item, and pots it to EKPO-NETPR.
    I know that exchange rate is visible in deep structure DOC-XTKOMV[1]-KKURS when function module ME_PRINT_PO of printing program is execute.
    I think then it should be moved to KOMVD, when item data are printed, but when I add to form &KOMVD-KKURS& itu2019s printing nothing.
    Why exchange rate is not print?  How to stop debugger when system try to fulfilled variable &KOMVD-KKURS& ?
    Thanks
    Pawel

    In EKKO-WKURS I have always value 1.0 because document currency is locals. Foreign currency is only in price condition value.
    So the question is still open...

  • Exchange Rate Type "EURX"

    Hi,
    I wonder if some more familiar with this issue and can help educate me on it. In the Enterprise Compensation Function module (and other standard deliver by SAP), HR_ECM_CONVERT_CURRENCY, it is hard code to use exchange rate type "M"
    With that, in table TCURR, we maintain type M between all countries.
    i.e.: USD to CHF
    However, per SAP direction for EURO currency, it is best practice to use exchange rate type "EURX"
    i.e.: USD to EUR
    So my question is how can compensation module translate when they are hard code to use type "M" and "M" is not maintain between non-EURO and EURO?
    Is there a linkage somewhere I do not see. Can someone shed some light into that?

    Hi 
    Check OBBS transaction, have you maintained any alternative Exchange rate types?
    regards
    Srinivas

  • Default customized exchange rate type

    Hi friends,
    I have an issue during an implementation.
    I want to use a customized exchange rate type for all forex transactions for only 1 company code in the system having several company codes. Please let me know how do i set the customized exchange rate type as default for a particular company code
    Regards
    Srinivasan

    Hi,
    SAP has defaulted exchange rate type M in the function module. So if exchange rate type is not assigned to a document type, default M is picked.
    In case you want to have a default ex rate type other than M, that too for a particular co.code within the client, you would have to use specific document type to which this new rate type is assigned.
    There is no other way out.
    Hope it resolves your issue.

Maybe you are looking for

  • Trying to make a php file work with my email form

    Hello, Going slightly mad trying to link my php file with my html and actually getting it to work. It (the php file) keeps coming up with a syntax error on line 37 - code hinting may not work etc etc but there is no error from what I can see - can an

  • Assign plant to company code

    Hello, I am trying to assign plants to a company code and i get the message: "Company code and rating code must be the same.  Message no. CZ290" I have set valuation level at company code.

  • How to open a Trade Promotion from an ABAP report/program?

    Hello SDN Community, i try to open a spezific Trade Promotion to read an addional customized time_period field in a a badi. I have the promotion guid and i played around with mkt_element_read but the additional time fields are not included/transfered

  • Can't get adobe digital editions to run

    I downloaded adobe.com/products/ digital editions but my  computers says windows can't run it?? help - I have the lastest flash... ?  (I have windows vista )

  • Iphone 5 is not syncing access rights issue

    Sorry that should say can not sync with itunes