‎2008 May 07 6:44 AM
Hello all,
I am having a table control which has a list of values which r displayed..now all the values r in change mode..
what i need to do is i need to show the contents of the table to the user in display mode..and then when he selects a line item & clicks on edit(which is a button i've provided) only that particular line shud go into display mode..
I am having a problem in capturing which line he has selected ..so that i can modify only that record in the database table and save it.
plz help..its urgent..
thanks in advance
‎2008 May 07 7:23 AM
Hi,
Define a variable<AB> of type C ans of 1 leght. This variable should have the same name as you have defined in screen painter for the option w/Sel Column ( that enables you to make row selection ).
Please do , loop end loop in the PAI, And in this loop write the module. And in that module use the use the variable <AB> that will be X for the selected line. If condition is true you can read the internal table for that TABCONTROL-CURRENT_LINE.
You cn also get the details of the selected line in TABCONTROL name. In debugger you can view them.
Thanks,
mahantesh
‎2008 May 07 7:23 AM
Hi,
Define a variable<AB> of type C ans of 1 leght. This variable should have the same name as you have defined in screen painter for the option w/Sel Column ( that enables you to make row selection ).
Please do , loop end loop in the PAI, And in this loop write the module. And in that module use the use the variable <AB> that will be X for the selected line. If condition is true you can read the internal table for that TABCONTROL-CURRENT_LINE.
You cn also get the details of the selected line in TABCONTROL name. In debugger you can view them.
Thanks,
mahantesh
‎2008 May 07 7:49 AM
Hi Amit ,
Refer program RSDEMO_TABLE_CONTROL.
Regards,
Charumathi.B
‎2008 May 07 8:50 AM
Hi,
Write below code in PBO module in the loop statment.It will disable rows which are itab-mod is empty.
if itab-mod = 'X'.
loop at screen.
screen-input = 1.
modify screen.
endloop.
else.
loop at screen.
screen-input = 0.
modify screen.
endloop.
endif.
***************************************
write this in PAI module in loop statment and itab-sel should be as selection colunm.you can assign selection colunm in table control attribute
itab-mod = itab-sel.
modify itab index tab_cntrl-current_line.
try this, some thing tough to understand.
reawrd me
‎2008 May 07 10:05 AM