Application Development and Automation 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:Ā 
Read only

Display Float-Data in SALV Table without Exponent

0 Likes
3,823

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
Read only

Former Member
0 Likes
2,030

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.

5 REPLIES 5
Read only

former_member212124
Active Participant
0 Likes
2,030

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

Read only

Former Member
0 Likes
2,031

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.

Read only

2,030

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

Read only

Former Member
0 Likes
2,030

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

Read only

0 Likes
1,294

Helped, thanks...the fm is CONVERSION_EXIT_DEC2_OUTPUT not conversation šŸ™‚