2013 Jan 10 1:44 PM
Hello ,
I am working on a code where I am required to set the field attribute to
Output Only OR Input possible depending upon certain conditions.
Does anyone know how to go about to get this functionality ?
I have a vivid idea that we will have to access the attributes in the PBO module of the screen but how ?
2013 Jan 10 1:56 PM
Hi,
You need to use the loop at screen command in the PBO.
Have a look here :
http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_SCREEN.htm
http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SCREEN.htm
Rgds,
Jeroen.
2013 Jan 10 1:56 PM
Hi,
You need to use the loop at screen command in the PBO.
Have a look here :
http://help.sap.com/abapdocu_70/en/ABAPLOOP_AT_SCREEN.htm
http://help.sap.com/abapdocu_70/en/ABAPMODIFY_SCREEN.htm
Rgds,
Jeroen.
2013 Jan 10 1:57 PM
(FAQ) Start with LOOP AT SCREEN and MODIFY SCREEN online help. (or press F1 on abap source)
Regards,
Raymond
2013 Jan 10 2:37 PM
Hi Shubhendu,
We can set the field I/O dynamically. If you are working specifically with module pool programming, could you please give a brief desciption of the issue being faced.
You can try the below code and check output for your reference
" when you check a single check box - the other two will get disabled.
tables screen.
parameters: w1 as checkbox modif id 1 user-command flag,
w2 as checkbox modif id 2 user-command flag1,
w3 as checkbox modif id 3 user-command flag2.
at selection-screen output.
IF w1 = 'X' .
loop at screen.
if screen-group1 = '2' or screen-group1 = '3'.
screen-input = '0'.
endif.
modify screen.
endloop.
elseif w2 = 'X'.
loop at screen.
if screen-group1 = '1' or screen-group1 = '3'.
screen-input = '0'.
endif.
modify screen.
endloop.
elseif w3 = 'X'.
loop at screen.
if screen-group1 = '1' or screen-group1 = '2'.
screen-input = '0'.
endif.
modify screen.
endloop.
ENDIF.
For more information you can refer
http://help.sap.com/saphelp_470/helpdata/en/d1/801c54454211d189710000e8322d00/content.htm
http://help.sap.com/saphelp_470/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm
Please let me know if this helps. Let me know in case of any issue.
Regards
Vivek
2013 Jan 10 2:41 PM