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

How can I code a program making sure an user have access to some transactions

former_member638722
Discoverer
0 Likes
1,360

Hi! I'm new to ABAP.

Currently, I'm working on making an ABAP program that shows visual text or whatever when

an user could access to some designated transaction codes.

The concept is like this:

1. I authorize an user

2. The program access to the transaction with that user ID

3-1. If it works normally(can get to transaction), write something(1,success,etc..)

3-2. If it doesn't work(user denied because of limited authoritzation), write something different

4. Roop 1-3

It'd be very helpful if some of you give me algorithm or more specific idea to make this program.

I've heard of other way using BAPI, but have no idea how could use that properly in this case.

The concept is just an apprentice's thought, so if you have better idea to achieve it, any ideas welcome.

1 ACCEPTED SOLUTION
Read only

former_member596005
Participant
0 Likes
1,233

Hi! I'm new to ABAP.

Currently, I'm working on making an ABAP program that shows visual text or whatever when

an user could access to some designated transaction codes.

The concept is like this:

1. I authorize an user

2. The program access to the transaction with that user ID

3-1. If it works normally(can get to transaction), write something(1,success,etc..)

3-2. If it doesn't work(user denied because of limited authoritzation), write something different

4. Roop 1-3

It'd be very helpful if some of you give me algorithm or more specific idea to make this program.

I've heard of other way using BAPI, but have no idea how could use that properly in this case.

The concept is just an apprentice's thought, so if you have better idea to achieve it, any ideas welcome.

4 REPLIES 4
Read only

s1252
Product and Topic Expert
Product and Topic Expert
0 Likes
1,233

Have you checked FM: AUTH_CHECK_TCODE

Read only

former_member596005
Participant
0 Likes
1,234
Read only

keremkoseoglu
Contributor
0 Likes
1,233

It's not exactly what you asked for, but I happen to have a class which returns the username - Tcode access information (like: Who accessed which Tcode, and when). Might be useful; here you go: https://github.com/keremkoseoglu/ABAP-Library/blob/master/zcl_bc_user_tcode_access.abap

Read only

and23_julius
Participant
0 Likes
1,233

Hi jiwon

It's a bit pointless in my opinion to show message, as when user have access, they would see the screen already. but if you want to inform user, at INITIALIZATION event, just add MESSAGE 'Hurrah I managed to access' TYPE I.

Access denied message are standard, maybe there is a way to change the message, but again, I don't see the point.

Best Regards

Andre Julius