Hi All,
I am displaying two ALV's using splitter container. For first ALV, I am getting ALV Toolbar. But for second ALV, toolbar bar is not getting displayed. Below is my code wherin I am using CL_SALV_TABLE. Anyone have sample code for two alv's using factory methods, please help me.
START-OF-SELECTION.
go_object->get_data( ).
go_object->fill_output( ).
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& METHOD STATUS_0100 OUTPUT *
*&---------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'TITLE'.
CALL METHOD go_object->display_output( ).
ENDMODULE.
METHOD display_output.
display_alv( EXPORTING
container_name = 'CONTAINER1'
CHANGING im_grid = lo_grid1
i_data = t_mara ).
display_alv( EXPORTING
container_name = 'CONTAINER1'
CHANGING im_grid = lo_grid2
i_data = t_marc ).
ENDMETHOD.
METHOD display_alv.
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
r_container = im_grid
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = i_data.
CATCH cx_salv_msg INTO l_result.
go_object->exception_msg( EXPORTING l_result = l_result ).
ENDTRY.
lo_columns = lo_alv->get_columns( ).
lr_column = lo_columns->get_column( c_matnr ).
lr_column->set_output_length( 10 ).
lr_column = lo_columns->get_column( c_mtart ).
lr_column->set_output_length( 10 ).
lr_column = lo_columns->get_column( c_werks ).
lr_column->set_output_length( 10 ).
lr_column = lo_columns->get_column( c_ekgrp ).
lr_column->set_output_length( 10 ).
*-- Display the ALV
lo_alv->display( ).
ENDMETHOD.
Thanks,
HT
Add comment