Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

enabling the table control fields

Former Member
0 Likes
379

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

2 REPLIES 2
Read only

former_member195383
Active Contributor
0 Likes
355

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

Read only

former_member491305
Active Contributor
0 Likes
355

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