Application Development and Automation 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: 

How to download grid data into excel same like CJI5 transaction report download

aba212
Participant
0 Kudos
656

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

5 REPLIES 5

Jeansy
Active Contributor
0 Kudos
588

Did you check already if this can be covered by ABAP2XLSX?

https://github.com/abap2xlsx/abap2xlsx

Kind regards
Jens

aba212
Participant
0 Kudos
588

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,

veeranjaneyuluvalluri

Jeansy
Active Contributor
0 Kudos
588

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

bizhuka
Explorer
0 Kudos
588

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

https://bizhuka.github.io/xtt_demo/ZXXT_DEMO_150_T.XLSX

raymond_giuseppi
Active Contributor
0 Kudos
588

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.