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

translate

Former Member
0 Likes
477

How to download a number 200.500 from SAP into an excel sheet without losing leading zeroes.

Its downloading correctly when the number is 200.208 but we have a problem when downloading the value 200.500 into excel sheet as it becomes 200.5

Can we use translate command to do this..

THANKS

3 REPLIES 3
Read only

sachin_mathapati
Contributor
0 Likes
462

Hi Abhishek,

Check this link.

Reward points if useful.

Thanks

Sachin M M

Read only

Former Member
0 Likes
462

Hi Abhishek,

it doesn't make sense to use TRANSLATE into a non-char-like field.

Moreover, I recommend to do this replace line-by-line, that is:

LOOP AT itab.

TRANSLATE ...

" ...or some command to change the contents of the field

MODIFY itab.

ENDLOOP.

I hope this helps.

Best regards,

hema.

Read only

Former Member
0 Likes
462

Hi Abhishek ,

Try This.,

In the FM there is parameter called 'FILE TYPE'

pass the value for it as 'DBF'

it will work.

call function 'WS_DOWNLOAD'

exporting

BIN_FILESIZE = ' '

CODEPAGE = ' '

filename = p_file

filetype = 'DBF'

mode = ' '

WK1_N_FORMAT = ' '

WK1_N_SIZE = ' '

WK1_T_FORMAT = ' '

WK1_T_SIZE = ' '

COL_SELECT = ' '

COL_SELECTMASK = ' '

NO_AUTH_CHECK = ' '

IMPORTING

FILELENGTH =

tables

data_tab = it_data

fieldnames = it_heading

exceptions

file_open_error = 1

file_write_error = 2

invalid_filesize = 3

invalid_type = 4

no_batch = 5

unknown_error = 6

invalid_table_width = 7

gui_refuse_filetransfer = 8

customer_error = 9

others = 10.

Change all the fields not to be truncated, into character type in the internal table and then download it.

Also use Function Module: CONVERSION_EXIT_ALPHA_INPUT

Reward if useful.

Regards,

Chitra