2022 Sep 27 8:28 PM
Hi,
I have a requirement like to download the grid data into excel file by grouping the records and also I have to do subtotals with coloring of the cells. The same format like when we download the data from CJI5 report in PS module. I know there are many FMs to download the data into excel format.
But I need to group the records based a column value and need to add colors and apply the filter option for columns in the excel. Can any one help me how can achieve this requirement ?
Regards,
veeranjaneyuluvalluri
2022 Sep 27 8:41 PM
Did you check already if this can be covered by ABAP2XLSX?
https://github.com/abap2xlsx/abap2xlsx
Kind regards
Jens
2022 Sep 27 9:35 PM
Hi jzaehringer,
Thanks for quick reply!
I did check this page. But there are many classes. I think it might be possible with link which you shared. But creating these many classes and it's custom components will make program difficult.
Is there any better approach like CJI5 report download ?
Regards,
veeranjaneyuluvalluri2022 Sep 28 7:26 AM
Hi,
you do not need to create these classes manually, you can use abapgit to implement the whole package directly in your system. This includes also several demo reports you can check in detail.
Details can be found here:
https://abap2xlsx.github.io/abap2xlsx/abapGit-installation
Kind regards
Jens
2022 Sep 28 10:31 AM
Hi
you can try
https://bizhuka.github.io/xtt/without-grid-template/
subtotals & coloring work out of the box
the result
https://bizhuka.github.io/xtt_demo/ZXXT_DEMO_150_R.XLSX
the template is genereted based on CL_GUI_ALV_TABLE (or SALV) layout, field catalog & sorting
and looks like
2022 Sep 28 1:59 PM
Did you already look at method PUBLISH_AS_SPREAD_SHEET (*) of class CL_SALV_GUI_DATA_PUBLISHER, put a break-point at start/call.
(*) Called in CJI5 by private method EXPORT_TO_SPREAD_SHEET of class CL_GUI_ALV_GRID.