cancel
Showing results for 
Search instead for 
Did you mean: 

Currency format in Smartforms

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Answers (2)

Answers (2)

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi ,

thanks for your reply.

But i want to display 100000.00

as 1,00,000.00.

I want to have those commas.

How to do this .

Thanks in advance.

Vikki.

former_member585060
Active Contributor
0 Kudos

Hi,

Goto Menu

System>User Profile>Own Data

In that Defaults Tab,

Set Decimal Notation to 1,234,567.89

Now check the output

Regards

Bala Krishna

Former Member
0 Kudos

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.

Former Member
0 Kudos

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