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

Authorization

Former Member
0 Likes
852

Hello Friends,

I have developed a screen Program in SE51.

I have couple of push buttons and every button calles a report program.

However all the push buttons should be authorized for all users. Is there a way I can activate push buttons based on the user name.

say for example,

there are 2 push buttons,

Button1, Button 2.

Button1 should not be permitted for User2 and so on.

Any suggestions.

Ster

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
829

If the push buttons are in the screen you can hide them in the following way:

1.Write a module in PBO to check the authorization.

2.If the authorization fails then set the flag.

3.


  LOOP AT SCREEN.
    IF screen-name = 'BUTTON1' AND flag = 'X'.
      screen-active = '0'."'space'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

the button will be hidden.

7 REPLIES 7
Read only

Former Member
0 Likes
830

If the push buttons are in the screen you can hide them in the following way:

1.Write a module in PBO to check the authorization.

2.If the authorization fails then set the flag.

3.


  LOOP AT SCREEN.
    IF screen-name = 'BUTTON1' AND flag = 'X'.
      screen-active = '0'."'space'.
    ENDIF.
    MODIFY SCREEN.
  ENDLOOP.

the button will be hidden.

Read only

0 Likes
829

Hide them only?

What if the user knows the function code?

Read only

0 Likes
829

You can give another authorization check at PAI.

Read only

Former Member
0 Likes
829

Hi

You can assign authorizations for the report, and in the PBO check whether the user is having authorizations for all the reports using Authority object.

Based on that, you can loop and modify the screen

Regards

MD

Read only

0 Likes
829

Thanks All for the replys.

My Question is how would I assign the authorizations. I mean How would I do it.

Once I do the suthorization I can modify the code in the PBO.

T Code and steps Pls for authorization.

Thanks,

Ster.

Read only

0 Likes
829

Any More suggestions pls.

Ster

Read only

0 Likes
829

Any More suggestions pls.

Ster