Skip to Content
author's profile photo Former Member
Former Member

Fuction Module

Hi,

Is there any functional module to convert char number to currency text like below example.

x = 12345678.00 change to 12,345,678.00

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 07:10 AM

    Hi,

    Use FM HRCM_STRING_TO_AMOUNT_CONVERT

    pass the char(amount) and decimal separator, thousand separator.

    you get the char converted to amount/currency.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      hi,

      here are few function modules related to currency:

      CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC format

      CONVERT_TO_LOCAL_CURRENCY - Conversion of currency

      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

      Example 1: Convert amount to/from string

      Amount to string:

      CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'

      EXPORTING

      betrg = 3000

      WAERS = 'DKK'

      • NEW_DECIMAL_SEPARATOR =

      • NEW_THOUSANDS_SEPARATOR =

      IMPORTING

      STRING = slam

      .

      String to amount:

      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

      plz reward if useful..

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 07:12 AM

    You can use the FM ISM_CONVERT_CHAR_TO_CURR or BAPI BAPI_CURRENCY_CONV_TO_INTERNAL.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 07:14 AM

    Hi,

    U can use this code

    CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'

    EXPORTING DATE = BKPF-WWERT

    FOREIGN_CURRENCY = BKPF-WAERS

    LOCAL_CURRENCY = T001-WAERS

    FOREIGN_AMOUNT = BSEG-WRBTR

    RATE = BKPF-KURSF

    TYPE_OF_RATE = 'M'

    IMPORTING EXCHANGE_RATE = KURS

    LOCAL_AMOUNT = BSEG-DMBTR

    FOREIGN_FACTOR = FAKTOR-F

    LOCAL_FACTOR = FAKTOR-L

    FIXED_RATE = FIXKURS

    EXCEPTIONS NO_RATE_FOUND = 4

    NO_FACTORS_FOUND = 8.

    Plzz reward points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.