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

changing float to character in excel sheet

Former Member
0 Likes
1,698

hi experts,

i am facing problem in entering numeric value in excel sheet. when i enter material number it is taking as float value like i entered 101000000012 but it is taking as 1.01E+11.

i had used function module ALSM_EXCEL_TO_INTERNAL_TABLE for uploading data from excel sheet to int. table.

thank you,

regards

vijay

hi experts,

i am facing problem in entering numeric value in excel sheet. when i enter material number it is taking as float value like i entered 101000000012 but it is taking as 1.01E+11.

i had used function module ALSM_EXCEL_TO_INTERNAL_TABLE for uploading data from excel sheet to int. table.

thank you,

regards

vijay

5 REPLIES 5
Read only

Former Member
0 Likes
1,092

hi,

use this

DATA: w_float TYPE f.

IF ( v_value CS 'E+0' OR

v_value CS 'E-0' ).

w_float = v_value.

CALL FUNCTION 'C14W_NUMBER_CHAR_CONVERSION'

EXPORTING

i_float = w_float

IMPORTING

e_dec = w_value_char

EXCEPTIONS

number_too_big = 1

OTHERS = 2.

IF sy-subrc <> 0.

ELSE.

v_value = w_value_char.

ENDIF.

ENDIF.

thanks

Read only

0 Likes
1,092

hi thank you abhishek for your reply

but the FM you had mentioned is working for 1.01E+00.

but im getting value as 1.01E+11.

i changed it in my code as 1.01E+11 but it is showing value as 0.000

please help me in this.

thank you

vijay

Read only

Former Member
0 Likes
1,092

Hi,

This issue is not with Data the you transfer.It just an excel issue.

1.Open Excel File with downloaded data.
2.Select the column the with number.
3.Right click on the column--->Select Format cell
4.Select 'Number TAB'--->Just Select 'NUMBER' from Category(Default selected will be general)
5. Set decimals to Zero

Regards,

Gurpreet

Read only

0 Likes
1,092

thank you

Read only

Former Member
0 Likes
1,092

hi,

In excel sheet select the column where u r facing the problem.

Right click on it and slect option 'Format cells'. And slect type as 'Number'.

U ll get all the numbers in number format and not in exponential format.

regards,

ajit.