Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Display Float-Data in SALV Table without Exponent

0 Kudos

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

1 ACCEPTED SOLUTION

former_member289261
Active Contributor
0 Kudos

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.

4 REPLIES 4

former_member212124
Active Participant
0 Kudos

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

former_member289261
Active Contributor
0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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