‎2008 Jan 24 4:12 PM
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
‎2008 Jan 25 3:42 AM
‎2008 Jan 25 4:09 AM
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.
‎2008 Jan 25 6:32 AM
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