on 10-03-2013 7:59 AM
Dear Experts,
Can anyone let me know "how to create Authorization object for executing Custom WD application "?.
If particular user is not authorited for executing my Z-WD Appl, then i need to show error " You are not authorized to execute" and need stop him to proceed further.
Thanks
Katrice
Hi Katrice,
You can use SU21 to create a new authorization object or find an existing one that meets your needs. Often a business analyst will have an idea of what authorization role/object will be assigned to users so you can check with your analyst if your organization is set up that way. If you are creating the authorization object yourself, here is a document that may be helpful, .
Once you have an authorization object in mind, you can call the standard authority-check, for example...
authority-check object 'MY_AUTH_OBJECT'
id 'ACTVT'
field '45'.
Authorization field "ACTVT" means "activity" and activity 45 is "allow" but you can use any ID and field you like when setting up the authorization object. If the user fails the authority-check, sy-subrc will be non-zero and you can issue a message to the user or redirect them to a different view that has information on who to contact for assistance. I usually include a "not authorized" view in my applications and redirect the user there.
Function module AUTHORITY_CHECK mimics the call to authority-check if you prefer a function call to check the user's authorization.
Cheers,
Amy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much Amy.Issue resolved.
Thanks
Katrice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Katrice,
You can create your own object class and authorization object in transaction SU21.
And you can use the autorization object in your WD application.
Best regards,
Shuai Liang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please check below links.
http://help.sap.com/saphelp_nw70ehp3/helpdata/en/4c/a0ac7a68243b9ee10000000a42189b/frameset.htm
http://scn.sap.com/thread/1469907
Hope it helps.
Best Regards,
Abirami
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.