Convert amount in % to USD

Hi
In the pricing conditions data (billing document), if the amount is given in %, then how to convert to USD.
For example - Royalties, Freight charges.
Thanks
satish

Calculate the % amount in total amount and convert into USD using Funciton module  CONVERT_TO_LOCAL_CURRENCY.
Example code
CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
            EXPORTING
              CLIENT           = SY-MANDT
              DATE             = W_VBRK_VBRP-ERDAT
              FOREIGN_AMOUNT   = W_VBRK_VBRP-NETWR
              FOREIGN_CURRENCY = W_VBRK_VBRP-WAERK
              LOCAL_CURRENCY   = 'USD'
              RATE             = 0
              TYPE_OF_RATE     = 'M'
              READ_TCURR       = 'X'
            IMPORTING
              LOCAL_AMOUNT     = W_FINAL-NETWR_USD
            EXCEPTIONS
              NO_RATE_FOUND    = 1
              OVERFLOW         = 2
              NO_FACTORS_FOUND = 3
              NO_SPREAD_FOUND  = 4
              DERIVED_2_TIMES  = 5
              OTHERS           = 6.
Thanks,
Ajay
Edited by: Ajay kumar on Aug 18, 2009 8:51 AM

Similar Messages

  • Function Module to convert  amount to  amount in words

    Dear Guru ,
    I want to know is there any sap standard Function Module to convert  amount value   to  amount in words
    Thanks & Regards

    Hi..
    Use FM SPELL_AMOUNT.
    This function module converts an amount or number into words. It can be used as follows:
    Convert a number into words
    To do this, the transfer parameters LANGUAGE and AMOUNT have to be entered.
    Convert an amount into words
    To do this, the fields LANGUAGE, CURRENCY, and AMOUNT have to be entered.
    Program RF_SPELL contains a sample call of the function module. You can use it for test purposes.
    REPORT ZSPELL.
    TABLES SPELL.
    DATA : T_SPELL LIKE SPELL OCCURS 0 WITH HEADER LINE.
    DATA : PAMOUNT LIKE SPELL-NUMBER  VALUE '1234510'.
    SY-TITLE = 'SPELLING NUMBER'.
    PERFORM SPELL_AMOUNT USING PAMOUNT 'USD'.
    WRITE: 'NUMBERS', T_SPELL-WORD, 'DECIMALS ', T_SPELL-DECWORD.
    FORM SPELL_AMOUNT USING PWRBTR PWAERS.
      CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                AMOUNT    = PAMOUNT
                CURRENCY  = PWAERS
                FILLER    = SPACE
                LANGUAGE  = 'E'
           IMPORTING
                IN_WORDS  = T_SPELL
           EXCEPTIONS
                NOT_FOUND = 1
                TOO_LARGE = 2
                OTHERS    = 3.
    ENDFORM.                               " SPELL_AMOUNT
    I hope it helps.
    Reward pts if helpful
    Regards
    - Rishika Bawa

  • FM to convert amount  from one currency to another currency?

    HI Experts
    is thier any Fucnction module to convert amount  from one currency to another currency?
    please help me.
    Thanks

    Hi,
    data: lv_foramt TYPE vbap-netpr VALUE 40,
          lv_forcurr TYPE string VALUE 'USD',
          lv_loccurr TYPE string VALUE 'INR',
          lv_locamt TYPE vbap-netpr.
    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
           EXPORTING
            CLIENT                  = SY-MANDT
             DATE                    = sy-datum
             FOREIGN_AMOUNT          = lv_foramt
             FOREIGN_CURRENCY        = lv_forcurr
             LOCAL_CURRENCY          = lv_loccurr
            RATE                    = 0
           TYPE_OF_RATE            = 'M'
            READ_TCURR              = 'X'
          IMPORTING
    *        EXCHANGE_RATE           =
    *        FOREIGN_FACTOR          =
            LOCAL_AMOUNT            = lv_locamt
    *        LOCAL_FACTOR            =
    *        EXCHANGE_RATEX          =
    *        FIXED_RATE              =
    *        DERIVED_RATE_TYPE       =
          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.
         write:/ lv_locamt.
    P.S. Please test your FM in SE37. When I tested, it worked only between USD and INR.

  • Convert amount to word

    Hi
    I come to this problem using the FM <b>"SPELL_AMOUNT"</b>
    , everything look fine except that it does not know how to convert cents
    E.g <b>1300</b> or <b>1,300</b> convert to "ONE THOUSAND THREE HUNDRED". But when it come to cents it does not know how to convert . E.g : <b>1300.35</b> or <b>1,300.35</b> become "ONE HUNDRED THIRTY THOUSAND THIRTY-FIVE"
    Does anyone know how to resolve this problem.

    Hi Dan.
    Test with this example:
    data: int_val type i,
          cent_val type p decimals 2,
          val type p decimals 2,
          IN_WORDS like spell,
          SPELL_VAL(255) type c,
          SPELL_CENT(255) type c.
    int_val = trunc( val ).
    cent_val = ( val - int_val ) * 100.
    CALL FUNCTION 'SPELL_AMOUNT'
      EXPORTING
       AMOUNT          = val
       CURRENCY        = 'USD'
       LANGUAGE        = SY-LANGU
      IMPORTING
       IN_WORDS        = IN_WORDS.
      SPELL_VAL = IN_WORDS-WORD.
    CALL FUNCTION 'SPELL_AMOUNT'
       EXPORTING
        AMOUNT          = cent_val
        CURRENCY        = 'USD'
        LANGUAGE        = SY-LANGU
       IMPORTING
        IN_WORDS        = IN_WORDS.
       SPELL_CENT = IN_WORDS-WORD.
      CONCATENATE SPELL_VAL ' DOLAR ' SPELL_CENT ' CENTS ' INTO SPELL_VAL.
    Thanks & Regards,
    Jhon.

  • Convert Amount to different format

    Hi,
    Please help me know a the FM to convert data in the following way
    i/p:  2510.15
    o/p:+00000000251015
    i/p: -12.45
    o/p:+00000000124500
    Thanks & Regards
    ChK

    Hi Harsha,
    CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC format
    CONVERT_TO_LOCAL_CURRENCY  - Conversion of currency
    HRCM_AMOUNT_TO_STRING_CONVERT - Convert amount to string
    HRCM_STRING_TO_AMOUNT_CONVERT - Convert amount from string
    CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all
    character fields), not right justifed as numbers normally are.
    CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
    CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
    Another as per your Requirement...
    Language Dependent Formatting of Amount and Currency
    To format a currency amount with decimals according to the currency use WRITE and the CURRENCY option.
    Currency keys an d numbers of decimals are defined in table TCURX Decimal Places in Currencies.
    Example 1: Formatting an amount in Kuwatian Dinars:
    Dmbtr = 123456.
    Write dmbtr currency 'KUD'
    123.456
    Write dmbtr currency 'USD'
    1234.56
    Note that the formatting does not depend on the number of decimals in the number in the program.
    Dmbtr = '12.3456'.
    Write dmbtr currency 'USD'
    1234.56
    Regards,
    Prabhudas

  • Error in converting exchange rate from USD to INR

    Dear Experts,
    My client is Export Business & when he is creating sales documents the system gives the error as:
    Condition VPRS: Error in converting exchange rate from USD to INR
    Message no. V1208
    Diagnosis
    An error has occurred during currency conversion.
    The following causes are possible:
    There is no valid exchange rate
    The calculation procedure was incorrect
    Procedure
    Check whether there is a valid exchange rate from VPRS to USD in Customizing, in the chapter "Define conversion factors for currency conversion", and supplement it as necessary.
    If you do not have the authorization to do this yourself, contact your system administrator.
    so expecting the solution for the same
    Thanks & Regards,
    SPT

    Hi,
    you have to maintain conversion rate from USD to INR in FI, img, sap netweaver, general setting,currencies, currency conversion rates
    maintain conversion rate and revert back
    regards,
    sadanandam kasarla
    Edited by: Sadanandam Kasarla on Mar 5, 2009 11:20 AM

  • How to convert amount which is in text to numeric..

    Hi all,
    Can anyone tell me how to convert amount which is in text to numeric..
    i am having the value as ' three hundred '
    it has to be converted to numeric as 300.
    ofcourse its surprising ...but required
    Any help will be greatful.
    rgds,
    raj

    hi Ravi,
    Check out <b>PSSV_TEXT_INTO_FIELD_CURRENCY</b> FM
    Regards,
    Santosh

  • How to convert Amount which is in figure to words

    How to convert Amount which is in figure to words like :
    Rs 1005.70   into   'Rupees One Thousand Five and 70 Paise'
    Thanks
    kumar n

    hiii
    use FM
    SPELL_AMOUNT
    WA_AMOUNT = '10000'.
    CALL FUNCTION 'SPELL_AMOUNT'
           EXPORTING
                AMOUNT    = WA_AMOUNT
                CURRENCY  = PWAERS
                FILLER    = SPACE
                LANGUAGE  = 'E'
           IMPORTING
                IN_WORDS  = WA_SPELL
           EXCEPTIONS
                NOT_FOUND = 1
                TOO_LARGE = 2
                OTHERS    = 3.
    regards
    twinkal

  • Reg: Convert amount in values to amount in words

    Dear All,
    Want to convert amount value into words and it will displays on UDF which is created in Marketing document. How can i do that.
    Plese help me
    Thanks & Regards
    Venkatesh N

    Hi,
    Check Re: Amount in Words in INR for solution.
    Create function in SQL and then apply FMS to get that function in udf.
    Thanks,
    Neetu

  • Convert amount in no's to words

    hi sapiens,
                 I need a code or Fm to convert amount in numbers to words
    eg) 1500 --->  one thousand and five hundred

    Hi,
    Use FM SPELL_AMOUNT
    Pass the below value only
    Import parameters               Value
    AMOUNT                          1234
    CURRENCY
    FILLER
    LANGUAGE                        EN
    Export parameters               Value
    IN_WORDS                           000000000001234000 0 ONE THOUSAND TWO HUNDRED THIRTY-FOUR
    Regards
    Shiva

  • How to convert amount data element to number data element

    Dear Gurus,
    I have a requirement to get the data by calling BRF+ and then pass them to BAPI 'BAPI_ASSET_ACQUISITION_POST', in the BRF+ export structure, there is a field 'AMOUNT', I bind it to DDIC element 'BF_ANBTR', the type is Number.
    In BRF+, I call another global function to calculate the value, I define a local variant LV_VALUE to get export value from this function, this local variant's type is Amount, now I need to move this local variant value to the export field 'AMOUNT'.
    But BRF+ doesn't allow to convert amount data element to number data element directly, and I find there is no formula function available. Only there is a function 'TO_AMOUNT' to convert number data element to amount data element.
    Please help to get a solution for above solution.
    Thanks.

    Hi,
    within the formula expression within the category "Mathematical functions" you will find the function "TONUMBER". This converts a data element of type currency to a number. According to the help of this function:
    "The following conversion rules apply:
    <Amount>: The number part is returned. The currency unit is omitted."
    This is what you are looking for.
    For the other way round you already mentioned the correct function "TO_AMOUNT"
    BR
    Christian

  • Convert amount from flat file format to user format

    hi,
    how to convert amount from flat file format to user specific format.
    input:  1000.00
    output: 1.000,00 (user specific)
    thanks in advance

    move that value to a type WRBTR variable
    and use write statement.
    data v_wrbtr type wrbtr.
    data v_char(20).
    v_wrbtr = 1000.
    write v_wrbtr to v_char.
    v_char will contain the amount in user format.
    Prerequsite, go to SU3 transaction.
    Defaults tab, chose the decimal notation .
    Regards,
    Ravi

  • (v urgent) converting amount in figures to amount in words ina spec languag

    Hi All,
               I have a requirement like i need to convert amount i n figures to amount in words, and that too for a specific language (eg., portuguese and not english) . This needs to be done in the SAPSCRIPT and not in the program as the program is a standard one.
    Please help me out as it is v urgent.
    Regards,
    Priya

    Use FM
    HR_IN_CHG_INR_WRDS
    Award points if answer is useful
    tc
    saji

  • Converting amount to words

    how can i convert amount to words using sql query
    eg : Rs 10234.50
    Ten Thousand Two Hundred Thirty Four Rupees Fifty Paise

    Perhaps the forum admin need to put the search box right next to the Create New Message button just so people get the idea that what they're asking for just may have been asked for previously by other people.As when creating a new SR in Metalink: Before posting you'll be asked to to search the bug db, knowledge base, technical forums ...etc ...
    Not really a bad idea actually ...

  • Convert amount to char

    Hi Experts,
           Here i have one question and that was how to convert amount like 345 into words like THREE HUNDRED FORTY FIVE.......
    Thanks,
    Natala

    Hi. Welcome to SDN! If you are asking how to do this using ABAP, then first you should know that  ABAP related questions should be asked in the ABAP forum.  This will provide you with quicker answers. 
    To answer your question you can use the function module SPELL_AMOUNT.  This will convert your number to words.
    For example.
    report  zrich_0004.
    data: i type i value '345'.
    data: words type spell.
    call function 'SPELL_AMOUNT'
      exporting
        amount          = i
    *   CURRENCY        = ' '
    *   FILLER          = ' '
        language        = sy-langu
      importing
        in_words        = words
    exceptions
       not_found       = 1
       too_large       = 2
       others          = 3.
    write:/ words-word.
    Again, welcome to SDN.
    Regards,
    Rich Heilman

Maybe you are looking for