2007 Nov 20 1:56 PM
Hi,
I working in table control.When i click the download button then all the material number which is in table control should be download in local excel file.
Its working fine.But the leading zero of the material number is removed.
Is it possible to download the material with leading zero.If then please guide me.
Regards,
K.Sudhakaran.
2007 Nov 20 1:58 PM
Hi
Are you sure the leading zero is removed by excel and not while downloading it?
Max
2007 Nov 20 2:15 PM
Hi max,
Yes sure the leading zeros are available till the last internal table. After excel only zeros are removed.
With out excel configure how can i download data with leading zeros ?.Because client doesnt know abt excel configuration.
Regards,
K.Sudhakaran.
2007 Nov 20 2:21 PM
Sudha,
Sorry for a mis-leading answer before. i didnt think through the problem before giving you an answer. The thing here is there are leading zeroes added to your data as long as your data stays in SAP. You will also see leading leading zeroes if you have downloaded the file as a text file.
But the problem here is Excel has already been set to remove zeroes from the front of a number if that particular coloumn has been declared as a numerical field. You try to show your user to change that field in excel to character so that there will be leading zeroes again.
Unfortunately, there is not much we can do on the SAP side, as SAP is giving the number out with leading zeroes and excel is doing the trick for you.
Regards
Aneesh.
2007 Nov 20 3:14 PM
Hi,
when handing the values to excel you could change your value to this: '=REPLACE(". That will also force excel to render your value as text.
Message was edited by:
Martin Schöffler
2007 Nov 20 1:58 PM
Sudha,
Use function module <b>CONVERSION_EXIT_ALPHA_INPUT</b> before downloading to add leading zeroes.
Regards
Aneesh.
2007 Nov 20 3:19 PM
Sometimes sticking a single quote in front works, eg '0000000012345689. You may have to do that in a temporary table to avoing mashing the existing values.
It might make a difference what type of file you're downloading - is it excel, tab delimited, CSV.
(oops, didn't see Martin had said the same thing)
2010 Dec 09 11:24 AM
Hi All,
This can be solved in a better and simpler way as follows:
CONCATENATE '="' wa-field_name '"' INTO wa-field_name.
This should solve the problem
Thanks,
Jiten
2011 Sep 19 1:46 PM
2007 Nov 20 2:05 PM
No, in excel you have to define the column as text and not number. If you define it as a number it will remove the leading zeros. So if you have a downloaded tab delimited file, when you open in excel, first define the column attributes where you want to display the leading zeros.
Albert