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

Switch to different application server in ABAP program

Former Member
0 Likes
10,879

Hello everyone,

I am currently working on some ABAP objects classes and tool programs for additional user administration functionality. We are runnig a SAP ERP system with distributed application servers and active logon load-balancing for users.

I'd like to switch to a different application server from within my program in order to get all relevant information for an active user. So far I only found the function TH_SELECT_SERVER (from the function group THFB) for this, but this uses a separate dialog for interactively switching to another application server.

I could use RFC calls with a lookup table for the destinations of individual application servers, but this would not be as flexible. Also I would have to create some wrapper code for standard functions which are not defined as RFC-usable. So I would rather like to switch to the other server instead.

What I'd like to do instead is switching to another server from a user-related server list without any additional interaction in order to run a function locally on the other server. Does anybody know some function, object method etc. which will do the trick?

Greetings,

Markus.

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
7,790

Did you try transaction SM51?

Thomas

5 REPLIES 5
Read only

ThomasZloch
Active Contributor
0 Likes
7,791

Did you try transaction SM51?

Thomas

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
7,790

Hello Thomas,

I think the person who posted wants to automate the process.

Do you think a BDC for SM51 will help?

BR,

Suhas

Read only

0 Likes
7,790

You're right, so maybe TH_REMOTE_TRANSACTION could be helpful. This is what SM51 uses once the "remote login" button is clicked. In general, some of the TH_* function modules might be helpful here.

Thomas

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
7,790

Hello Thomas,

Bingo !!!

I debugged the report program RSM51000_ALV & found the sub-routine SM51_USER_CMD.

The SY-UCOMM for our purpose is 'RLOG'. and it utilises the FM 'TH_REMOTE_TRANSACTION' )

Hope this will be of some help to the thread starter.

BR,

Suhas

Read only

0 Likes
7,790

Hello Thomas,

Thanks for the tip. I had to fix some other things first, so I could try using TH_REMOTE_TRANSACTION only today.

In combination with a filtered list from TH_SYSTEMWIDE_USER_LIST which provides the server destination for each user, it works just fine. Finding a user on the application servers and switching over to the desired server now works in one go.

Thanks a lot...

Greetings,

Markus.