Exhange rate calculations in SAPScript

Hi,
I am trying to calculate the total invoice amount for different currencies in a  SAPScript.    I am running into a couple of  problems.
1:  I cannot seem to find the exchange rate ( KURRF ) in KOMK/VBDKA or VBDKR, do you know where else the exhange rate would be populated?
2: I cannot seem to use the commands: /: DEFINE &my_variable&
                                                                /: &my_variable& = &KOMK-FKWRT& * &KOMK-KURRF& (pretend KURRF is populated)
                       is it even possible to do that sort of calculations in SAPScripts? if not, what is an easy way to accompolish this?
                      I only need to calculate this once.
thank you.

u can use FM to get the value in print program..and pass them to the sap script...
The conversion rate is stored in TCURR table...
CALL FUNCTION 'CONVERT_TO_FOREIGN_CURRENCY'
        EXPORTING
          date             = <fs_komv>-kdatu "<<date of convertion
          foreign_currency = komk-waerk
          local_amount     = wa_komp_o-netwr "<<value to convert
          local_currency   = <fs_komv>-waers
        IMPORTING
          foreign_amount   = <fs_komv>-kwert  "<<Converted value
        EXCEPTIONS
          no_rate_found    = 1
          overflow         = 2
          no_factors_found = 3
          no_spread_found  = 4
          derived_2_times  = 5
          OTHERS           = 6.

Similar Messages

  • Creating a rate calculator [was: how do i create this?]

    I want to create a rate calculator on a website with 2 input fields: calling from and calling to.  Here is what i've got:
    CALLING FROM table:
    COUNTRY     $/MIN
    Africa            0.10
    Europe          0.20
    Asia              0.30
    CALLING TO table:
    COUNTRY     $/MIN
    Africa           0.20
    Europe         0.30
    Asia             0.50
    USA             0.10
    Basically to get the rate $/min the CALLING FROM selected country and the CALLING TO selected country will be added together i.e calling from africa to USA would be $0.20/min (0.10 + 0.10).
    - How do i create the database for this? (in access)
    - How do i then create the rate calculator in a webpage? (asp/php)???
    I would really appreciate anyone who will be able to help me in this.
    Thank you very much.
    Natalie
    [Subject line edited by moderator to indicate nature of question]

    Create a database table with 3 columns
    Country
    ToRate
    FromRate
    Populate these values as appropriate.
    Create two drop down menus on your page; FromRate and ToRate.  Populate these with the values (Display value and rate) from the table.
    Then, you could either:
    1) Submit the form to a server side script that adds and displays the values
    2) Use Javascript to add and display the values

  • Exchange Rate calculation not happening for Special GL in FAGL FC_VAL

    HI ,
    Exhcange rate calculation for all reconciliation accoout going on but for specilal gl not happens.
    Could you please tell  me whether system calculates or not for special gl or calculates only reconciliation account in FAGL_FC_VAL

    Its going well

  • How is Opportunity Win Rate calculated

    Metrics are not always so easy to figure out.
    So is there a list / document that explains how these fields are calculated?
    Specifiically how is the Opportunity Win Rate calculated?
    Thanks.

    Win Rate = ((# of wins) / (# of wins + # of losses))
    I believe Win = Closed/Won and Lose = Closed/Lost
    Refer Doc ID 565203.1 in metalink for more details.

  • Currency and exhange rates data distribution to flat file

    Hi All
    I have a situation like i am sending the all  BI data to flat files but my problem is how can i send the currency exhange rates(TABLE:TCURR) data to flat files, is it possible using open hub desination or any other methods available please suggest me.
    Regards
    vasu reddy
    Edited by: bvasu reddy on May 31, 2010 4:16 PM

    Hi,
    If i assume correct you want to supply ur data into flat file on daily basis.
    You can use APD to Do this both in BW3.5 and & BI 7.0.
    Creating dataflow in APD is pretty simple like process chain.
    What you can do is select "table" as a data source and "Flatfile" at datatarget (both on client server or on desktop).
    You will get APD option in RSA1 screen.
    After creating this APD you can schedule it on daily basis etc.
    Thanks and regards
    Arun

  • ACTUAL ACTIVITY RATE CALCULATION

    Hi Gurus,
    Is it possible to calaculate actual activity rate based on plan hours......
    I know that we can splitt the actual cost based on plan hours by selecting splitting rule 22...
    Now im doing actul activity rate calculation through ksii...
    Then system considering actul hours confirmed in production for actual activity calculation.....
    Pls suggest me.
    RAM

    Thank you for prompt reply.
    Suppose this month we have produced only . 10 finished products.... But actual capacity is 20..... What ever cost moniterd by the production cost centers will be loaded on total 10 products only  at the time of revaluation of production orders if we calaculate actul activity rate based on actual hours....... so the cost of the product is getting increased... so that he want to calculate actual rate aslo with planned hours..... Is there any other solution for this..
    Pls suggest me ...... its very urgent.
    Ram

  • Exhange rates globally or cc level

    can exhange rates be entered globally or only at cc level. I mean if there are 4 ccodes in different areas like CAD,MX,USD and japan can we enter exhange rate at global level(company level).IF so how can it be done and what are the pros and cons
    Thanks in advance
    Vikram

    Exchange rates entered are applicable across the company code. Exchange rates are not entered company code specific. If you  would like to have company code specific rates, may be you can explore exchange rate types.

  • Exchange Rate calculation mismatch in Sales Order Invoice and Cancelled Invoice

    Hi,
    In Sales Invoice, Exchange Rate is maintained as 7.75132
    Invoice Amount is 72000 USD. So the Amount calculated should be 558095.04.
    But in Accounting Document the Amount is posted as 558095.15 for the GL Sales Account.
    In Cancelled Sales Invoice, Amount posted is  558095.04 in GL Sales Account which is correct.
    Please help me understand why there is difference in both the Amount even when the Exchange Rate is same.
    Regards,
    Debashri Dutta

    Hi Ankur,
    Thanks for your reply.But our problem is sales order,exchange rates are defined with M type in OB08 as u have said.However when the periods are different for order entry and invoice generation we are facing the following problem.Orders are at old exchange rates and excise invoice is getting generated at current exchange rate.This is resulting in value difference between commercial invoice and excise invoice.
    Please help.
    Regards,
    Praveen

  • Exchange Rate Calculation - Can I change it?

    BPCu2019s conversion process is different from the way weu2019re currently operating.  Currently, weu2019re pulling data from Oanda.COM for every Currency-to-Currency permutation and using Oandau2019s rounded to 5 decimal place rate to calculate the exchange rates in our Financial System. 
    However, BPC seems to convert differently.  In BPC, we've loaded all Rates to the tblFactRate table as they relate to USD.  So, if calculations need to be done between non-USD currencies, the rates are calculated on the fly based on the ratesu2019 relation to the USD rate. 
    Example:
    For February 2010 we have the following Average rates:
    Oanda.com  (These are the rounded to 5 Decimal rates for the 28 days of February, averaged, then rounded to 5 Decimal Places again)
    GBP u2013 USD:         1.56285
    EUR u2013 USD:         1.36842
    GBP u2013 EUR:         1.14235
    In BPC we only have the following rates in the tblFactRate table, so the system cannot use the GBP u2013 EUR rate from Oanda.com.  We only load the following:
    GBP u2013 USD:         1.56285
    EUR u2013 USD:         1.36842
    If a conversion is needed for GBP u2013 EUR, it will calculate the rate on the fly as so:
    1.56285 / 1.36842 = 1.142083571
    So, because Oanda is using a Rounded Average, based on Rounded rates, the way things are now, the BPC Calculated Rate will not match the rates in our Financial System.   
    Is this a configuration issue or is this simply the way the software does FX Translation?  Is it possible to load GBP - EUR rates somehow and have BPC calculate those rates based on what we input rather than the calculation being used? 
    Thanks!
    Sean

    Hi,
    I dont think this can be changed. BPC stores the conversion rates with respect to the group currency (or the currency of the parent entity). So, the currency translation is also done based on the group currency, as you have indicated. With 5 places of decimal, the figures will definitely not match.
    Hope this helps.

  • Tax Rate Calculation

    Hello Experts
    I have a Tax combination BED+VAT contains the following tax codes
    BED = 16%
    E Cess = 2% (on BED)
    HS Cess = 1% (on BED)
    VAT = 4% (on (BEDE CessHS cess) )
    when manually calculated the  total tax percentage is  21.1392%
    where as in B1 under the tax code it shows Tax Rate as 23 % (1621+4)
    Is there any possible way to get the correct Tax Rate in Business One 8.8 .
    Regards
    Arun

    Hi Arun,
    Set formulation as follow -
    1. Create Formula for BED - 
         BED_BaseAmt = Total
         BED_TaxAmt=BED_BaseAmt*BED_Rate
    2. Create Formula for eCess -
         Cess_BaseAmt=BED_TaxAmt
         Cess_TaxAmt=Cess_BaseAmt*Cess_Rate
    3. Create Create for formula for ShCess-
         Shcess_TaxAmt=BED_TaxAmt*Shcess_Rate
         Shcess_BaseAmt=Shcess_TaxAmt
    4. Create Vat Formula for Vat -
         BaseAmt=TotalBED_TaxAmtCess_TaxAmt+Shcess_TaxAmt
         TaxAmt=BaseAmt*Rate
    5. Create Tax Combination as BED+VAT4  - select tax types BED,eCess ,ShCess and vat then select formula codes as above you defined accordingly.
    Thanks
    Sachin

  • Exhange rate at header level

    Hello Sap Guru
       This is extremely Urgent .I posted document and when i am check in FB03 (accounting view) .I can't see exchange rate tab at header level, Though currency is mainatined as INR(Local) and USD(group).So its not calculating the exchange rate and KOC4 (proce varience report is coming wrong.
    Please help.

    Hello Deepak,
    Check document currency is USD or not ,if your local currency is INR. & also check in BKPF table where excahnge rate would update with respect to company code | document numnber | Year. If not updated and your document currency is not equal to local currency ,send screen shot for guidance on this subject.
    Regards
    Mani

  • Exchange Rate calculation - Performance problem

    Background: I have a fact table with transactional data from a sales system which contains values in different currencies. I have only one reference currency in the reports. The user wants to be able to view the values in the reference currency
    but with the exchange rate of the selected date.
    I have a table with a row per currency/date combination and the exchange rate to the reference currency.
    Records in the fact table also have a reference to the currency and a date.
    Initial approach:
    I created 2 measure groups, one base on the transactional data from the fact table and one with the exchange rates.
    Both measure groups have in common the currency and date dimensions. A many to many relationship makes no sense because I have only one reference currency.
    I create a calculated member to aggregate the data up to a selected date, something like this:
    with member [Measures].[Net Sales Local Currency] AS (
    Aggregate({null:[Time Hierarchy].[Date].CurrentMenber}, [Measures].[Net Sales LC])
    member [Measures].[Exchange Rate to Reference] AS (
    ([Time Hierarchy].[Date].CurrentMenber, [Measures].[Exchange Rate])
    member [Measures].[Net Sales Refence Currency] AS (
    SUM([Currencies].[ISO Code].[ISO Code], [Measures].[Net Sales Local Currency]/[Measures].[Exchange Rate to Reference])
    Results:
    When I select only a date member, let's say the 01.01.2014 I get a result within a second. If a put 2 dates in the select the result takes about 10 minutes. I suppose I am making something wrong in my calculated members that cause this peformance penalty.
    Could you please help me to debug my MDX code?
    Any comments would be highly appreciated.
    Kind Regards,
    Paul

    Hi Paul,
    For MDX query performance, it is usually caused by the following factors:
    Bottlenecks from SSAS Formula engines. 
    Bottlenecks from SSAS Storage engines.
    Bottlenecks from system resources.
    I would suggest you take a look at the following article which write by Charles, please see:
    How do I troubleshoot the slow MDX query performance?http://social.msdn.microsoft.com/Forums/sqlserver/en-US/f1f57e7b-eced-4009-b635-3ebb1d7fa5b0/how-do-i-troubleshoot-the-slow-mdx-query-performance?forum=sqlanalysisservices
    Based on your desription, you ecountered the performance issue after use date dimension to slice data. Does this happened at Client or SSAS Server side? Please elaboarte your scenario with more detail, and show the MDX script.
    Furthermore, please take a look at the following article regarding currency Conversion in SSAS 2012:
    http://social.technet.microsoft.com/wiki/contents/articles/18672.currency-conversion-in-ssas-2012-multidimensional-tabular.aspx
    If you have any feedback on our support, please click
    here.
    Elvis Long
    TechNet Community Support

  • Sales order takes Translation date for exchange rate calculation

    Hi
    I am creating the debit memo request via DP91 with reference to the contract. In the debit memo request pricing date has been set as current date but transaltion date has set the contract transaltion date.  Debit Memo request document currency is EURO, local currency is GBP and condtion currency is CHF. 
    In this scinerio in order exchange rate has been calculated against the transation date insted of pricing date.
    Can you please advise why the system behaving like this.
    Thanks & regards,
    Siva.

    Mike,
    I assumed your question is for an additional local currency for a company code (this can be changed in OB22).  For the first local currency, the translation date type in OB22 is always set to 3 (Translation Date) and cannot be changed (hence, greyed out).  Following that, in accounting entry transactions (for example FB01), you will see a field (Translation Date) where you can specify a date for which you want the system to fetch exch. rate from the exch. rate table.  In your situation, you will have to enter 'document date' there.
    PS: The reply above by Ravi applies only to tax items' translation, not for all items.  He is basically talking about the indicator that you see in OBY6.

  • Rate calculation

    Hello guys,
    I got one new requirement.I donot know what approach should I take for this one.
    It is like this.We calculate currency rates e.g, BUDGET RATE CY,BUDGET RATE PY,ACTUAL RATE CY like that in a start routine in dataflow as we donot get them from source systems.In our start routine,we have coding for
    ACT CY(Actual current year rate),BUD PY(Budget previous year rate),BUD CY(Budget current year rate),.....but now my user wants to see one new rate....its like he wants to see present months data in previous year same months rate....or any month he choose in present year with previous year same months rate...
    he wants to see May 2010 data in May 2009 monthly rate..april 2010 data in april 2009 rate.....in our BW...we have one DSO where all monthly rates are stored for all years...like if we take year 2009..they will have monthly rates also stored in it from januari to december....
    How can I write a code that calculates this new rate.....and how can I accomodate this new rate code in existing start routine....
    Thanks in advance....

    Hi,
    From my limited undersatnding of the requirement, it appears that the monthly rates (for current & previous years) are already being successfully calculated in the start routine. The requirement you have can be addressed in the frontend build (i.e. in query build).
    Hope this helps.

  • Interest rate calculation configuration & testing

    Dear experts
    How to configure &  calculate Interest on Banku2019s Balance from SAP. Also to know about provision to change the interest rate in between the period.

    Hi,
    BALANCE INTEREST INDICATOR   S
    INTERST CALICULATION GLOBAL SETTINGS:
    /NOB46     INTEREST INDICATORS
         DEFINE NUMBER RANGES FOR INTEREST FORMS          
    /NOB82     INTEREST ON AREARS CALCULATION          
    /NOBAA     PREPARE ACCOUNT BALANCE           
    /NOBAC     DEFINE INTEREST REFERENCE RATES               
    /NOB83     ENTER INTEREST VALUES                    
    /NOB81     DEFINE TERM BASED TERMS          
    INTEREST POSTINGS :
    /NOBV1     A/R CALICULATION OF INTEREST AREARS          
    /NOBV3     A/R BALANCE INTEREST CALICULATION          
    /NOBV4     A/P BALANCE INTEREST CALICULATION          
    /NOB84     ASSIGN FORMS FOR INTEREST INDICATORS          
    /NXK02     ASSIGN INTEREST INDICATOR (CHANGE VENDOR MASTER RECORD)
    /NF-02     POST LOAN RECEIPT TO VENDOR               
    /NF-44     EXECUTION OF INTEREST     ACCOUNTING-FA-AP-PERIODIC PROCESSING-
             INTEREST CALICULATION BALANCES
    /NF-44     POSTING OF INTEREST           ACCOUNTING-FA-AP-PERIOD PROCESSING-
    CALICULATION (VENDOR)      INTEREST CALICULATION-F-44 BALANCE
    /NF-24     EXECUTE ITEM INTEREST              ACCOUNTING-FA-AR-PERIODIC PROCESSING-
    CALCULATION ON CUSTOMER     INTEREST CALICULATION-ARREARS INTEREST CALICULATION
    /NF-47     EXECUTE ITEM INTEREST CALCULATION ON VENDOR     
    /NF-26          BALANCE POSTING OF INTEREST CALICULATION CUTOMER
    /NF-52     BALANCE POSTING OF INTEREST CALICULATION G/L
    Regards,
    Kishore K

Maybe you are looking for

  • How do I increase the width of the first column in the Terminal ls -l command?

    I am now running 10.9.x, but I've experienced the problem described in the question over the last several iterations of OS X. I use bash as my interactive shell. When I display the "ls -l" command in Terminal the output is often very difficult for me

  • Help! Javascript not working when object moved from one page to another!

    Hello all: I am new to Adobe Livecycle Designer (version 8.0). I have created a 3 page interactive pdf form with numerous objects (text fields, radio buttons, drop-down boxes, etc.), that our business wants to begin using soon. I am having difficulty

  • AttachMovie is shown on debugger but not on play

    I'm using the tutorial XML photo gallery with thumbnail from http://www.kirupa.com/developer/mx2004/thumbnails.htm I'v added code to deal when the image is not aviliable I attach a symbol with Text instead to the thumbnail and to the photo as well th

  • Where can I find JALOPY for JDeveloper 10.1.3?

    It's nice to see the release of 10.1.3, but I don't see any link pointing to Jalopy from "Check for Updates" menu option. Is that still supported/available? If so, please post a link here. Thanks

  • Error -43: a file could not be found

    Hello.  I'm trying to export an mov file from quicktime pro, but I keep getting this error everytime.  I have been able to do this export as of a few weeks ago, now it doesn't work. Error -43: a file could not be found I'm trying to export an mov to