I had done a test program to simulate the error . Below is the code. Hi acher, You may please copy the below code in to a test module pool program to check the error.
*&---------------------------------------------------------------------* *& Module Pool ZTEST_PRAVEEN3 *& *&---------------------------------------------------------------------* * screen 100 * Two radio buttongs P_A & P_B * Two buttons SUBMIT & BACK * Screen 200 * Custom container CC_200 * Two buttons GO300 & BACK * Screen 210 * Custom container CC_210 * Two buttons GO300 & BACK * Screen 300 * Custom container CC_300 * One button BACK * Transaction code - for Screen 100 *&---------------------------------------------------------------------* program ztest_praveen3. data: p_a value 'X', p_b . data: begin of t_a occurs 0, text_a type char10, end of t_a . data: begin of t_b occurs 0, text_b type char10, end of t_b . data: begin of t_c occurs 0, text_c type char10, end of t_c. * ALV RELATED DATA. * SCREEN 200 data: r_cc_200 type ref to cl_gui_custom_container, r_alv_200 type ref to cl_gui_alv_grid, r_fc_200 type lvc_t_fcat. * SCREEN 210 data: r_cc_210 type ref to cl_gui_custom_container, r_alv_210 type ref to cl_gui_alv_grid, r_fc_210 type lvc_t_fcat. * SCREEN 300 data: r_cc_300 type ref to cl_gui_custom_container, r_alv_300 type ref to cl_gui_alv_grid, r_fc_300 type lvc_t_fcat. data: s_fc type lvc_s_fcat. start-of-selection. *&---------------------------------------------------------------------* *& Module STATUS_0100 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module status_0100 output. * SET PF-STATUS 'xxxxxxxx'. * SET TITLEBAR 'xxx'. endmodule. " STATUS_0100 OUTPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module user_command_0100 input. case sy-ucomm. when 'SUBMIT'. if p_a eq 'X' . leave to screen 200. else. leave to screen 210 . endif. when 'BACK' . leave program. endcase. endmodule. " USER_COMMAND_0100 INPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0200 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module user_command_0200 input. case sy-ucomm. when 'GO300' . leave to screen 300. when 'BACK' . leave program. endcase. endmodule. " USER_COMMAND_0200 INPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0210 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module user_command_0210 input. case sy-ucomm. when 'GO300' . leave to screen 300. when 'BACK' . leave program. endcase. endmodule. " USER_COMMAND_0210 INPUT *&---------------------------------------------------------------------* *& Module USER_COMMAND_0300 INPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module user_command_0300 input. case sy-ucomm. when 'BACK' . clear: r_cc_200, r_alv_200, r_fc_200 , r_cc_210 , r_alv_210 , r_fc_210, r_cc_300 , r_alv_300, r_fc_300. leave to screen 100. endcase. endmodule. " USER_COMMAND_0300 INPUT *&---------------------------------------------------------------------* *& Module STATUS_0200 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module status_0200 output. * SET PF-STATUS 'xxxxxxxx'. * SET TITLEBAR 'xxx'. * CREATE OBJECTS FOR CONTAINER AND ALV GRID create object r_cc_200 exporting container_name = 'CC_200'. create object r_alv_200 exporting i_parent = r_cc_200. clear r_fc_200. s_fc-fieldname = 'TEXT_A'. s_fc-scrtext_l = 'TEXT A' . append s_fc to r_fc_200. clear t_a[] . t_a-text_a = 'Text a1'. append t_a. t_a-text_a = 'Text a2' . append t_a. if r_alv_200 is bound. call method r_alv_200->set_table_for_first_display changing it_outtab = t_a[] it_fieldcatalog = r_fc_200. endif. endmodule. " STATUS_0200 OUTPUT *&---------------------------------------------------------------------* *& Module STATUS_0210 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module status_0210 output. * SET PF-STATUS 'xxxxxxxx'. * SET TITLEBAR 'xxx'. * CREATE OBJECTS FOR CONTAINER AND ALV GRID create object r_cc_210 exporting container_name = 'CC_210'. create object r_alv_210 exporting i_parent = r_cc_210. clear r_fc_210. clear t_b[] . t_b-text_b = 'Text b1'. append t_b. t_b-text_b = 'Text b2' . append t_b. s_fc-fieldname = 'TEXT_B'. s_fc-scrtext_l = 'TEXT B' . append s_fc to r_fc_210. if r_alv_210 is bound. call method r_alv_210->set_table_for_first_display changing it_outtab = t_b[] it_fieldcatalog = r_fc_210. endif. endmodule. " STATUS_0210 OUTPUT *&---------------------------------------------------------------------* *& Module STATUS_0300 OUTPUT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* module status_0300 output. * SET PF-STATUS 'xxxxxxxx'. * SET TITLEBAR 'xxx'. create object r_cc_300 exporting container_name = 'CC_300'. create object r_alv_300 exporting i_parent = r_cc_300. clear r_fc_300. clear t_c[] . if p_a = 'X' . t_c[] = t_a[]. else. t_c[] = t_b[] . endif. s_fc-fieldname = 'TEXT_C'. s_fc-scrtext_l = 'TEXT C' . append s_fc to r_fc_300. if r_alv_300 is bound. call method r_alv_300->set_table_for_first_display changing it_outtab = t_c[] it_fieldcatalog = r_fc_300. endif. endmodule. " STATUS_0300 OUTPUT
Thank you.
Praveen.