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

Parameter Passing between Background Jobs

Former Member
0 Likes
1,207

Hi there,

I have a problem regarding background processing, I have a function module in which, a master background job is scheduled, the master background job is an ABAP program and in this program, I need to schedule several worker background jobs. Each worker job is another ABAP program and the same one.

I'm wondering in which way I can pass parameters when the master job schedules each worker job. I found one function module 'GET_JOB_RUNTIME_INFO' which can get the job name at run time, I can use this function module in the worker job and put my parameters into the job name pattern.

But my problem is, the job name is set as CHAR32 and I need many more parameters which obviously exceed the length of a job name. But I have to pass parameters from the master job to each worker job. Could anyone tell me how I can realise this, please?

Thanks and best regards,

James

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
707

Hi,

Use the SET PARAMETRS and GET PARAMETERS.

Write below statement in you MAster job...

DATA : v_count TYPE I.

EX: SET PARAMETER ID 'ABC' FIELD v_count.

In your worker job

DATA : v_count TYPE I.

GET PARAMETER ID 'ABC' FIELD v_count.

For each worker job declare different parameter IDs.

Note : Parameter IDs should be different and fields(Ex: v_count) should have samename and data type in master and worker.

Hi there,

I have a problem regarding background processing, I have a function module in which, a master background job is scheduled, the master background job is an ABAP program and in this program, I need to schedule several worker background jobs. Each worker job is another ABAP program and the same one.

I'm wondering in which way I can pass parameters when the master job schedules each worker job. I found one function module 'GET_JOB_RUNTIME_INFO' which can get the job name at run time, I can use this function module in the worker job and put my parameters into the job name pattern.

But my problem is, the job name is set as CHAR32 and I need many more parameters which obviously exceed the length of a job name. But I have to pass parameters from the master job to each worker job. Could anyone tell me how I can realise this, please?

Thanks and best regards,

James

2 REPLIES 2
Read only

Former Member
0 Likes
708

Hi,

Use the SET PARAMETRS and GET PARAMETERS.

Write below statement in you MAster job...

DATA : v_count TYPE I.

EX: SET PARAMETER ID 'ABC' FIELD v_count.

In your worker job

DATA : v_count TYPE I.

GET PARAMETER ID 'ABC' FIELD v_count.

For each worker job declare different parameter IDs.

Note : Parameter IDs should be different and fields(Ex: v_count) should have samename and data type in master and worker.

Read only

0 Likes
707

Hi there,

This does provide a means for parameter passing, however in my scenario, each worker job is manifested by the same ABAP program, therefore at run time the worker job is not able to recognise which parameter it corresponds to since for worker jobs, different parameter ids are specified in the master job.

Best regards,

James