‎2008 Jun 16 1:45 PM
Hi all,
I have a table control with 5 fields. If i click a button, then the 1st and 4th column of the current table control row gets enabled. After that the user enters the data in the 1st and 4th column and press 'Enter' key and the corresponding data is fetched from the DB table and displayed in the current table control row.
But after displaying the data, the 1st and 4th column gets DISABLED again. But i want that fields to be in ENABLE MODE again.. How to do this...
Pls anyone give me the idea to achieve this........
Regards,
Shanthi
‎2008 Jun 16 2:00 PM
in the PBO create a module..
module enable.
inside that write
if sy-ucomm eq 'ENTE'.
LOOP AT SCREEN.
IF screen-name EQ 'NAME1'.
screen-input = 1.
MODIFY SCREEN.
endif.
ENDLOOP.
this will make the fields of coloumn NAME1 ur table controll editable.
Do the same thing for the other coloumn also.
Reward points if useful....
Regards
Edited by: Rudra Prasanna Mohapatra on Jun 16, 2008 3:00 PM
‎2008 Jun 16 8:07 PM
Hi Shanthi,
I hope you have written some logic in PBO to make the 1st and 4th coloumn of current row in table control to be editable after pressing one push button.But you are not telling when you want the those coloumn to be in display mode.You should have some flag(some Condition) at the row level which can differentiate between 2 status(Display mode,Change mode).
I have shown a Eg: Based on flag.
If flag = 'X'.
Make that 2 coloumn editable.
else.
Make it as display only
ENdif.
So you have to decide to set the flag as 'X' whenever you want to make the coloumn as editable.
PBO:
Loop at itab with tc.
module set_screen_attribute.
endloop.
Module set_screen_attribute Output.
If itab-flag = 'X'.
Loop at screen.
If screen-name = 'ITAB-F1' or screen-name = 'ITAB-F4'.
screen-input = '1'.
Endif.
Modify screen.
Endloop.
Elseif itab-flag = space.
loop at screen.
If screen-name = 'ITAB-F1' or screen-name = 'ITAB-F4'.
screen-input = '0'.
Endif.
Modify screen.
Endloop.
Endif.
Endmodule.
Regards,
Vigneswaran S