While downloading data from the ABAP tables, Excel removes the leading zeros automatically but in some SAP tables (NAST for example), those leading zeros are necessary to find the required associated data. Is there any way to prevent Excel from removing these zeros?
Thanks a lot!
There are two ways to solve it.
1) select complete columns in the Excel sheet and then assign the number format as ' TEXT ' in the sheet.Then u ll be able to see the leading zero's
2) If u donot want to wrk in Excel the way i have mentioned,then in the abap program just use the FM
"CONVERSION_EXIT_ALPHA_INPUT" over that field before uploading in a table.
By mistake i have told u the wrong way.the first way is for copying the data from text file to excel file and preserving the leading zeros.
Edited by: Kanishak Gupta on May 6, 2009 5:36 AM
If ur downloading the data using se16 then change the display layout to ALV grid display. Once the data is displayed in ALV grid then use the inplace excel option of ALV grid. It will output the data in MHTML format which can be saved into (.xls,.xlsx) format. If ur downloading the data using FM 'GUI_DOWNLOAD' then open the file in Excel as text delimited and separate the fields using the identifier and convert it into text.
Hope it helps u.
To get the file with leading 0s...first download the data in '.txt' format with tab delimited option.
1. From excel open ur txt file.
2. Select Radio button "Delimited"
3. Then select the delimiter i.e. separator which separates the data in ur txt file.
4. In the next screen select all the data and go for a "Text" format.
In this way u ll get the leading 0s.
Or the other way is take the data without 0s inexcel & when u upload the data put FM
'CONVERSION_EXIT_ALPHA_INPUT' to fetch the data.