Thanks Raymond,I have cleared the grid and built it again with Splitter method and then caught the exception, but the point is, it is not throwing any exception and the problem still persists.Below is the altered code:
DATA:salv_msg TYPE REF TO cx_salv_msg.
CREATE OBJECT salv_msg.
DATA:lv_string TYPE string.
IF o_table_item IS NOT INITIAL.
CALL METHOD o_table_item->refresh
EXPORTING
s_stable = sstable
refresh_mode = if_salv_c_refresh=>full.
CLEAR:o_table_item,o_grid2.
CALL METHOD o_splitter->get_container
EXPORTING
row = 2
column = 1
RECEIVING
container = o_grid2.
ENDIF.
TRY.
CALL METHOD cl_salv_table=>factory
EXPORTING
r_container = o_grid2
* container_name =
IMPORTING
r_salv_table = o_table_item
CHANGING
t_table = git_vbap
.
CATCH cx_salv_msg INTO salv_msg.
lv_string = salv_msg->get_text( ).
message lv_string type 'I'.
ENDTRY.
Regards,
Mithil