Application Development 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: 

Authorization

Former Member
0 Kudos

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

former_member212653
Active Contributor
0 Kudos

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

former_member212653
Active Contributor
0 Kudos

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.

0 Kudos

Hide them only?

What if the user knows the function code?

0 Kudos

You can give another authorization check at PAI.

Former Member
0 Kudos

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

0 Kudos

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.

0 Kudos

Any More suggestions pls.

Ster

0 Kudos

Any More suggestions pls.

Ster