Skip to Content
0
Jun 11, 2014 at 11:12 AM

Editing one row at a time in a table control

204 Views

Good day all

I need your urgent assistance with the problem below:

At first time load, the table control needs to allow input on the first line only, validation will then be done through clicking a “check” button. After the check has been done, table control needs to open up the second row for input and grey out the first one. This sequence needs to follow every time a check has been performed.

After the check has been done, table control needs to show the previously entered data on the first line but grey it out, and open up only the second row for input.

The table control has been created using a wizard with an internal table and I am working on dialog/screen programming. The table control has been created as an output control but it needs to perform as both and output and input control.

I have made changes to the “MODULE tc_create_ph2_get_lines OUTPUT.” Which is created by the wizard as follows:

The module is in the PBO Section.

IF it_tab is initial. "it_tab being the internal table that stores the data from the table control

DESCRIBE TABLE it_tab LINES lv_num.

LOOP AT SCREEN.

IF tc_create_ph2-current_line <> 1.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ELSE.

tc_create_ph2-current_line = lv_num + 1.

LOOP AT SCREEN.

IF tc_create_ph2-current_line <> lv_num + 1 .

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

Your assistance will be highly appreciated.