Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Export ALV output table to an XXL file

former_member531036
Participant
0 Kudos

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

4 REPLIES 4

kesavadas_thekkillath
Active Contributor
0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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