2022 May 19 10:16 AM
Hello all,
I have this requirement in which I need to fetch data from the table control into an internal table (any changes can be in any row), the table control is empty initially, user enter values one by one.
The problem is after getting first row and user presses enter, it works fine but when he enters new row and pressing enter, the internal tables is filled with three rows, that is two first rows and one new (second one).
Please help with some solution.
MODULE user_command_0100 INPUT.
APPEND wa_item TO it_item.
CLEAR wa_item.
ENDMODULE.
PROCESS BEFORE OUTPUT.
MODULE status_0100.
MODULE init_0100.
LOOP AT it_item INTO wa_item WITH CONTROL tc_item.
ENDLOOP.
*
PROCESS AFTER INPUT.
MODULE exit_module_0100 AT EXIT-COMMAND.
LOOP AT it_item.
MODULE user_command_0100.
ENDLOOP.
2022 May 19 10:28 AM
Use the debugger and you will see that you add a line in the MODULE user_command_0100.
It's called all the time, so you should test the "OK field" (sort of sy-ucomm).