Trouble in currency conversion

I am having problem in a conversion.
I have a net value in a foreign currency (GBP) that is the net value of an invoice, I want convert it in local currency (EUR).
I use CONVERT_TO_LOCAL_CURRENCY with the rate specified in vbrk-kurrf, but it seems it contains not enough decimal positions, so the value that I obtain and the corrispondent value in bseg-dmbtr are not equal, indeed are different after the second decimal position.
Have you got any idea?
Thank you

Hii
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
      EXPORTING
        DATE             = SYST-DATUM
        FOREIGN_AMOUNT   = for_amount
        FOREIGN_CURRENCY = 'USD'
        LOCAL_CURRENCY   = 'GPP'
           TYPE_OF_RATE = 'M' 
      IMPORTING
        LOCAL_AMOUNT     = loc_ammount
      EXCEPTIONS
        NO_RATE_FOUND    = 1
        OVERFLOW         = 2
        NO_FACTORS_FOUND = 3
        NO_SPREAD_FOUND  = 4
        DERIVED_2_TIMES  = 5.
also chk this link
<b>CONVERT_TO_LOCAL_CURRENCY
Look at  this code for converting currency values from one currency to another .this example converts 10 euros into GBP. When you display this value you first need to convert it from its internal SAP value to the proper external display value.
<b>DATA: gd_fcurr TYPE tcurr-fcurr,
      gd_tcurr TYPE tcurr-tcurr,
      gd_date  TYPE sy-datum,
      gd_value TYPE i.
gd_fcurr = 'EUR'.
gd_tcurr = 'GBP'.
gd_date  = sy-datum.
gd_value = 10.
PERFORM currency_conversion USING gd_fcurr
                                  gd_tcurr
                                  gd_date
                         CHANGING gd_value.
Convert value to Currency value
*&      Form  currency_conversion
      text
     -->P_GD_FCURR  text
     -->P_GD_TCURR  text
     -->P_GD_DATE   text
     <--P_GD_VALUE  text
FORM currency_conversion  USING    p_fcurr
                                   p_tcurr
                                   p_date
                          CHANGING p_value.
  DATA: t_er        TYPE tcurr-ukurs,
        t_ff        TYPE tcurr-ffact,
        t_lf        TYPE tcurr-tfact,
        t_vfd       TYPE datum,
        ld_erate(12)   TYPE c.
  CALL FUNCTION 'READ_EXCHANGE_RATE'
    EXPORTING
      CLIENT                  = SY-MANDT
      date                    = p_date
      foreign_currency        = p_fcurr
      local_currency          = p_tcurr
      TYPE_OF_RATE            = 'M'
      EXACT_DATE              = ' '
   IMPORTING
      exchange_rate           = t_er
      foreign_factor          = t_ff
      local_factor            = t_lf
      valid_from_date         = t_vfd
      DERIVED_RATE_TYPE       =
      FIXED_RATE              =
      OLDEST_RATE_FROM        =
   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.
    ld_erate = t_er / ( t_ff / t_lf ).
    p_value = p_value * ld_erate.
  ENDIF.
ENDFORM.                    " currency_conversion</b>
Values stored in fields of type CURR can have different values than those displayed on screen. This can be done using a number of standard ABAP statements like
WRITE/ *Write TO and also with the FM CURRENCY_AMOUNT_SAP_TO_DISPLAY.
data:      p_intval like wmto_s-amount.   "Internal Amount
  data:      gd_disval  like wmto_s-amount. "Display Amount
  call function 'CURRENCY_AMOUNT_SAP_TO_DISPLAY'
       exporting
            currency        = po_tab-waers
            amount_internal = p_intval
       importing
            amount_display  = gd_disval
       exceptions
            internal_error  = 1
            others          = 2.
Regards
Naresh

Similar Messages

  • Currency Conversion terminates the query execution

    Hi friends,
    When I execute a query it terminates due to the following error in currency conversion. "Abort System error in program CL_RSR_RRK0_CURR and form FILL_CUDIM_02-04 (see".
    conversion works fine and gives correct values in target currency when the source currency is say thailand bhat, malaysian ringett, philippino peso etc.., but when i use the source currencies of zimbabwe or kenya i get this error and next the query terminates.
    Can any one of you suggest me what could be the problem. How do i systemtically approach to solve this problem.
    Thanks
    Raj

    Hi Serjio
    All the currencies mentioned currencies are available in the TCURR table including the exchange rates from those currencies to USD.
    Hi Sven,
    I am sorry, I really didnot understand when you say "set the flag for protocol to X". You may throw more light on this. I tried debugging the program RSW_CUR_TRANSLATION_RATE_GET in the past step-by-step. This leads to lots of other programs and i was really lost in them. Pls guide me to debug it effectively.
    Hi Serjio/Sven,
    Further, i missed out to mention the following details in my post. We have two version of a this COPA query. One is older and the other is newer. Both were created before we upgraded from 3.1C to NW2004s.
    The older version works fine. The conversion from source to target currencies is good for the african currencies also besides the asia-pacific (AP) currencies. However, the newer version throws out the error message i have mentioned in the post for african currencies but works fine for asia-pacific currencies. Even the newer version was working fine before we upgraded from 3.1C to NW2004s. Its only after the upgrade that we are encountering this problem.
    In the query we are also converting the data to SGD (singapore dollar), besides USD. As i donot require this data i have hided the values in SGD. As a reason we have never maintained conversion rates/factors for converion from any of the AP or African currencies to SGD. Due to these missing rates I get an Information message to maintain the conversion rates/conversion factors for AP/African curr to SGD. This message appears along with the error message(mentioned in my post) on the same screen. This information message also appears for the older version of my query, which is currently giving correct $values. But I think we can ignore this message. Else do you think, in some way these missing rates are responsible for the trouble??.
    But more surprisingly why is that the older version is not impacted by the upgrade while the newer is affected?
    Pls share your views
    Thanks
    Raj

  • Stale currency conversions (Stocks application)

    Using the Stocks application (which is Yahoo! Finance), it's possible to view currency conversion rates. For example, entering "USDAUD=X" as a ticker symbol will convert US dollars to Australian dollars. (Find other symbols at finance.yahoo.com.)
    However, the conversion charts are only valid for the 1-week view. If I select, say, the 3-month or 2-year view, the values are stale (the most recent few weeks or months are not shown). If you test this, be sure to select various time scales and then go back to each.
    I do not have this issue when viewing stocks, e.g., AAPL.
    Am I the only person having this trouble, or is there a way to correct?

    I don't think you are using a feature that is supposed to be there.
    It is a stocks viewer not a currency viewer.
    If it happens to show the currencies then that is good luck rather than planning.

  • 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

  • Currency Translation Type in queries using currency conversion

    I have a question on the Currency Translation Type (EUR_VAR) that is used in all of the queries using currency conversion on the fly. (currency is maintained automatically nor in table.)
    User wants to use 2 different exchange rates in a single query. The months in 2010 (Actuals) are to
    be converted using Xchangerate-type EURO and the months in 2011 (Planned) to use Xchangerate-type USD.
    But store different rates with different starting dates. This is however not possible because the Currency Translation
    Type is set-up (1) to work with Query Key date - rather than a characteristic in the data and (2) apparently these
    currency translation types only work with time characteristics like 0fiscyear
    My idea is therefor to:
    1. Create a new variable (similar to EXC_RATE) to prompt for a 2nd Exchange Rate type when query starts
    2. Create a new Currency Translation Type (next to EUR_VAR), referencing the new variable or sticking to fixed Xrate type, fixed to EUR
    Is this possible to create Idea (2)
    Many Thanks in Advance.

    The best way would be to create two curr conversion types , one converting to EUR and other to USD .Put them in properties of coressponding KFs in query.For timref in RSCUR , variable time ref can be used individually for two conv types.

  • Currency Conversion  on Piticular date

    Dear All,
                   I have a requirement where in I have to convert the  Purchase Document Currency into USD on  PO Creation Date.
    I did the Currency Conversion in the BEX by creating a currency translation type using the tcode RSCUR. Following are the   settings I have Used for Conversion
    1. Exchange rate type  M
    2  target currency         USD.
    3 Time reference          Current Date.
    Problem is the values are not getting converted to USD on PO Creation date.
    Moreover I wanted the records whose values are more than 50,000 USD.
    Question.
    How to convert the currency from one to another on a Particular date.
    Date for each record is different from one another as stated above.
    Help me out in this case.
    Thank You All
    Regards
    Mahesh

    Dear Raj,
    Thank you for the reply.
    Iam using BI 7 and the tcode rrc1 is obselete in this version.
    So I went to the new tcode rscur and created the currency translation type with the settings below.
    1. Exchange rate type M
    2 Target currency USD.
    3 Time reference Current Date.
    Used this translation key in the Key figure properties for currency translation.
    I went to the source system and on context menu I transferred global settings.
    Do I need to maintain currency keys and exchange rates manually even after transferring global settings?
    I have set in the time reference the PO creation date
    as Special Info Object. Will this work?
    Please let me know.
    Regards,
    Mahesh

  • Help needed with Include ZXRSRU01 in relation with currency conversions

    I'm implementing how to paper: Use variable time references in currency conversions (BW 3.3). When implementing variable exit RSR00001 & write include ZXRSRU01 an issue pops up.
    The relevant code is:
    <i> DATA: l_s_var_range TYPE rrs0_s_var_range.
    IF i_s_rkb1d-infocube EQ 'RHCURCON'.
        IF i_step = '3'.
          LOOP AT i_t_var_range INTO l_s_var_range WHERE vnam EQ 'ZCURDAT'.
            ZCL_IM_CURRCONV=>currdate = l_s_var_range-low.
          ENDLOOP.
        ENDIF.
    ENDIF.</i>
    When implementing the following message pops up:
    "l_s_var_range" has already been declared.
    In another statement ' l_s_var_range ' is already used.
    Any advice how to deal with this issue?
    thanks in advance
    tom

    Hi,
      somebody already declared that workarea (l_s_var_range), so you can directly use that without any declaration (data l_s_var_range type rsr0_.....). you can remove that statement and you can work.
       Otherwise if you want to use to declare your own workarea,
      data ls_range (or any name) type rsr0_....
    DATA: l_s_var_range TYPE rrs0_s_var_range. *** this statement you can remove since somebody declared the same.
    ****or use ur own work area name and use that work area within your code.
    data ls_var_range type rrs0_s_var_range.
    IF i_s_rkb1d-infocube EQ 'RHCURCON'.
    IF i_step = '3'.
    LOOP AT i_t_var_range INTO ls_var_range WHERE vnam EQ 'ZCURDAT'.
    ZCL_IM_CURRCONV=>currdate = ls_var_range-low.
    ENDLOOP.
    ENDIF.
    ENDIF.
    rgrds,
    v.sen.
    Message was edited by:
            Senthilkumar Viswanathan
    Message was edited by:
            Senthilkumar Viswanathan

  • Currency Conversion in WebI Report

    Hi All:
    Need your help in currency conversions using WebI Report.
    Current Scenario: 
        Currency conversions are currently achieved at BEx Query Designer level where target currency is determined through a Selection Variable.
    Proposed Solution:
       As per the Business proposal, BW will be publishing the data to Terradata; a universe will be built on Terradata and a WebI report will be based on this universe.
    Question:
       How can this type of currency translation be achieved in WebI Based  Report?

    Hi,
    Current Scenario:
    Currency conversions are currently achieved at BEx Query Designer level where target currency is determined through a Selection Variable.
    Proposed Solution:
    As per the Business proposal, BW will be publishing the data to Terradata; a universe will be built on Terradata and a WebI report will be based on this universe.
    Question:
    How can this type of currency translation be achieved in WebI Based Report?
    >> You would use the same logic by using a variable in the BEx query designer and Web Intelligence would then leverage the variable from the BEx query.
    ingo

  • 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.

  • Currency conversion error in SAP HANA

    Hi,
    I am new to SAP HANA and learning to create information views in HANA studio (SAP HANA SP6 on Cloudshare, HANA studio 1.0.68). I am trying to create a simple analytic view (on purchaseOrderItem table in SAP_HANA_EPM_DEMO sample database) to have GrossAmount converted to EUR.
    I added a calculated column as follows:
    When i click on "OK", i get error -
    The check box “Calculate before aggregation” has been unchecked, because the definition of the calculated column contains measures with currency conversion, restricted measures or operands with input parameters. For such a calculated column the calculation is always done after the aggregation."
    and checkbox "calculate before aggregation" get unchecked. See screenshot below:
    Please suggest what could be reason? Thanks in advance.
    Regards,
    Amit

    Hi Amit,
    If you uncheck the "Calculate before aggregation" checkbox and activate the view, you will see in the generated log that a Calc scenario is created. (a view with /olap wrapper). Due to the calc scenario, the aggregation is defined as the default behavior for the KFs and hence the calculation cannot be done before aggregation.
    By the way, I did not understand why do you need calculate before aggregation for a KF which is just a copy of another KF. If you need Gross amount in Local currency and EUR, then just perform the currency conversion without "Calculate before aggregation" checkbox. It will work.
    Regards,
    Ravi

  • 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

  • Credit memo request with currency conversion to EURO

    I have a requirement in which i need to create a Credit Memo Request for the newly created sales organisation using the old billing document number created for old sales organisation.New sales org will have its currency changed to EURO.I referred to a FM named 'Pricing' where the currency conversion is done.
    The requirement is to get the current price in EURO from the price list instead of currency conversion to EUR.The current price has to be extracted from new pricelist.
    Your inputs in this regard is highly appreciated.

    HI
        Am not on SAP system now, so will try to give you
    info with what i can recollect.
       You can use FM: SD_SALESDOCUMENT_CREATE for creating
    Credit Memo Request. Note that reference document and
    reference type should be passed for identifying the
    reference document as invoice. Please consider these as
    initial inputs to explore on the same. Regarding the
    pricing, it can be configured either at order type or
    copy control to carry out new pricing so it can take
    directly from condition records.
        Hope the above info can help you in exploring on the same.
    Kind Regards
    Eswar

  • Local Currency conversion in PO

    Hi
    Iam facing problem in wrong Local currency conversion while doing GR reversal for foriegn currency Subcontract PO.
    Local Currency : EUR
    PO Currency     : HUF
    User has entered wrong Exchange rate in OB08. (Indirect Quotation : HUF -> EUR) & did Goods Receipt with reference to PO. After that Exchange
    rate has been corrected immediately, but some GR documents posted with wrong exchange rate.
    To correct the wrong entries, Again Wrong exchange rate has been updated in OB08 & reversed those material document in MBST. But the strange issue is system calculating different local currency for those reversed documents. The Local currency Amount of Goods receipt document & reversed document local currency amount is not matching,Ideally both should match.
    Following observations on this,
    1. Exchange rate are same in both doucments. I have checked in document Header.
    2. GR Qty & Reversed Qty are same.
    3. PO currency (HUF) amount are same in both doucments.
    4. Finished Material & Raw material are managed in standard Price.
    5. Document date & Posting date are same in both doucments.
    Anybody can explain why the system updates wrong local currency ?
    Thanks in Advance.
    Regards,
    RRS

    I do not remember the Tcode, however it is under SPRO>>General setitings>> currency .. guess it is OB90
    And if the difference is large. check the following:
    Check the exchange rate type you use, next go to OB08 and see if the inverse translation is maintained for your currencies  EUR- HUF and HUF- EUR
    and then check OB07 and see what settings you have for the ex. rate type you have i.e Inv, fixed ...
    You might hit upon something here

  • Currency Conversion based on condition in BW

    Hello,
    I have gone through the cople weblogs/links/doc whatever information I found on currency conversion. However I am not able to figure out what could be done in below scenario. Please guide.
    Scenario -->
    I have STATUS and POSTING_DATE in my Cube. Key Figure in this cube is AMOUNT. Transactions are created in source system in local currency. When data is extracted to BW, I get AMOUNT in local currency and with right clicking on this column in Bex, I can convert it in Fix Target currency or I can permanently create one new column in my report which will always shows fixed target currency for AMOUNT. So far so good.
    Now the problem is I wanted to use the conversison rate maintained in TCURR table based on some condition.
    Ex: IF STATUS=CLOSED, then use Conversion rate as of POSTING_DATE,
            ELSE, use current date exchange rate.
    Standard currency conversion always use curent date for calculating exchange rate, but can I use conversion rate as of POSTING_DATE?
    Please advice.
    Regards
    Pankaj

    Thanks everyone for reply. I really apprecite your help.
    I tried the suggested FM "CONVERT_TO_LOCAL_CURRENCY", just have one more clarification.
    I debuged this FM and saw that Date which we are passing get's inverted as this is how date is maintained in TCURR table. So far so good. But TCURR table normally get's loaded once a month (say at the start/end of month) and so we will have only one date there. However input date which I am passing into thi FM can be any date (as this is the date maintained at transaction level). How do you handle this case?
    Please advice.

  • 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

Maybe you are looking for

  • Report ( invoice number and delivery number)

    Hi Is there any report in SAP, which can show invoice number and delivery document number, I know the SAP table, but is SAP standard report available? Example:PO: 5500075241, plant abraod delivery number 3510000174 and plant abroad Invoice number 355

  • No contacts in address book, can not find address book anymore

    I was trying to switch default email accounts, Hughes.net was the default and Yahoo the secondary and I wanted to swap these around as I am no longer using Hughes net. In doing so I lost all email folders and address books. I have rebuilt the folders

  • Replacement check after processing escheatment

    Hi- On my ISU project, we are using an outside tool to perform the escheatment process and steps on unclaimed customer credit refund checks. The checks have to be voided after 180 days then moved to a specified GL account. One way to achieve the recl

  • Which difference parallel database and RAC database

    Hi Experts, I saw some document about parallel database and RAC database. My boss confused these two product. which difference between parallel database and RAC database? does parallel database is a "old RAC"? Thanks Jim

  • HT4759 How do I change Apple id on a device?

    We have and iPhone and iPod that are using the same Apple id.  I created a new Apple id to use for the iPod.  How do I remove the iPod from the current Apple id/account and link it to the new account??