Hi,
Create a header and label and call it after the factory method.
DATA:lo_header TYPE REF TO cl_salv_form_layout_grid,
lo_h_label TYPE REF TO cl_salv_form_label.
CREATE OBJECT lo_header.
Here o_rslt is the importing parameter of the method factory.
CALL METHOD cl_salv_table=>factory
IMPORTING
r_salv_table = o_rslt
CHANGING
t_table = <table>.
lo_h_label = lo_header->create_label( row = 1 column = 1 ).
lo_h_label->set_text('Title for the ALV').
o_rslt->set_top_of_list( lo_header ).
o_rslt->display( ).
Regards,
Jeffin