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

Call a BAPI with different user ID

Former Member
0 Likes
4,431

Hi All,

Here is my scenario:

CALL BAPI

System 1 -


> System 2

<----


TRANSFER DATA

What I want to do is when I call the BAPI in System 2 with a different user ID than is actually logged into System 1

executing the BAPI.

Is this possible?

thanks.

JB

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,636

Hello,

I suppose you use a Trusted RFC connection in your BAPI call and not an RFC destination with a dedicated user in it.

What you can do in the source system is calling your BAPI from a background process (job).

You can change the user ID in the step of the job.

In this case trusted RFC will make sure that the BAPI is called in the target system with the user specified in the step.

If trusted RFC is not an option you can use an RFC destination with a dedicated user ID in it.

I hope this helps.

Wim

2 REPLIES 2
Read only

Former Member
0 Likes
1,637

Hello,

I suppose you use a Trusted RFC connection in your BAPI call and not an RFC destination with a dedicated user in it.

What you can do in the source system is calling your BAPI from a background process (job).

You can change the user ID in the step of the job.

In this case trusted RFC will make sure that the BAPI is called in the target system with the user specified in the step.

If trusted RFC is not an option you can use an RFC destination with a dedicated user ID in it.

I hope this helps.

Wim

Read only

Former Member
0 Likes
1,636

Hi jamie,

yes it is possible...

In RFC destination SM59 created to all system 2, change the user id and pwd with which you need to call to system 2.

then BAPI will execute with username you provided in RFC destination.

normally it will be provided with service user which carries current system user.

Regards

Syed A