‎2009 Sep 15 8:37 AM
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.
‎2009 Sep 15 8:42 AM
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
‎2010 Jan 22 2:37 AM
‎2009 Sep 15 8:43 AM
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
‎2009 Sep 15 9:55 AM
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