Skip to Content
0
Former Member
Nov 28, 2006 at 03:17 AM

Converting ALV Column to numbers with 2 decimal places and comma

385 Views

Hi everyone. Can someone help me on how I can convert this column to numbers with 2 decimal places and comma? I have attached my sample code but I don't think it's working because everytime the grid displays, the amounts are in text format. Thanks in advance. 😀

FORM f_fieldcat_init USING rt_fieldcat TYPE slis_t_fieldcat_alv.

DATA: ls_fieldcat TYPE slis_fieldcat_alv.

CLEAR ls_fieldcat.

ls_fieldcat-col_pos = 4.

ls_fieldcat-reptext_ddic = ' Basic Salary'.

ls_fieldcat-fieldname = 'BASIC'.

ls_fieldcat-currency = 'X'.

ls_fieldcat-decimals_out = 2.

ls_fieldcat-ref_tabname = 'ITAB'.

ls_fieldcat-outputlen = 20.

APPEND ls_fieldcat TO rt_fieldcat.

Regards,

Anna