04-16-2013 11:56 AM
I am after writing a new report (ZMYPROGRAM) which is a copy of RKKBCAL2. I have added new fields so now my output is 186 columns wide. When I use the List>Export>Local File, it presents me with the options to save as unconverted, spreadsheet, rich text format etc.... However, when I choose spreadsheet and generate the file, my header lines are wrappped around and the output is skewed. I have seen in SE16N, MARA table that I can choose Export>Spreadsheet>Excel (in Existing XXL Format) and that can handle 231 columns. Is there a tutorial somewhere that I can see how to enable exporting an ALV output table to an XXL file from a custom report?
Thanks!
Julie
04-17-2013 6:59 AM
Right click on your alv output and choose spreadsheet->mhtml or other format. If you want to do it through program check this sample http://scn.sap.com/docs/DOC-38632 ( it only works in higher sap release , cl_salv_gzt_admin will not be available in lower releases ). Please check.
04-17-2013 10:16 AM
Thank you for your reply Kesavadas. Unfortunately, when I right click on the ALV output, I do not have the spreadsheet->mhtml or other format option. The reason we want to enable the exporting to ALV output table to XXL is so the user can select which columns they want to output. If I use the program sample you provided, it will output all of the columns from the internal table and that may not be what the user wants.
Thanks!
Julie
04-17-2013 10:40 AM
Hi,
The ALV will be holding a layout which user has chosen, you can use the method get_frontend_fieldcatalog of class cl_gui_alv_grid and retrieve the fields chosen in the layout by the user. Then you can use the sample program which I provided and modify the content in lt_fcat.
04-17-2013 5:29 PM
Thank you Kesavada, that information was very helpful. I found though, that this program was actually exlcuding the &XXL status in the SET PF-STATUS, so I removed this exclusion and the the export spreadsheet to Excel option was available.
Thanks again!
Julie