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

Select options

Former Member
0 Likes
409

Hi ,

I want to create three select option fields like F1,F2,F3.But I want to display F1 and F2 for S1 user and

F3 for S2 user.

Please give reply urgently.

Regards,

Ravi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
389
SELECT-OPTIONS f1 for ... MODIF-ID m1
SELECT-OPTIONS f2 for ... MODIF-ID m1
SELECT-OPTIONS f3 for ... MODIF-ID m2
IF sy-uname = 'USER1'.
 LOOP AT screen.
   IF screen-group1 = 'M1'.
       screen-active  = 0.
   ENDIF.
  MODIFY SCREEN.
 ENDLOOP.
ELSE.
 LOOP AT screen.
   IF screen-group1 = 'M2'.
       screen-active  = 0.
   ENDIF.
  MODIFY SCREEN.
 ENDLOOP.

ENDIF.

2 REPLIES 2
Read only

Former Member
0 Likes
390
SELECT-OPTIONS f1 for ... MODIF-ID m1
SELECT-OPTIONS f2 for ... MODIF-ID m1
SELECT-OPTIONS f3 for ... MODIF-ID m2
IF sy-uname = 'USER1'.
 LOOP AT screen.
   IF screen-group1 = 'M1'.
       screen-active  = 0.
   ENDIF.
  MODIFY SCREEN.
 ENDLOOP.
ELSE.
 LOOP AT screen.
   IF screen-group1 = 'M2'.
       screen-active  = 0.
   ENDIF.
  MODIFY SCREEN.
 ENDLOOP.

ENDIF.

Read only

Former Member
0 Likes
389

Hi,

I would just like to add two thing to solution provided by Wenceslaus.

1. The code to loop through screen table to modify fields is to be written in the event At Selection Screen Output.

2. You may not like to hard code the username in your program in that case you should use autority objects to achieve the same.

regards,

Sumeet Mishra