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

Problem with Batch jobs

Former Member
0 Likes
587

Hi,

I am having problem with the Batch job.

I am using the following code,

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = lv_jobname

sdlstrtdt = p_bdate

sdlstrttm = p_btime

IMPORTING

jobcount = lv_jobcount

SUBMIT (gv_program) VIA JOB lv_jobname NUMBER lv_jobcount

WITH p_vkorg = p_vkorg.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = lv_jobcount

jobname = lv_jobname

.

When i use the above code, job is getting created, when i go to SM37 and release the job. it is getting executed but another job is getting created automatically with same name.

please advice i might have gone wrong.

Thanks.

Hi,

I am having problem with the Batch job.

I am using the following code,

CALL FUNCTION 'JOB_OPEN'

EXPORTING

jobname = lv_jobname

sdlstrtdt = p_bdate

sdlstrttm = p_btime

IMPORTING

jobcount = lv_jobcount

SUBMIT (gv_program) VIA JOB lv_jobname NUMBER lv_jobcount

WITH p_vkorg = p_vkorg.

CALL FUNCTION 'JOB_CLOSE'

EXPORTING

jobcount = lv_jobcount

jobname = lv_jobname

.

When i use the above code, job is getting created, when i go to SM37 and release the job. it is getting executed but another job is getting created automatically with same name.

please advice i might have gone wrong.

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
561

as ur using SUBMIT it is creating one more job....instead use JOB_SUBMIT fm.

Message was edited by:

Ramesh Babu Chirumamilla

Read only

Former Member
0 Likes
561

Thanks ..My problem is solved ..

Read only

Former Member
0 Likes
561

if ur problem is solved then close the thread by awarding points.

Read only

Former Member
0 Likes
561

Thanks