cancel
Showing results for 
Search instead for 
Did you mean: 

How to format table column values to currency?

Former Member
0 Kudos

All,

I have bound a context attribute (type - string) to a table column (TextView) which is used to display currency.

It displays the value as 123456789.00

How do I format the value as 123,456,789.00?

Is there any FM available to format?

I don't want to change the above context attribute type to CURR.

Thanks

Thruna

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>I don't want to change the above context attribute type to CURR.

Why not? That is the correct thing to do. That way you get formatting, sorting, even the correct decimal position and notation for different currencies and user settings.

If you must go with string for the context attribute then I still assume your source data is type CURR. When you 'move' this content into the string of the context attribute use the WRITE statement. This will format the currency variable for output.

Former Member
0 Kudos

Thomas,

Thanks.

It worked well with WRITE.

Thruna

former_member199125
Active Contributor
0 Kudos

hi thruna,

could you please give the coding of moving data to context using write operation.

Former Member
0 Kudos

WRITE lv_i TO lv_string.

Answers (0)