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

Setting screen field attributes

Former Member
0 Likes
1,067

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 ?

1 ACCEPTED SOLUTION
Read only

jeroen_verbrugge2
Active Participant
0 Likes
640

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.

4 REPLIES 4
Read only

jeroen_verbrugge2
Active Participant
0 Likes
641

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
640

(FAQ) Start with LOOP AT SCREEN and MODIFY SCREEN online help. (or press F1 on abap source)

Regards,

Raymond

Read only

Former Member
0 Likes
640

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

Read only

Former Member
0 Likes
640

Thanks Jerome , Raymond and Vivek.