2007 Nov 14 8:06 AM
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.....
2007 Nov 14 10:07 AM
2007 Nov 14 11:09 AM
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.
2007 Nov 14 1:11 PM
Hi Ashok,
use method SET_TOP_OF_LIST to display the header.
Reward if it helps,
Satish
2007 Nov 15 6:54 AM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |