Skip to Content
avatar image
Former Member

Currency format in Smartforms

Hi ,

In Smartforms i have to display the NETPR, NETWR ,MENGE fields in the following format........

1,00,000.00

Usually these fields will be shown as 100000.00

How to format these fields.

Is there any FM to do this.

Kindly let me know.

Vikki.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 18, 2008 at 12:55 AM

    Declare a local variable in Global definitions tab

    something like

    l_netpr type char20.

    before you display the amount field, in the program node

    WRITE <your amount field> TO l_netpr

    CURRENCY <currency field existing in the table>.

    CONDENSE l_netpr.

    print field l_netpr in the text node.

    this will display the amount in the format you need.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 09:19 AM

    HI,

    DATA:l_v_sep TYPE sy-batch,

    l_v_dec TYPE sy-batch,

    v_kzwi1 TYPE kzwi1.

    DATA:l_v_dis_temp TYPE char20,

    l_v_char2 TYPE char2,

    l_v_gross_sale TYPE char20.

    CONSTANTS:l_c_dot TYPE char1 VALUE '.',

    l_c_comma TYPE char1 VALUE ','.

    CALL FUNCTION 'CLSE_SELECT_USR01'

    EXPORTING

    username = sy-uname

    IMPORTING

    • X_USR01 =

    • DATE_FORMAT =

    decimal_sign = l_v_dec

    separator = l_v_sep .

    v_kzwi1 = '10000.00'.

    WRITE v_kzwi1 TO l_v_dis_temp.

    SPLIT l_v_dis_temp AT l_v_dec

    INTO l_v_gross_sale

    l_v_char2.

    CONDENSE l_v_char2.

    REPLACE ALL OCCURRENCES OF l_v_sep

    IN l_v_gross_sale

    WITH l_c_comma.

    CONCATENATE l_v_gross_sale

    l_v_char2

    INTO l_v_gross_sale

    SEPARATED BY l_c_dot.

    Regards

    Jana

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 17, 2008 at 10:23 AM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Bala Krishna

      Hi,

      The settings is with comma format only.

      I tried to use Currency_convert FM also.

      The amount value 100000.00 is not changing to 1,00,000.00.

      I am getting the data from a structure to populate the NETWR and NETPR fields.

      data from the Structure is 100000.00 format.

      is there any way to solve this.

      i tried FM CEVA_CONVERT_FLOAT_TO_CHAR .........this one just removes the value.

      Plz help me.

      Vikki.