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: 

Job Scheduled but not relesed and finish automatically

Former Member
0 Kudos

Hi

I m submitting a report as an background job so wat happened is it goes in schedule mode and does not start immediately even i waited for an hour or so, But it does not get started

i manually have to go to SM37 and relese the job immediately then only it starts ...

Wat shd i do to start it automatically as i submit the job

i hv tried job_close FM also and pass startimmed = 'X'

but still does not work so i commented it

Pls Help me on this.......

Regerds

Rajan

9 REPLIES 9

Former Member
0 Kudos

Hi rajan mehta

JOB_OPEN

JOB_SUBMIT

JOB_CLOSE

SDLSTRTDT & SDLSTRTTM

to pass the required start date and time (respectively) of your background job.

these are the function modules used to shedule in programmatically.

Regards

Deva

0 Kudos

Hi Deva



CALL FUNCTION 'JOB_OPEN_ADK'
    EXPORTING
      JOBNAME  = TBTCO-JOBNAME
      JOBGROUP = 'F110'
    IMPORTING
      JOBCOUNT = JOBCOUNT
    EXCEPTIONS
      OTHERS   = 1.
  IF SY-SUBRC = 1.
    MESSAGE S250.
    SET SCREEN 0.
    LEAVE SCREEN.
  ENDIF.


SUBMIT SAPF110S AND RETURN
                  USER SY-UNAME
                  VIA  JOB JOBNAME NUMBER JOBCOUNT
                  WITH PARLAUFD = F110V-LAUFD
                  WITH PARLAUFI = F110V-LAUFI
                  WITH PARXVORL = XVORL.

CALL FUNCTION 'JOB_CLOSE_ADK'
      EXPORTING
        JOBNAME      = TBTCO-JOBNAME
        JOBCOUNT     = JOBCOUNT
        STRTIMMED    = F110V-XSTRF
        TARGETSYSTEM = F110V-BHOST
      EXCEPTIONS
        OTHERS       = 1.

I have done this its a standard report that i am submitting and useing the above FM but still its get schedule only i hv to start it manually from sm37....

Thnxs & Regards

Rajan

former_member188685
Active Contributor
0 Kudos

show your code for responsible for Job. how you are submitting the job.

0 Kudos

Hi Vijay Babu Dudla

I hv put my code u can see that

its a standard report that i m submitting

0 Kudos

why can't you try with JOB_OPEN and JOB_CLOSE functions , if you didn't try that option.

0 Kudos

Hi actually it was the standard report for payment program f110

I have created its Zf110 and done with the changes but simply wat it does just submit this report in background for calculation and everything

When i tried Job_open and job_close it gives me some function error and said proposal could not creted so i commented it ..

and i kept which ever standard report has used so noe my zf110 runs perfactly but just every time i hv to go to sm 37 for manually release the job

Pls help me on this

Thanxs & Regards

Rajan

0 Kudos

But the Functions are internal use.

"SAP Internal Use Only ! Special Development for Archiving Group

ok, atleast try with JOB_CLOSE Function instead of CLOSE_ADK function.

or else..

After calling the JOB_CLOSE_ADK , Use commit work statement.

0 Kudos

Hi thanxs i ll try commit work and get back to u ......

Former Member
0 Kudos

i hv use the other FM

regards

rajan