2012 Oct 18 9:41 PM
Hi,
I'm using OO ALV to display two ALV grid's in the output of the report.
If I double click on any of the entry in the first ALV grid,it shows the next ALV in a pop up.
Now in the pop up,I need to add a "header" for the ALV grid(to display all the common data fields).
Can anyone tell me how do I do this using OO ALV?
Also since the second ALV is being displayed in a pop up,not sure how can I add the header section?
i'm using the foll to display ALV in pop up:
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_det ).
CATCH cx_root INTO v_alv_exc.
ENDTRY.
gr_table->set_screen_popup(
start_column = 1
end_column = 70
start_line = 1
end_line = 20 ).
gr_table->display( ).
2012 Oct 19 1:54 AM
Hi,
To add a header text in SALV class, first you need to get the class of display setting(using gr_table->get_display_settings( ) ) of your table, then you can set the header text using this class of display setting. I had added the code below for your reference.
DATA: gr_display TYPE REF TO cl_salv_display_settings,
gv_title TYPE lvc_title.
gv_title = 'This is header text'.
TRY.
cl_salv_table=>factory(
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = t_det ).
CATCH cx_root INTO v_alv_exc.
ENDTRY.
gr_display = gr_table->get_display_settings( ).
gr_display->set_list_header( gv_title ).
gr_table->set_screen_popup(
start_column = 1
end_column = 70
start_line = 1
end_line = 20 ).
gr_table->display( ).
Regards,
Xavier