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

Former Member
0 Likes
537

Hi Gurus,

I am doing ALV with <b>cl_salv_table=>factory</b> .Can any one please let me know how to add a header for the ALV.Header information will be of 7 lines ..

Please give me a solution.

Ashok.....

Hi Gurus,

I am doing ALV with <b>cl_salv_table=>factory</b> .Can any one please let me know how to add a header for the ALV.Header information will be of 7 lines ..

Please give me a solution.

Ashok.....

4 REPLIES 4
Read only

Former Member
0 Likes
520

Hi

Read only

Former Member
0 Likes
520

Hi Ashok kumar,

The help for ReUse_Alv_Grid_Display tells you how to do this.

You include a procedure name in the I_CALL_BACK_TOP_OF_PAGE parameter.

In this procedure you use function module REUSE_ALV_COMMENTARY_WRITE to write the header information for the ALV.

You do not need to create any other panes or objects to hold your header information.

Hope this has given u some idea.

Regards

Harish.

Read only

Former Member
0 Likes
520

Hi Ashok,

use method SET_TOP_OF_LIST to display the header.

Reward if it helps,

Satish

Read only

Former Member
0 Likes
520

Hi Ashok,

Here is the code to add heading to alv.


REPORT ZGS_HEADING.
data: ispfli type table of spfli.
data: gr_table type ref to cl_salv_table.
data: gr_functions type ref to cl_salv_functions.
data: gr_display type ref to cl_salv_display_settings.

start-of-selection.
  select * into table ispfli from spfli.
  cl_salv_table=>factory( importing r_salv_table = gr_table changing t_table = ispfli ).
  gr_functions = gr_table->get_functions( ).
  gr_functions->set_all( abap_true ).
  gr_display = gr_table->get_display_settings( ).
  gr_display->set_striped_pattern( cl_salv_display_settings=>true ).

**** Heading
  gr_display->set_list_header( 'This is the heading' ).
  gr_table->display( ).


Reward points if useful,

Aleem.