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: 

how to restric a program with authorization in sap by the message that you are not authorized.

yasu_1096
Explorer
0 Kudos

how to restric a program with authorization in sap by providing the message that you are not authorized.

Example if a user having a program that would be while he execute the program the message should come as you are not athorized & he cant able to move to next step that means he should just see the code but not authorized to execute the program through O9 data services in SAP

1 ACCEPTED SOLUTION

NaveenKumarC
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Afgan Mohammed Yaser,

Please check the below link to understand the process.

Link

Regards,

Naveen Kumar Chikkanna.

11 REPLIES 11

DominikTylczyn
Active Contributor
0 Kudos

Hello yasu_1096

yasu_1096Use AUTHORITY-CHECK and then MESSAGE if the authorization check fails.

Best regards

Dominik Tylczynski

0 Kudos

I think you could check only for TCODE not for program name

0 Kudos

Hi

3a9e4ce873a94034b33dc62b0ce600ee

everyone is telling this one can i know the process how to create it?

0 Kudos

Thank you Mr. Frederic Girod the link is most useful to us

raymond_giuseppi
Active Contributor

Usually users don't execute program but transactions.

  • System already executes an AUTHORITY-CHECK on authorization object S_TCODE.

Are your users allowed to a transaction such as SA38 to execute reports.

  • System already executes an AUTHORITY-CHECK on authorization object S_PROGRAM for action SUBMIT

Of course you can add and handle a customer AUTHORITY-CHECK in your program in the LOAD-OF-PROGRAM event or initial dynpro (Many standard programs use an AUTHORITY-CHECK on their default transaction, often in initial dynpro logic)

NB: You could also notice in authorizaton object S_PROGRAM a P_GROUP field, that can also be handled in authorization. Manage the group list in table TPGP[T] with SM30 and use the group code in program attributes. (Using group to require less maintenance on user roles)

0 Kudos

Check authorization to execute a transaction or a program is bare minimum. On top of that access to organizational level, document types etc. should be validated.

0 Kudos

dominik-tylczynski , so often the first authorization check is performed in INITIALIZATION step for reports when the start values for parameter and selection criteria are initially set.

NaveenKumarC
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Afgan Mohammed Yaser,

Please check the below link to understand the process.

Link

Regards,

Naveen Kumar Chikkanna.

0 Kudos

thank you

Sandra_Rossi
Active Contributor
0 Kudos

If you get unprecise answers, it's normal, because you are saying "through O9 data services" only at the very end as if it had no importance...

People answered generically to the rest of your question.

Could you explain how it's integrated with SAP system, which ABAP program or service is called by O9?