excelabapalv

reuse_alv_list events get the whole list as Excel


I have a function module (reuse_alv_list_display) that I call in order to display my data so that the batch processing works right.

My problem is, that I add On top of the list some comments, and change a lot in the layout, like coloring the table.

I want to export the table as an Excel file (2007 using zcl_excel_writer_2007 of abap2xlsx) but I do not know how to do this while keeping the formatting, that the user might have even changed.

Problem is, I don't know how, and in the examples they give, they use another method to display ALVs.

I saw elsewhere that it was somehow to get this table in the callback events, however I find it hard to find references for that.

My Question is: has anyone a solution how to export an Excel table with user formatting from ALV list...

PS: SAP ECC.

I already tried my original table (the raw data) problem is, that many of the ALV functions are different in Excel (eg. color table at end of each row).


Solution

  • The solution proposed by Sandra is correct I switched now to the newer cl_sal_table class based output, and so far do not regret it. You can then just gife an instance of it to the exel builder of abap-tools and it will make an nice Exel File