Thursday, 6 June 2013

How to schedule the background job in SAP (SM36)

You can schedule the background job using  SM36. Planned or immediate jobs can be scheduled.

Step 1) Execute T-code SM36.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 2) Fill the job name, priority(A/B/C) and the target server. Background jobs once scheduled on a target server run on that server. Main purpose of defining target server is the workload balancing.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 3) Click on "spool list recipient". You will get output in your mailbox. You can check email from SBWP.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 4) Insert your SAP username and click the copy button.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 5) Click Step button to define ABAP program, variant's details, etc.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 6) Define program name, variant details. 
  1. Enter your program name, Variant name in the field. If you have not created variant as per your requirement, then leave it blank.
  2. Press save button.

SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 7) Once you schedule the job you will get the following screen.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 8) Click Start conditions to fill start date, end date, frequency, etc for job. If you do not specify start condition then job will always remain in scheduled status. A  job in scheduled status will never run. 
  1. Click on Date/Time(For periodic jobs). If you click "Immediate" then job will start running right away. But it will not be set as periodic job. It's like "press and run."
  2. Define job's start date/time, end date/time. The job will be released only once it meets its Scheduled start date/time.
  3. Press periodic values.

SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 9) Click on Hourly/Daily/Weekly period to define the frequency of the job as per your requirement.We will select Other Period
SAP Background Job Processing SM36: Create, Schedule, Reschedule

Step 10) Here you specify the recurring criteria of the job.For example, You can have the Job run after every 5 days from the Start Date. Here we select job to run every 10 minutes
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 11) Click on save button.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 12) Click on save again.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 13) Click save again
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 14) Once Job step and start conditions are defined the following window will appear.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 15) Press save.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 16) Goto SM37 to know the status of the job.
SAP Background Job Processing SM36: Create, Schedule, Reschedule 
Step 17) Select your criteria for the job which you want to monitor. 
  1. Put your job name and username who scheduled the job.
  2. Select the status of the job.
  3. Specify the date range. In our scenario, we just specify the end date while keeping From Date Open.
SAP Background Job Processing SM36: Create, Schedule, Reschedule
Step 18) You will get the following screen. Look at the status, it's a released means start conditions are met, and the job is in the queue is waiting for background work process to be free.
SAP Background Job Processing SM36: Create, Schedule, Reschedule


No comments:

Post a Comment