‎2006 Jul 17 9:25 PM
Hi,
I have a report which displays data on an ALV grid control. This output has a specific column's order on the grid, but when I click the button to export to an Excel File the system somehow resorted the columns and display them differently. I didn't make any change to the catalog before exporting to Excel. Do someone have any idea why is this happening and how to fix it? I'll appreciate very much your help on this. Thanks.
‎2006 Jul 17 10:02 PM
Hi,
It is a problem with EXCEL, it alters the sequences of columns depending on the data type numerics,char.
Set the 'COL_POS' field of the feild catalog to each and every column and check.
Regards
Appana
‎2006 Jul 17 10:02 PM
Hi,
It is a problem with EXCEL, it alters the sequences of columns depending on the data type numerics,char.
Set the 'COL_POS' field of the feild catalog to each and every column and check.
Regards
Appana
‎2006 Jul 18 1:06 AM
Its not a problem with EXCEL, but with the standard feature of the ALV grid. When you download using the standard button, it puts all the CHAR fields in the front and all the NUMERIC columns to the end in the downloaded excel file.
Alternative is to provide this functionality yourself by having a button and downloading the table using GUI_DOWNLOAD to a excel.
Regards,
Ravi
note : Please mark all the helpful answers
‎2006 Jul 18 3:38 PM
Ravi,
Thanks for your reply. Can you please give some kinf of example or any documentation about implementing GUI_DOWNLOAD since I'm kind of new with ABAP, I'll appreciate it very much it it's possible for you.
Regards.
‎2006 Jul 18 4:21 PM
Hi...
Read SAP Note 358644 ALV Export Excel: Recommendations and known errors.
Using the "Spreadsheet..." download button may re-arrange the column order...
"The system sorts or groups the columns together according to characteristics and key figures"
Using the "Local file..." download button... then choosing the "Spreadsheet" option should leave everything as it was...
Do I get points for this answer ?
Dave...
Message was edited by: Dave T.