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

table control

Former Member
0 Likes
554

Hai..

I have created a table control with three fields in module pool , based on the user command..

i want to display two fields as editable & the remaining fields as non-editable. How to do it ?

eg : if sy-ucomm = 'x',

i want to dispaly first & third field as editable & second,fourth as non editable.

elseif sy-ucomm = 'y'.

i want to dispaly first & third field as non-editable & second,fourth as editable.

in the same table control. How to do it?

Thanks in Advance.

4 REPLIES 4
Read only

Former Member
0 Likes
488

hi!

if sy-ucomm = 'X'.

loop at screen.

IF screen-name = 'WA_UP-S_DATE' .------->WA_UP-S_DATE --> This is Table control field name

screen-input = 1.

modify screen.

endif.

endif.

endloop.

In BPO

LOOP AT SCREEN.

IF screen-name = 'WA_UP-S_DATE' .

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

ENDIF.

please post it in correct forum(UI Programming)

Edited by: dharma raj on Sep 15, 2009 1:16 PM

Read only

0 Likes
488

thanks

Read only

Former Member
0 Likes
488

in the layout assign some group to the table fields.

in PBO modules

check the sy-ucomm

if screen-group1 = 'XYZ'.

screen-input = '0'.

modify screen.

endif.

do this for all fields

Read only

Former Member
0 Likes
488

Hi RAJALAKSHMI PAULRAJ ,

To make the field non-editable in table control,

You have to a code inside a loop.

Loop at itab with control tc.

module editable.

endloop.

module editable.

loop at screen.

if screen-group1 = 'g1'.

SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

elseif screen-group2 = 'g2'.

SCREEN-INVISIBLE = '1'.

MODIFY SCREEN.

ENDIF.

endmodule.

Try and reply