cancel
Showing results for 
Search instead for 
Did you mean: 

Background job distribution on application servers

Former Member
0 Kudos

Hi experts,

We have the following situation.

There is a system (A) with two application servers (A.1 and A.2) on which some background jobs (standard FPP framwork jobs) are started via an RFC call, from another system (B). We would like to restrict the target servers to a single one(either A.1 OR A.2). Is this possible?

The answers I found so far were about jobs scheduled manually in SM37.

Others suggested creating a job server group in SM61 ('SAP_DEFAULT_BTC') to which jobs, which don't have a target server, will be assigned.

However this is not a good solution since the jobs are created and started from the code at runtime.

Thank you,

Calin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Thanks for your answer, my issue was solved by providing the optinal 'distribution' parameter to job's 'set_run_data' method, before staring the jobs' execution. This way, all the jobs were started only on the specified Application Servers.

Thank you,

Calin

kiran_k8
Active Contributor
0 Kudos

Calin,

Do you know what EXECUTION TARGET field is used for in SM36 ? It even has Server names in F4 help.

Also kindly let us know where is this option DISTRIBUTION in SM36.

Thanks,

K.Kiran.

Former Member

Hi Kiran,

The "Execution Target" field in SM36 is used to define target Application Servers (AS) or Job Server Groups on which the jobs will be started.

Note that Job Server Groups are sets of application servers, which you can maintain in SM61 (Shift + F12).

Regards,

Calin

Answers (2)

Answers (2)

alexander_bolloni
Contributor

Hi,

you should be able to achieve the same things for Jobs scheduled via ABAP API as compared to when you do it manually in SM36.

Jobs can have a target Server Group (defined in SM61) or Jobs can also have an explicit target Server. Using a Server Group is better because if a Server is down for example, another Server in the Group could take over.

What API are you using to create the Job?

Regards,

Alex

Former Member
0 Kudos

Hi Alex,

Thanks for your answer.

You are right; if I provide the server name to FPP's standard API *FPP_INTERACTION_RUNS->SET_RUN_DATA( ) method, the jobs are started only on the specified server.

I created a Job Server Group in SM61 and provided it to the method above. However, this approach does not work, for some reason. The job's status in SM37 is "Cancelled" and the error in the job log is "No work processes are available for 5 background job. No jobs can be started". Maybe the server group is not recognized? (although I do have access to the group in SM36). The work process limit is not the problem either, since I was able to start 5 or 10 jobs in a previous test.

Thanks,

Calin

former_member182967
Active Contributor
0 Kudos

Try to maintain the target node in RFC setting and then trigger the background job, is it OK?