2007 Dec 20 6:00 AM
Dear All,
Could u tell me, how to schedule the background job...in step by step.
Regards,
Thanuskodi T.
2007 Dec 20 6:09 AM
hi
good
Procedure
1.Call Transaction SM36 or choose CCMS ® Jobs ® Definition.
2.Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
3.Set the jobs priority, or Job Class:
· High priority: Class A
· Medium priority: Class B
· Low priority: Class C
4.In the Target server field, indicate whether to use system load balancing.
· For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
·To use a particular application server to run the job, enter a specific target server.
5. If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
6.Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
7. Define the jobs steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
8.Save the fully defined job to submit it to the background processing system.
9.When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
Note: Release the job so that it can run. No job, even those scheduled for immediate processing, can run without first being released.
reward point if helpful.
thanks
mrutyun^
2007 Dec 20 6:02 AM
sm36 > give ur job name> hit on step>
give ur program name and a variant. save.
or if its a report or any .. hit F9 ... in sm37 u will see the program name
2007 Dec 20 6:05 AM
we can schedule using fm job_open and job_close ...else u can call transaction sm37 n then schedule it accordingly
2007 Dec 20 6:06 AM
SM36, select job wizard from application tool bar, it will take u through the steps to set up job.
2007 Dec 20 6:09 AM
hi
good
Procedure
1.Call Transaction SM36 or choose CCMS ® Jobs ® Definition.
2.Assign a job name. Decide on a name for the job you are defining and enter it in the Job Name field.
3.Set the jobs priority, or Job Class:
· High priority: Class A
· Medium priority: Class B
· Low priority: Class C
4.In the Target server field, indicate whether to use system load balancing.
· For the system to use system load balancing to automatically select the most efficient application server to use at the moment, leave this field empty.
·To use a particular application server to run the job, enter a specific target server.
5. If spool requests generated by this job are to be sent to someone as email, specify the email address. Choose the Spool list recipient button.
6.Define when the job is to start by choosing Start Condition and completing the appropriate selections. If the job is to repeat, or be periodic, check the box at the bottom of this screen.
7. Define the jobs steps by choosing Step, then specify the ABAP program, external command, or external program to be used for each step.
8.Save the fully defined job to submit it to the background processing system.
9.When you need to modify, reschedule, or otherwise manipulate a job after you've scheduled it the first time, you'll manage jobs from the Job Overview.
Note: Release the job so that it can run. No job, even those scheduled for immediate processing, can run without first being released.
reward point if helpful.
thanks
mrutyun^
2007 Dec 20 6:16 AM
Hi Thanuskodi,
Find below steps
1. Goto Trans -> SM36
2. Define a job with the program and variant if any
3. Click on start condition in application tool bar
4. In the pop-up window, click on Date/Time
5. Below you can see a check box "Periodic Job"
6. Next click on Period Values
7. Select "Other Period"
8. Now give '15' for Minutes
9. Save the job
In SM37 u can check the status of the jobs that u have assigned to background...
Here u mention the job name or the report name to check the status of the job...
Anotherway to Shedule Job in Background
We can submit a job in background using SM36 that is one way.
Progamaticcaly ,which is the "full-control" method using the JOB_OPEN, JOB_SUBMIT, and JOB_CLOSE function modules.
With this method, you have full control over such job options as printing, start time options, and so on.
Sample code for how to use these function modules.
Create your job with JOB_OPEN. The module returns a unique job
number. Together with the jobname, this number identifies the
job. Other parameters are available, but are not required.
JOBNAME = 'Freely selectable name for the job(s) you create'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = JOBNAME
IMPORTING
JOBCOUNT = JOBNUMBER
EXCEPTIONS
CANT_CREATE_JOB = 01
INVALID_JOB_DATA = 02
JOBNAME_MISSING = 03
OTHERS = 99.
IF SY-SUBRC > 0.
<Error processing>
ENDIF.
Add a job step: ABAP program
CALL FUNCTION 'JOB_SUBMIT'
EXPORTING
AUTHCKNAM = SY-UNAME " Runtime authorizations
" user
JOBCOUNT = JOBNUMBER " Value from JOB_OPEN
JOBNAME = JOBNAME " Value from JOB_OPEN
REPORT = 'REPORT' " Report to be run
VARIANT = 'VARIANT' " Variant to use with
" report
PRIPARAMS = USER_PRINT_PARAMS " User printing options
ARCPARAMS = USER_ARC_PARAMS " User archiving options
" Both sets of options
" come from
" GET_PRINT_PARAMETERS
EXCEPTIONS
BAD_PRIPARAMS = 01
INVALID_JOBDATA = 02
JOBNAME_MISSING = 03
JOB_NOTEX = 04
JOB_SUBMIT_FAILED = 05
LOCK_FAILED = 06
PROGRAM_MISSING = 07
PROG_ABAP_AND_EXTPG_SET = 08
OTHERS = 99.
IF SY-SUBRC > 0.
<Error processing>
ENDIF.
Submit job for processing: immediate start
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = JOBNUMBER " Job identification: number
JOBNAME = JOBNAME " and name.
STRTIMMED = 'X' " Schedules the job for
" immediate start. The job
" is started immediately
" only if the user has the
" RELE authorization to
" release a job to run.
IMPORTING
JOB_WAS_RELEASED = JOB_RELEASED " If user has authorization
" to release jobs to run, job
" is automatically released
" when it is scheduled. This
" field is set to 'x' if the
" job has been released.
" Otherwise, the job is sche-
" duled but must be released
" by an administrator before
" it can be started.
EXCEPTIONS
CANT_START_IMMEDIATE No longer used. Replaced by IMPORTING
parameter JOB_WAS_RELEASED.
INVALID_STARTDATE = 01
JOBNAME_MISSING = 02
JOB_CLOSE_FAILED = 03
JOB_NOSTEPS = 04
JOB_NOTEX = 05
LOCK_FAILED = 06
OTHERS = 99.
IF SY-SUBRC > 0.
<Error processing>
ENDIF.
Check the job status through SM37 transaction.
Kanagaraja L