09-09-2014 6:36 AM
Hi Experts,
I have Created oops Alv using Custom Container
now my requirement is that i want to run this Custom Container
in Background, So how can i do it
Thanks
Vikash
09-09-2014 7:58 AM
Hi Vikash,
you can use class cl_salv_table without using custom container ,like below
DATA: ispfli TYPE TABLE OF spfli.
DATA: gr_table TYPE REF TO cl_salv_table.
data: gr_funct type ref to cl_salv_functions.
data: gr_columns type ref to cl_salv_columns_table.
data: gr_column type ref to CL_SALV_COLUMN_table.
START-OF-SELECTION.
SELECT * INTO TABLE ispfli FROM spfli.
TRY.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = gr_table
CHANGING
t_table = ispfli.
CATCH cx_salv_msg .
ENDTRY.
gr_funct = gr_table->get_functions( ).
gr_funct->set_all( Abap_True ).
gr_columns = gr_table->get_columns( ).
gr_column ?= gr_columns->Get_Column( 'DISTANCE' ).
gr_column->SET_VISIBLE( abap_false ).
gr_table->display( ).
09-09-2014 8:24 AM