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: 
Read only

ALV-Enable Export to Excel

Former Member
0 Likes
5,163

I want to enable List > Export > Spreadsheet of my ALV program (using CL_SALV_TABLE). I read this --> , but I still don't get it.

I want to enable List > Export > Spreadsheet of my ALV program (using CL_SALV_TABLE). I read this --> , but I still don't get it.

5 REPLIES 5
Read only

Former Member
0 Likes
1,413

hi,

check the below link. it might help you.

[;

Regards

Sunil

Read only

Former Member
0 Likes
1,413

Hi ,

By default you will get this button unless you write set_export_allowed is false please checkin ur code.

in case of problem please revert back.

Thanks,

Ruchi

Read only

Former Member
0 Likes
1,413

Hi,

By default you will get this button unless you write set_export_allowed is false. Plase check in ur code in case of problem revert back.

Thanks,

Ruchi

Read only

Former Member
0 Likes
1,413

Hi,

By default you will get this button unless you write set_export_allowed is false. Plase check in ur code in case of problem revert back.

Thanks,

Ruchi

Read only

0 Likes
1,413

Hi, my code is as simple as the following. I did not set set_export_allowed to false.


 types: BEGIN of ty_content,
         total TYPE i,
         END OF ty_content.

  data: it_display type ref to cl_salv_table,
        it_content type STANDARD TABLE OF ty_content,
        wa_content LIKE LINE OF it_content,
        gr_columns type ref to cl_salv_columns_table,
        gr_column type ref to cl_salv_column_table.

 CLEAR: wa_content, it_content.

        wa_content-total = ct_flag.
        APPEND wa_content TO it_content.

  cl_salv_table=>factory( importing r_salv_table = it_display changing t_table = it_content ).

gr_columns = it_display->get_columns( ).
gr_columns->set_optimize( 'X' ).
gr_column ?= gr_columns->get_column( 'TOTAL' ).
gr_column->set_long_text( 'Total number of contacts created:' ).

  it_display->display( ).