08-14-2014 9:06 AM
Hello,
I' looking for a method to display float-data in an CL_SALV_TABLE without the exponent.
My user can't live with values like "Work = 6.00E+01 and Work per week = 4.72E+00".
With the ALV Grid (cl_gui_alv_grid) you can modify the fieldcat to suppress the exponent (ls_fieldcat-Exponent = 0.).
But how I can suppress the exponent in the salv_table? I could not find an method in the CL_SALV_COLUMN.
Thank you very much for your help.
Best regards form Hanover/Germany
Armin
08-14-2014 9:43 AM
Hi,
You can try with method SET_DECFLOAT_STYLE of the class CL_SALV_COLUMN.
Try passing value '00' or '01' in it.
OR
You can try method SET_EDIT_MASK where a subroutine name has to be passed which is in your program. In the sub routine you can convert the float values to numeric.
08-14-2014 9:18 AM
Hi Armin,
I think this FM will help you to resolve that issue CEVA_CONVERT_FLOAT_TO_CHAR.
Refer this link for more Info:http://scn.sap.com/docs/DOC-43918
thanks,
vidyasagar
08-14-2014 9:43 AM
Hi,
You can try with method SET_DECFLOAT_STYLE of the class CL_SALV_COLUMN.
Try passing value '00' or '01' in it.
OR
You can try method SET_EDIT_MASK where a subroutine name has to be passed which is in your program. In the sub routine you can convert the float values to numeric.
08-15-2014 10:11 AM
Hi,
the SET_EDIT_MASK method was very helpfull.
It took me some time to find out that lr_column->set_edit_mask( '==DEC2' ) means use function CONVERSATION_EXIT_DEC2_OUTPUT for converting the numbers.
Best regards
Armin
08-14-2014 9:43 AM
Hi Armin,
Have you try with method SET_DECFLOAT_STYLE of class CL_SALV_COLUMN which set the property of column . SET_DECFLOAT_STYLE as 01 for normar display
Thanks & Regards,
Arun