I have a question about Table Control.
Firstly, the screen of my ABAP program contains a text field and a table control. When I input something contents into the text field as search condition to get data from database, the table control will display the corresponding data.
I have succeeded in data displaying in table control. The second step is to select rows in table control without selection mark disappearing after doing some kind of actions like pushing ‘enter’ key.
Followed is part of my coding.
Tables: sflight. ”table control field name in screen
Data g_select type c. “mark name in table control
LOOP AT it_xxx
WITH CONTROL TB_CL01.
MODULE move_to_ sflight.
LOOP AT it_xxx.
Module move_to_sflight is:
g_select = wa_xxx-mark.
MOVE-CORRESPONDING wa_xxx to sflight.
Module modify_internaltable is:
wa_xxx-mark = g_select.
modify it_xxx from wa_xxx index tb_cl01-current_line.
The problem is “Module select_data_from_db” will refresh the it_xxx and make the mark ‘X’ clear. So marked selected rows will be unselected after inputing.
I tried to move “Module select_data_from_db” into PAI and settle this problem, but someone told me it is better to put “Module select_data_from_db” in the PBO.
I am just wondering a solution or some standard samples if existed.
Thank you guys.