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

Error message without going to the selection screen

0 Likes
1,660

Hi All,

I need to check for authorization for a custom transaction, if the user does not have authorization, then I should not go to the selection screen at all. I must display an error message "You are not authorized to use the transaction" just like how the standard functionality behaves. I have done the authority check and then used the message type 'E', but i see that the selection screen is displayed at the back side and the error message comes like a popup screen with the button called 'Exit'. Once I press this exit button then it goes to SAP easy access screen. Please let me know how to avoid the selection screen and straightaway go to the SAP easy access screen with the error message displayed at the bottom of this screen.

4 REPLIES 4
Read only

former_member195270
Active Participant
0 Likes
1,017

write your authorization code at initilization event.

Read only

Former Member
0 Likes
1,017

Hi,

     write authority-check object under at selection screen output event.

Read only

Former Member
0 Likes
1,017

Hi Jean,

What you can do is place the authority check in INITIALIZATION event of the program.

If the authority check fails, then u write the statement MESSAGE xxxx TYPE 'S' DISPLAY LIKE 'E'. and then write LEAVE PROGRAM.

This should solve your problem.

Hope this helps.

Regards,

Himanshu

Read only

Former Member
0 Likes
1,017

Hi Jean,

you can get the results. Try this .... you will get the below screenshot result

plz award points if it helps

when you display error message for authorization code  :

-> message s001(MSG_CLASS) display like 'E'.

     call transaction 'SESSION_MANAGER'.

Thanks

Vivek