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

Run time Authorization

former_member375795
Participant
0 Likes
1,383


How to give runtime Authorization

Requirement is like that ..

We are design some application in SAP  but this application consider 4 different Tcodes but now main problem is that number of user use this application is 20   so when user go inside the application there related tcode get authorized to use .only when it enter in application

Please Help me out !!!!!!!!!!

9 REPLIES 9
Read only

Harsh_Bansal
Contributor
0 Likes
1,347

Hi Alok,

Based on sy-uname and sy-tcode values you can code your own error messages based on whether you want to give authorization or not.

Regards,

Harsh Bansal

Read only

narendar_naidu
Active Participant
0 Likes
1,347

Hi,

Create a ztable and maintain all the users who need authorizations in the table,now in the program use a select single statement to check whether,the user id exists or not and based on sy-subrc throw error.

Regards,

Read only

Abhijit74
Active Contributor
0 Likes
1,347

Hi Alok,

Requesting you to check below link.

<link farm removed>

Thanks & Regards,

Abhijit

Message was edited by: Suhas Saha

Read only

0 Likes
1,347

Sir ,

They all are login in SAP by same one id , for my application I give new login inside SAP system

Sap user id - Store1

application user id - emp1( very up to 20 person in same department  )

according to emp1 I want to give authorization .

Read only

0 Likes
1,347

Hi Alok,

In this case, develop new screen before going to application.

Catch the employee number or any unique number and maintain the authorization in ztable based on the unique number. Now check the authorization based on the number.

Then only you can achieve the same.

Arivazhagan S

Read only

0 Likes
1,347

That is want only sir , help me out

Please tell me steps ..

Read only

0 Likes
1,347

Hi Alok,

Suppose, if you want to check for ME51N(PR Creation).

Create new screen to enter the emp number and password and create TCode like ZME51N.

Valid the emp number with HR tables and also validate  the authorization of TCode using ZTable.

Then Export and import the Emp number thro user exit or BAdi and store into EBAN table and field name is Tracking number for reference.

Arivazhagan S

Read only

Former Member
0 Likes
1,347

Alok,

Say your main application tcode is A and you have another tcodes b c d which is called inside A and can be called directly as well

you can achieve this by

1. setting a memory and pass the entry t code to the application and store it eg: so while u enter in the application the value will be say A

,2. Now u enter in your application. For each t codes at the begining, Import the memory and check whether the tcode value is A if yes proceed else throw an error message

3. If some one enters the tcode directly, the memory value will be empty, so your check fails and he gets an error and cannot proceed

Further you can validate the user id if you wish to restrict the users in the application entry point

Read only

arnab_das5
Explorer
0 Likes
1,347

Hi Alok,

  I think u have to create new screen for this.

  Thanks to Arivazhagan S.

  I tried with your solution, and yes its working fine. Nice one.

Regards

Arnab