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.
Showing results for 
Search instead for 
Did you mean: 

Leading zeros in XLS sheet

Former Member
0 Kudos

Hello Experts,

I have one report in ALV format. It is displayed perfect.

When we download it into XLS format it appends leading zeros in 'NETWORK no' Field.

Can you all please help me how to remove it?

Remember, ALV is showing perfect o/p. So

CONVERSION_EXIT_ALFA_OUTPUT or any other FM in that category is of no use.

Also there is no code to download in XLS. User selects Standord procedure to download from ALV.

But he is getting Leading zeros.

I would be thankful for the help.

Best Regards,



Former Member
0 Kudos

HI Joshia,

Lets consider you are downloading MATNR which comes with leading Zero.

We solve this by below case .

you can download the value in character format with preceding single quote .

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

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

While uploading the data to internal table it_material

CONCATENATE '"' it_material-matnr into it_material-matnr.

append it_material.