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 Coding as different user

Former Member
0 Likes
3,202

Hello,

I would like a user to run a report. This report calls a SAP standard BAPI which performs an authorization check before executing its functionality.

The user has no authorization to perform the action of the BAPI and so it fails. Anyhow we dont want to add this function to the user role. He would be able to do other things then as well then which are restricted by our program logic.

Is it somehow possible to run a method or function module with a different user? So not the user who runs the BAPI but the program itself takes care of the authorization?

We cant do it via batch input as it needs to be online.

The only option I see is running the BAPI not internally but via a RFC destination with a loop back on the system to use the RFC user.

But if somebody has a cool and smart idea I would appreciate it very much!

Thanks,

Hendrik

2 REPLIES 2
Read only

Former Member
0 Likes
1,151

If the BAPI is RFC enabled, run it and logon as a generic user with just the authorizations needed.

rob

Read only

former_member156446
Active Contributor
0 Likes
1,151

I guess you can use a Remote Function call with the destination as the same system, and call make the Function to execute.

call <RFC>
destination <self>...