‎2008 Nov 04 9:10 AM
Hi,
On a screen, I have a table control.
In that table control, i have a field for a check-box.
When I selected that checkbox in a table control in a perticular row, that value should be captured.
I will give values in a perticular row and to that checkbox field
and press save button, that changed value should be captured.
But, that value is not retained once I press the save button.
Please help me, How to correct this problem?
What may be the reason? Please help me on this...
‎2008 Nov 04 9:17 AM
Hai,
have you included the check field in the internal table ofr table control.
have you written the module which gets the changed data in PAI.
PBO.
loop at itab into wa woth control tctrl.
module move. "move from scrre ton tctrl.
endloop.
PAI.
loop at itab .
module modify. "move from tctrl ton screen..
endloop.
in the modify module.
u move the data from the struture (tctrl) to wa.
modify itab from wa index tctrl-current_line.
please check.
Neeraj.
‎2008 Nov 04 10:07 AM
Hi Neeraj,
in PAI, we have to move data from tbctr to wa, means that data
is in Screen-fields right? That means the data is in some database fields on the screen.
So we have to move that data from database fields to wa and modify itab with that data from wa, right?
If not, please show me how to move data from tbctrl to wa by
taking 2 to 3 fields a example...
Thanks,
Sreenivas
‎2008 Nov 04 10:27 AM
Hi,
If you are using table control wizard, then there is a module which will be automatically generated by the wizard called MODULE <tablecontrol name>_mark ON REQUEST. in that module at the end write
MODIFY <itab name of table control>
FROM < work area>
INDEX <itab name>-current_line
TRANSPORTING check.
Using this we can with hold values even after saving data.
Hope this will give you some idea,
Regards,
Aswini.
‎2008 Nov 04 9:19 AM
Hi
u must use a modify stmt to your table control internal table.
only then will de changed values be affected in your screen.
Regards
Winnie
‎2008 Nov 04 10:28 AM
Hi,
u can do it like this...
PROCESS BEFORE OUTPUT.
LOOP AT it_rfqi WITH CONTROL tab1.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP AT it_rfqi.
MODULE get_tab.
ENDLOOP.
MODULE get_tab INPUT.
DATA: wa_rfqi LIKE LINE OF it_rfqi.
READ TABLE it_rfqi
INTO wa_rfqi
INDEX tab1-current_line. "checking whether it is already present in the internal table
*-----------------------------------Updating Internal table from Screen*
IF sy-subrc = 0.
MODIFY it_rfqi INDEX tab1-current_line.
ELSE.
APPEND it_rfqi.
ENDIF.
*----------------------------------------------------------------------*
CLEAR: it_rfqi.
ENDMODULE. " GET_TAB INPUT