05-05-2009 10:04 PM
Hello!
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!
05-05-2009 10:08 PM
Check this:
[Preserve Downloaded data formatting in Excel |http://help-abap.blogspot.com/2008/09/preserve-downloaded-data-formatting-in.html]
Regards,
Naimesh Patel
05-06-2009 4:29 AM
Hi,
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.
regards
kanishak
Edited by: Kanishak Gupta on May 6, 2009 5:36 AM
05-06-2009 4:38 AM
Hi Yogesh,
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.
Regards,
Anil N.
05-06-2009 4:43 AM
while downloading excel will remove leading zeroes.
if u need to get the leadin zeros, declare that field as char.
05-06-2009 4:50 AM
Hi yogesh,
To get the file with leading 0s...first download the data in '.txt' format with tab delimited option.
Then
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.
regards,
ajit.