Character format  to currency format conversion?

Hai,
I have a field (char16) with value in the form 9800.50. How do I convert it into standard SAP currency type ( of the format 9.800,50 ) Is there any function module available ?
I have tried the FM "CHAR_FLTP_CONVERSION". But it can't convert decimals (like 9800.50)
Kindly help me. Thanks in advance..
Deepak.

Hi,
Try this.
Call function 'BAPI_CURRENCY_CONV_TO_INTERNAL '
Exporting
currency = 'USD'
Amount External = V_Amount
Importing
Amount External = V_Amt
Reward if helpful.
Regards,
ramya

Similar Messages

  • Help needed to display character vaiable in currency format

    Hi Friends
    In a SAP Script I am passing a currency field to the subroutine as an i/p parameter and since it gets converted to character format in subroutine because of 'itcsy' , ihave deleted the trailing zeroes and decimal points from the field and performed calculations on the field, now i need to pass this char field back to SAP script but i need to display that field in currency format with commas and decimal points in the script...how do i do that???
    Thanks
    Vishal.

    Hi Vishal,
    When you pass the currency amount into the perform, no need to remove the trailing zeros and the decimal point.
    Only thing you need to remove is the comma seperator as it gives a runtime error during calculation.
    To convert it back to the format with comma, write the below command:
    WRITE v_Item_total currency '2' to v_item_char.
    CONDENSE v_item_char.
    Here v_item_total is a number which is converted to comma seperated number and passed to char variable.
    This char variable is then passed to the SCRIPT.
    regards,
    Gaurav.

  • Conversion of character field to currency format

    Hi All
    I am reading an excel file witch has a netwr amount fiels as character type ,  but when I try to update the field table netwr which is CURR data type the program dumps sayin it can not do that becuase of the format .
    is there any way of converting the character or string field into CURR and vice versa
    any help woul do
    Thanks.

    Hi
    Write this FM
    FUNCTION Z_CONV_CHAR_TO_DECIM.
    ""Local Interface:
    *"  IMPORTING
    *"     REFERENCE(I_NUMBER) TYPE  STRING
    *"     REFERENCE(I_CURRENCY) TYPE  WAERS_ISO
    *"  EXPORTING
    *"     VALUE(E_AMOUNT) TYPE  DEC_16_02_S
    *"     REFERENCE(E_AMOUNT_DISPLAY) TYPE  CHAR20
    *"     REFERENCE(E_NO_OF_DECIMALS) TYPE  INT_1
    *"     REFERENCE(E_MAX_NO_OF_DECIMALS) TYPE  INT_1
    *"  EXCEPTIONS
    *"      ERROR_IN_CONTENT
    *"      ERROR_IN_DECIMALS
      data: l_amt_1_s         type string.
      data: l_amt_2_s         type string.
      data: l_amt_1(30)       type c.
      data: l_amt_2(20)       type c.
      data: l_amt_3(20)       type c.
      data: l_amt_4(20)       type c.
      data: l_amt_1N(20)      type n.
      data: l_amt_2N(2)       type n.
      data: l_amount          type dmbtr.
      data: l_no_of_decimals  type i.
      e_max_no_of_decimals = 2.
      clear e_amount.
      split i_number
            at   ','
            into l_amt_1 l_amt_2.
      l_no_of_decimals = strlen( l_amt_2 ).
      e_no_of_decimals = l_no_of_decimals.
      REPLACE ' ' WITH '0' INTO l_amt_2.
      do.
        split l_amt_1 at '.'
              into l_amt_3
                   l_amt_4.
        if l_amt_4 = space.
          exit.
        endif.
        concatenate l_amt_3 l_amt_4 into l_amt_1.
      enddo.
      if l_amt_1 co '-0123456789 '.
      else.
        raise error_in_content.
      endif.
      if l_amt_2 co '-0123456789 '.
      else.
        raise error_in_content.
      endif.
      if l_amt_1 = '-'.
        l_amt_1 = '-0'.
      endif.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = l_amt_1
        IMPORTING
          OUTPUT = l_amt_1n.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          INPUT  = l_amt_2(2)
        IMPORTING
          OUTPUT = l_amt_2n.
      e_amount = l_amt_1n.
      do l_no_of_decimals times.
        e_amount = e_amount * 10.
      enddo.
      if l_amt_1 cs '-'.
        e_amount = e_amount - l_amt_2n.
      else.
        e_amount = e_amount + l_amt_2n.
      endif.
      e_amount = e_amount / 100  .
      write e_amount to e_amount_display
            decimals l_no_of_decimals.
    ENDFUNCTION.
    REGARDS.

  • Character  type to currency type conversion

    hi all,
    i need to transfer the character type data to the currency type data.
    my requirement is when i am trying to transfer the data from excel i need to store it as a character. again i need to change the same as currency. any pointers will be highly appriciated.
    thanks.

    Hi use the belwo function module and first move the currecy field to character..and inthe out put table decclare field as character 20 ..and download the field..
    hope will works..
    Amount to string:
    CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
      EXPORTING
        betrg                         = w_curerency          "currency field
        WAERS                         = 'DKK'
    IMPORTING
       STRING                        =  slam          .    "Output table field type char20
    String to amount:
    CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
      EXPORTING
        string                    = slam2             "character field
        DECIMAL_SEPARATOR         = '.'
      THOUSANDS_SEPARATOR       =
        WAERS                     = 'HUF'
    IMPORTING
       BETRG                     = b2 .        "converting into currency field
    Prabhudas

  • How to get currency format using pl sql function

    Hi all,
    I am a newbee on the forum. currently i am facing an issue with the Format of Currency in an rdf report. This is a field of tax amount & i need to make some conditional formatting on this like if the tax amount is Zero then some static note is to be added before this field.
    I have tried a lot of functions on it like the one as below:
    IF :cp_org_id = 102
    AND :invoice_currency_code <> 'CAD'
    AND TO_CHAR (NVL (:cf_tax_amount, 0)) = 0
    THEN
    RETURN (TRUE);
    ELSE
    RETURN (FALSE);
    This is working fine in case of Zero tax amount But gets error out when there some Tax amount exists. It gives a VALUE ERROR in this format Trigger.
    Kindly suggest me how to solve this issue with right function. If possible then write the pseudo Code also.
    Thanks in advance
    D_Verma

    In addition to Satyaki:
    It might be a 'Reports Thing'.
    It works in SQL*Plus (although relying on implicit conversions is a bad idea, as mentioned):
    MHO%xe> begin
      2  IF 102 = 102
      3  AND 'DAC' != 'CAD'
      4  AND TO_CHAR (NVL (null, 0)) = 0
      5  THEN
      6  dbms_output.put_line('TRUE');
      7  ELSE
      8  dbms_output.put_line('FALSE');
      9  end if;
    10  end;
    11  /
    TRUE
    PL/SQL-procedure is geslaagd.
    MHO%xe> begin
      2  IF 102 = 102
      3  AND 'DAC' != 'CAD'
      4  AND TO_CHAR (NVL (0, 0)) = 0
      5  THEN
      6  dbms_output.put_line('TRUE');
      7  ELSE
      8  dbms_output.put_line('FALSE');
      9  end if;
    10  end;
    11  /
    TRUE
    PL/SQL-procedure is geslaagd.
    MHO%xe> begin
      2  IF 102 = 102
      3  AND 'DAC' != 'CAD'
      4  AND TO_CHAR (NVL ('0', '0')) = '0'
      5  THEN
      6  dbms_output.put_line('TRUE');
      7  ELSE
      8  dbms_output.put_line('FALSE');
      9  end if;
    10  end;
    11  /
    TRUE
    PL/SQL-procedure is geslaagd.

  • Currency format problem while exporting as excel

    Hi
    I have to create a report for which the currency format should be $#,##0.00 and -$#,##0.00 for negative numbers.
    In the text form field of rtf template, I have selected number format and removed the portion ;($#,##0.00) from $#,##0.00;($#,##0.00).When I view the report as HTML the numbers are showing in proper format.($#,##0.00 or -$#,##0.00).But when the report is exported as excel ,the negative number format changes to ($#,##0.00) in red color.
    Can anyone tell me how avoid this problem?
    Thanks in advance
    Naveen

    I think this is an Excel issue - you can right mouse click in Excel the column header and "Format Cells&gt;Text"
    You could also append a ' character to your numbers in BI Answers ie: '6035784010491980 which should give you the correct format in Excel.
    eg. CONCAT( '''', CAST ( '6035784010491980 AS CHAR) )
    There is also an MS Office plug in available for OBIEE this may give you further options.

  • Currency formate.

    Hi
    Good day experts,
    I've problem with Currency formate. In my client 101 i've 1,234,567.89   in Owndata.
    But Functional side they've 1,234,567.89 in 103 client.
    My problem is when the functional guys is entered data in currency field. if they double click in the currency field, they r getting extraa zeros and if they entered end of the position which is right then the digits are not allowing .
    I've taken the data element which is 14 lenght of char. in this i've written the conversions for curr.
    This is my conversions:
    CONVERSION_EXIT_YMXAM_OUTPUT
    DATA LV_16(16).
      IF INPUT EQ SPACE.
        LV_16 = '0.00'.
        SHIFT LV_16 RIGHT DELETING TRAILING SPACE.
        OUTPUT = LV_16.
      ELSE.
        OUTPUT = INPUT.
      ENDIF.
    CONVERSION_EXIT_YMXAM_INPUT:
    DATA LV_AMNT     TYPE YBET00.
      PERFORM TEXT_TO_NUM
                  CHANGING
                      INPUT.
    SHIFT input LEFT DELETING LEADING space.
      CATCH SYSTEM-EXCEPTIONS CONVT_NO_NUMBER    = 1
                              CONVT_OVERFLOW     = 2
                              BCD_FIELD_OVERFLOW = 3.
        LV_AMNT = INPUT.
      ENDCATCH.
      IF     SY-SUBRC = 1.
        MESSAGE 'Invalid Format' TYPE 'E'.
      ELSEIF SY-SUBRC = 2 OR SY-SUBRC = 3.
        MESSAGE 'Number contains too many digits' TYPE 'E'.
      ENDIF.
    WRITE lv_amnt TO output(17).
      OUTPUT(14) = LV_AMNT .
       MESSAGE output TYPE 'E'.
    SHIFT output(18) RIGHT DELETING TRAILING space.
    ENDFUNCTION.
    *&      Form  text_to_num
    FORM TEXT_TO_NUM CHANGING VALUE(IV_FLD) TYPE C.
      DATA LV_DCPFM TYPE XUDCPFM.
      SELECT SINGLE DCPFM INTO LV_DCPFM FROM USR01 WHERE BNAME = SY-UNAME.
      CASE LV_DCPFM.
        WHEN ' '.
          TRANSLATE IV_FLD USING '. '.
        WHEN 'X'.
          TRANSLATE IV_FLD USING ', '.
        WHEN 'Y'.
          TRANSLATE IV_FLD USING '. '.
      ENDCASE.
      CONDENSE IV_FLD NO-GAPS.
    Plz give me solution.
    regards,
    kk

    Hi,
    Thank for ur reply. Caa2 t.code, i've created the finance subscree. in the subcreen, i'vecurrency field which is Char(14).it extras the data from  CI_FKKVKP stracture.
    Wht i've to do for this problem.
    regards
    kk

  • Hello All, an urgent issue:- Currency Format

    Hello All,
    I created one program which download & printed the report after selecting the correspondence Radio button.
    While I am downloading the file on local system it will download as .txt file format & while I select the radio button “printed report” it will do it for correspondence invoice number.
    My issue is.
    In output I have few currency values in diff field. Now User want those value should come in this format (1.000.000,00) every time.
    So is there any function module which can convert the currency value format which user want? Or do I have to do some coding, if yes then what it should be.
    Because here user want whatever system format should be but value come in that format only in both condition either downloading the file or printed one.

    Sonu,
    Try with below example.
    Currency Conversion:
    Use the function module
    CONVERT_TO_LOCAL_CURRENCY
    Writing currency amount to string without thousands seperator
    This is usefull e.g. i connection with batch input/call transaction.
    GI_OUTPUT-WRBTR: Field type Currency with amount
    L_AMOUNT_STRING: Field type c with amount
    PERFORM AMOUNT_TO_STRING USING GI_OUTPUT-WRBTR
    CHANGING L_AMOUNT_STRING.
    FORM AMOUNT_TO_STRING USING P_AMOUNT
    CHANGING P_AMOUNT_STRING.
    DATA L_SEP(1) TYPE C.
    PERFORM GET_THOUSAND_SEPERATOR USING L_SEP.
    WRITE P_AMOUNT TO P_AMOUNT_STRING.
    REPLACE L_SEP WITH ' ' INTO P_AMOUNT_STRING.
    CONDENSE P_AMOUNT_STRING NO-GAPS.
    WRITE P_AMOUNT_STRING TO P_AMOUNT_STRING RIGHT-JUSTIFIED.
    ENDFORM.
    FORM GET_THOUSAND_SEPERATOR USING P_SEP.
    DATA: L_AMOUNT LIKE BSEG-DMBTR,
    L_AMOUNT_STRING(15) TYPE C.
    Find 1000 seperator. If decimal seperator = . then
    1000 seperator = , else 1000 seperator = .
    L_AMOUNT = '1.00'.
    WRITE L_AMOUNT TO L_AMOUNT_STRING.
    IF L_AMOUNT_STRING CS ','.
    P_SEP = '.'.
    ELSE.
    P_SEP = ','.
    ENDIF.
    ENDFORM.
    Convert amount to/from string
    CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
    EXPORTING
    betrg = 3000
    WAERS = 'DKK'
    NEW_DECIMAL_SEPARATOR =
    NEW_THOUSANDS_SEPARATOR =
    IMPORTING
    STRING = slam
    CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
    EXPORTING
    string = slam2
    DECIMAL_SEPARATOR = '.'
    THOUSANDS_SEPARATOR =
    WAERS = 'HUF'
    IMPORTING
    BETRG = b2
    EXCEPTIONS
    CONVERT_ERROR = 1
    OTHERS = 2
    Language depending formatting
    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.
    E.G.
    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
    To format the decimal and thousand sepearators according to the settings for
    a specific country,
    use the statement SET COUNTRY <country key>
    Settings for countries are defined in table T005 Countries.
    The country key used in the statement is field LAND1
    E.g.
    set country 'US'
    Don't forget to reward if useful....

  • Currency format masking

    Is it possible to Mask a textfield numeric entry into locale specific currency
    mormat.
    I have tried it with <netui:formatNumber> tag ,but it is not giving the right
    result.
    Say if i enter 123457678 in a textfield ,it has to be formatted in UK format i.e,1,23,45,678
    How can it be done

    I think you will need to do the formatting in javascript. The formatNumber
    tag does not support the varying number of digits between commas. The
    formatString handles arbitrary string formats but it works left to right and
    so it isn't good for numbers.
    "Mr.Federal" <[email protected]> wrote in message
    news:[email protected]...
    >
    ok
    is it possible to format a number as follows
    1,23,45,67,890.89
    "John Rohrlich" <[email protected]> wrote:
    The problem is that the double has been formatted into a String of the
    form
    $12.34 and this is POSTed back into a double type.Without unformatting
    the $
    off the currency, this won't convert into a Java double type. That's
    why
    type conversion is failing. Unfortunately there is no support to unformat
    this string before POSTing back.
    - john
    "Mr.Federal" <[email protected]> wrote in message
    news:[email protected]...
    Thanks john,
    Can i format a textfield entry using
    <netui:formatNumber country="GB" type="currency" language="en"/>
    I have tried it,but while submitting the page ,it displays the
    following
    error
    []: NetUI Warning: Unable to update expression"{pageFlow.bsImpl.balanceSheet[0][26].amount}".
    The typical cause is that the object represented by the expressionis not
    available
    or is the wrong type for updating. Cause:com.bea.wlw.netui.script.ExpressionUpdateException:
    Exception when attempting to update the expression"{pageFlow.bsImpl.balanceSheet[0][26].amount}"
    with available binding contexts [actionForm, pageFlow, globalApp].Root
    cause:
    com.bea.wlw.netui.script.IllegalExpressionException: The type "double"can
    not
    be set through XScript.
    could u help me to figure it out ?
    "John Rohrlich" <[email protected]> wrote:
    Here is how you can get a UK format for currency but I'm not sure
    if
    that is
    the problem you are trying to solve. Let me know.
    <netui:label value="12345678">
    <netui:formatNumber country="GB" type="currency"language="en"/>
    </netui:label>
    Here is the result
    £12,345,678.00
    - john
    "Mr.Federal" <[email protected]> wrote in message
    news:[email protected]...
    Is it possible to Mask a textfield numeric entry into locale
    specific
    currency
    mormat.
    I have tried it with <netui:formatNumber> tag ,but it is not givingthe
    right
    result.
    Say if i enter 123457678 in a textfield ,it has to be formatted
    in
    UK
    format i.e,1,23,45,678
    How can it be done

  • Currencies Formating and Validations

    hi All,
    I'm using ADF BC, JDev11g, Window XP, IE7.
    My use case:
    I'm having a table which has details in first facet, in the second facet there is a form which displays the contents of selected row in a form. In this form there are few fields like Currency and Local Currency. Once i enter the currency and tab out it should format into the form like US format or Indian Format. Also display the equivalent of the number in the local currency field.
    Here my Currency is USD and Local Currency is Indian Rupee. How can i achieve this condition?
    Also what are the supported formats for currency in ADF BC.
    All inputs are useful and would be appreciated,
    Thanks In Advance,
    -Jyothi

    Please give some suggestion. Its very important to make that validation and conversion.
    -Jyothi

  • Currency formats

    Hi,
    I have currency saved as character string.
    Example . In user settings- currency format is space. So it should be displayed to user as 1.234.567,89. If currency format is 'X' it should be displayed to user as 1,234,567.89 or if currency format is Y, it should be displayed to user as
    1 234 567,89.
    Now i am getting currency values as a chatracter string always. i.e for example, i am always getting it in format
    1111111111.00.
    Now when i display this amount to user, it should be displayed as per format in user settings. How to do this.
    <REMOVED BY MODERATOR>
    Regards
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 3:45 PM

    instead of write .. use  move ..  and
    lf_val = '200.05'  <-- should be in this format .. if there is any comma , it
    will dump ...
    move lf_val to lf_curr.
    Write your coding as :
    data: lf_val type string,
            lf_curr type p decimals 2,
            lf_str(20).
    lf_val = '2000000.05'.
    move lf_val to lf_curr.
    write lf_curr to lf_str.
    write :/ lf_str.
    Edited by: Srinivas Gurram Reddy on Mar 10, 2008 8:40 PM

  • In Scripts how to print the values in currence format

    Dear abap guru's,
    I am working on Purchase Order Script, copy from the standard script, after that wrote a one perform , in that added one new field to script, but value is printed like this formate : 1000.00, but i want to print 1,000.00 like this currence format. let me know the any solution
    thanks to all
    raj.

    Hi ,
    When you are populating the value in perform instead of assigning the value (using = ) pass it using WRITE TO.
    Like :  WRITE lw_total TO output-value.
    Declare lw_total as currency field.
    Regards,
    Rajitha.

  • Currency format in LAC

    Hi,
    We are working with LAC, and we have an issue.
    When we create an auction in SRM the currency format for the start price and the others is 1,234,567.89 (this is correct for us), but when we execute the applet (LAC) the format change 1.234.567,89
    The user in SRM has the correct format 1,234,567.89 then, Why in the applet the format is different????
    How can we change the format????
    We are working with EP then, we execute the transaction  bbp_auction since a Portal iview. Our single sign On between LAC and Portal was configurated, then we guess, we need to change the currency or number format in the Portal User, Is that correct?????
    What user do we need to change (currency format)????   SRM user????  Portal user???? LAC user????
    Thanks

    Hi Claudia,
    Check the following note :
    Note 666849 - Running LAC in non-US locales
    This may help you.
    Thanks,
    Pradeep.

  • Formatting a currency in different format for 2 company codes

    Hi,
    I have two company codes(MCFL and MIL) in Indian project, now my requirement is to maintain different currency format which means company code specific.
    In PO print I wanted to show as different format.
    Is it possible to do setting in customizing level.
    Regards,
    Vadamalai A

    Hi,
       You can set the decimal notation format at user level. Go to Su3 - Defaults tab and maintain the format at user level.
        If you want different format in printout, then you need to put the logic in the smartform only, to validate the country and pout the corresponding format.
        Revert back if your question is different.
    Regards,
    AKPT

  • How to use currency format set

    Hi All,
    I have to use currency format set to mask the amount values to their respective currencies ,
    i reviewed the Oracle XML Publisher Administration and Developer's Guide and followed all the steps mentioned there ,i m also quoting the same over here
    To define a Currency Format Set:
    1. Navigate to the Currencies page under the Administration tab. Select Create
    Currency Format Set.
    2. Enter a Name and a Code for the set. The Code is a unique identifier and cannot be
    changed later. Select Apply.
    3. The Currency Formats page will display for your newly created set.
    To add currency formats to the Currency Format Set:
    1. Select Add Currency Format to add a format to your set.
    2. Select a Currency Name from the list.
    Note: This list is generated from the FND currency table and
    should include all ISO currencies. Additional currencies can be
    added from the System Administrator responsibility.
    3. Enter the Format Mask you wish to use for this currency and select Apply.
    The Format Mask must be in the Oracle number format. The Oracle number format
    uses the components "9", "0", "D", and "G" to compose the format, for example:
    9G999D00 where
    9 represents a displayed number only if present in data
    G represents the group separator
    D represents the decimal separator
    0 represents an explicitly displayed number regardless of incoming data
    See Using the Oracle Format Mask, Oracle XML Publisher Report Designer's Guide for
    more information about these format mask components.
    After a currency format has been created, you can update or delete it from the Currency
    Formats page.
    i followed all the above step ,i need to use germany currency ,i have also used the format-currency command in my RTF template,but still its not working ,i used 9G999D00 for masking .
    Any hint would be very helpful ,thanks in advance .Please let me know if my question is not clear
    Thanks
    Pratap

    hi all
    Thanks ,this is resolved ,i just missed clearing cache ,after clearing the cache its working .
    thanks
    Pratap

Maybe you are looking for

  • Action buttons are missing at UWL

    Hi All, If I have a workflow decision task and I want to approve it from Portal, what all config is required from Portal end. I can not find any decision action buttons which are visible at SAP inbox. Kindly suggest. Regards Devraj

  • Inheritance Modelling Design

    Hi, there. I'm a newbie here. I've just finished installing my Oracle Designer and now I've got a trouble in Designing Inheritance Object. I still don't know yet how to design an inheritance object using Oracle Designer. I'd tried using a Reverse Eng

  • RG23C Update Problem

    Dear all when  register extract for RG23C Part-1, display two line items instead of one, The following process is followed for capital goods 1. Purchase order for capital good  me21n 2. Good receipt Migo (Capturing excise duty) 3. J2I5 & J2I6 pls hel

  • RE: Selective State change of ArrayField

    > [Pascal Rottier] Thanks for sending me the technote, but look at the part I cut out of this technote and placed at the bottom of this message. It kind of proves my point. You can change a single cell's color, but not it's state. Hence, you can't ma

  • URL Rewriting & Mozilla

    I've noticed some functional changes between SJSAS 8 Update 1 and SJSAS 8 2004Q4 Beta regarding use of URL rewriting in webapps. Our servlet explicitly disables cookies in preference for URL rewriting. In SJSAS8-Update1, as for every other app server