Application Development 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: 

prefixed zeros in XL download

Former Member
0 Kudos

Hi All,

I have an itab with following data.

column

000001

000002

000003

000004

000005

I download this file using FM 'GUI_DOWNLOAD' as an .xls file.

but when i open this file in excel, the column data dosent contain prefixed zeros. i want the data to be downloaded with prefixed zeros.

Thank You All,

sal.

9 REPLIES 9

Former Member
0 Kudos

i thnk its because of the .XLS its happening like this .... u download it to .txt and check ...

Former Member
0 Kudos

Hi,

Try Downloading it in text format, excel format doesnt retain zeros.

regards

Karthik D

Former Member
0 Kudos

hi,

use Fm: 'CONVERSION_EXIT_ALPHA_INPUT'

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wl_kunnr-low

IMPORTING

output = wl_kunnr-low.

it will help you

reagrds

rahul sharma

0 Kudos
you have to  download the value in character format with preceding single qoute .
 for example -
if you are downloading 000010 means, assign that value as '000010.

So that, excel can treat it as character & the zeros will be retained.
either after download the excel do the change of properties of excel.

Former Member
0 Kudos

While using GUI_DOWLOAD

Try giving FILETYP as DBF instead of ASC

Hope this helps!

Regards,

Prashant

Mohamed_Mukhtar
Active Contributor
0 Kudos

Hi Salma

Download in 'DBF fomrat ..'

CALL FUNCTION 'GUI_DOWNLOAD'*
 filetype                = 'ASC'  "--------> change file type to 'DBF'

Regards

Former Member
0 Kudos

Hi,

Either try Downloading it in text format as excel format doesnt retain zeros.

Or

Make the column format as custom ie.select the whole column of excel sheet then right click to format cells in numbering we put custom and value as 000000 so that it will retain 0's.

thanx.

Former Member
0 Kudos

hi Krishna,

by giving itab-column = '00001. it will solve the problem but that symbol " ' " also appears.

thanks

Former Member
0 Kudos

hi,

Download in 'DBF fomrat ..'

CALL FUNCTION 'GUI_DOWNLOAD'*

filetype = 'ASC' "----


> change file type to 'DBF'

or

you have to download the value in character format with preceding single qoute .

for example -

if you are downloading 000010 means, assign that value as '000010.

So that, excel can treat it as character & the zeros will be retained.

either after download the excel do the change of properties of excel.

or

by giving itab-column = '00001. it will solve the problem but that symbol " ' " also appears.

regards

rahul