Application Development 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: 

Execute a program in Particular App server

Former Member
0 Kudos

Hi All,

How to get the different application servers or instances in particular server.

Is there any Table or FM.

Also suppose i login into A App server and i want to execute the abap program in B App server from A App server.

How should i do that.

Regards,

Prashanth

11 REPLIES 11

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Function module TH_SERVER_LIST will give you the server names.

To run a program on a specific server, you could submit it via a background job. Jobs can be assigned to a target server. It is possible to define a job on the fly, look into function group BTCH for that. Function module BP_JOB_CREATE has the option to specify the app.server. I'd think there are other ways as well, this is just a quick idea to start your investigation.

0 Kudos

i want to run the program in different server and get the result into present server and do the processing.

if i schedule it in background, i will not get the result into the present job.

actually my requirement is to get some details which are specific to application server, Take those details and do some processing on them.

0 Kudos

like what details? why is that needed to run on that server only to get that detail?

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

You can do that if you run your program using SUBMIT progname VIA JOB... AND RETURN.

Read the documentation for that to see how it works. It talks about using the JOB_SUBMIT function module to create the job, but that one doesn't have the capability to specify the target server name. However, internally JOB_SUBMIT calls BP_JOB_CREATE which CAN specify the server name. So just use that FM (with the appropriate parameters) to create the job and then submit your program VIA JOB. Take a look at the JOB_SUBMIT function module to see what to do before calling BP_JOB_CREATE.

Since you return control to the submitter program, you should be able to get results back to process them further.

0 Kudos

If you're logged in through one application server, you can change it to a different one by going into SM51 and double clicking on the app server you want to switch to. That session and any other new session created from that session will be the second app server (look in the status bar of the window, You will have different windows with different app servers. ).

0 Kudos

Hi,

I want to get the profile parameters(rz11) of different app servers.

Profile parameters differ from each app server so i want to get the details for all the app servers by running a program in a single app server(instance).

suppose i have 3 app servers, and i run the program in A App server and i ill get the details of that app server but i also want the details of the other 2 app servers.

Hope you got my requirement.

Regards,

Prashanth

tamas_hoznek
Product and Topic Expert
Product and Topic Expert
0 Kudos

Submit program RSPFPAR the way I recommended (SUBMIT VIA JOB), and that should give you what you're looking for.

Use FM TH_SERVER_LIST to get the list of available app.servers.

0 Kudos

You can do one thing...

create different server groups for every server in RZ12.

then

call function 'XYZ' starting new task in group <the group you created> 
          performing <sub> on end of task.

do this for every server.. this FM XYZ can read the RZ11 parameter..

Former Member
0 Kudos

in SM36 when you create a job there is a option for execution server(target server) you can pass the required server there.

and if you want to do it from code, then jub submit has parameters to pass the targets server

christoph_weyd
Product and Topic Expert
Product and Topic Expert
0 Kudos

Try report /SDF/PARAM with parameter status ='A'. This report can read all parameters from all application servers which are not changed dynamic via RZ11.

Former Member
0 Kudos

Hi,

I got it resolved by doing sending the destination and again internally get the instances from the table.

the same instances we have in SM59 which can be called internally as RFC destination.

we can't call these destinations from outside as these rfc destinations are available once you get into any system.

Thanks all for the valuable inputs. and points given for helpful answer.

Thanks

Prashanth