In our development we often came across many situation where we need to convert floating value to char value for example to display the value at the output of ALV .
REPORT ztestr_2.
DATA : lv_value_from TYPE atflv VALUE '4.4000000000000000E+01',
lv_output TYPE cha_class_view-sollwert.
CLEAR : lv_output.
CALL FUNCTION 'QSS0_FLTP_TO_CHAR_CONVERSION'
EXPORTING
i_number_of_digits = 2
i_fltp_value = lv_value_from
i_screen_fieldlength = 16
IMPORTING
e_char_field = lv_output.
WRITE : / lv_output.
output : 44.00
NB : The exporting parameter ' i_number_of_digits ' determines the number of digits after decimal which are visible.
if you write i_number_of_digits = 1 ,
output will be 44.0
REPORT ztestr_2.
DATA : lv_value_from TYPE atflv VALUE '4.4000000000000000E+01',
lv_output TYPE cha_class_view-sollwert.
CLEAR : lv_output.
CALL FUNCTION 'QSS0_FLTP_TO_CHAR_CONVERSION'
EXPORTING
i_number_of_digits = 2
i_fltp_value = lv_value_from
i_screen_fieldlength = 16
IMPORTING
e_char_field = lv_output.
WRITE : / lv_output.
output : 44.00
NB : The exporting parameter ' i_number_of_digits ' determines the number of digits after decimal which are visible.
if you write i_number_of_digits = 1 ,
output will be 44.0
Thanks for this it has been useful
ReplyDeleteThanks for this it has been useful
ReplyDeleteI've used FUNCTION 'FLTP_CHAR_CONVERSION'
ReplyDeleteThank u!!
ReplyDeleteThank you for sharing the great blog. BEST SAP ABAP TRAINING IN HYDERABAD
ReplyDeleteGreat Post. The information provided is of great use as I got to learn new things. Keep Blogging.
ReplyDeleteSAP ABAP TRAINING IN HYDERABAD
Thanks, saved my life
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteSap Abap : How To Convert Floating Value ( 4.4000000000000000E+01 ) To Char Value ( 44 ) >>>>> Download Now
ReplyDelete>>>>> Download Full
Sap Abap : How To Convert Floating Value ( 4.4000000000000000E+01 ) To Char Value ( 44 ) >>>>> Download LINK
>>>>> Download Now
Sap Abap : How To Convert Floating Value ( 4.4000000000000000E+01 ) To Char Value ( 44 ) >>>>> Download Full
>>>>> Download LINK Uc