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

Background Job pass value

Former Member
0 Likes
642

Hi, I am calling a Background job in my program. I am using JOB_OPEN, JOB_SUBMIT and JOB_CLOSE FM to start a job. My need is to pass a value to the job program(job program doesnt have any selection screen values). Is their any way without creating variants each time to pass value to it.

Please advice.....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
598

Hello,

You can first use JOB_OPEN which returns job number. Then build ranges or parameters to use SUBMIT to call the program.

Eg: SUBMIT RM06BB20 AND RETURN

WITH S_EKGRP IN R_EKGRP

WITH S_EKORG IN R_EKORG

WITH S_FLIEF IN R_FLIEF

WITH S_KONNR IN R_KONNR

USER sy-uname VIA JOB w_jobname

NUMBER w_job_number.

Now use JOB_CLOSE.

Thanks,

Venu

Hi, I am calling a Background job in my program. I am using JOB_OPEN, JOB_SUBMIT and JOB_CLOSE FM to start a job. My need is to pass a value to the job program(job program doesnt have any selection screen values). Is their any way without creating variants each time to pass value to it.

Please advice.....

3 REPLIES 3
Read only

Former Member
0 Likes
599

Hello,

You can first use JOB_OPEN which returns job number. Then build ranges or parameters to use SUBMIT to call the program.

Eg: SUBMIT RM06BB20 AND RETURN

WITH S_EKGRP IN R_EKGRP

WITH S_EKORG IN R_EKORG

WITH S_FLIEF IN R_FLIEF

WITH S_KONNR IN R_KONNR

USER sy-uname VIA JOB w_jobname

NUMBER w_job_number.

Now use JOB_CLOSE.

Thanks,

Venu

Read only

Former Member
0 Likes
598

Hi,

Create a varient and while run job you select that varient.

Regards

Md.MahaboobKhan

Read only

Former Member
0 Likes
598

Hi ,

You can use Submit statement with additiob Via selection-set .

regards

Pinaki