Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member

Sometimes the consultants come to the Basis guy asking to do unusual things but required by the business. I ain't different and some requirements come and I would like to share with you one of them: schedule not supported by SAP standard.

Requirement

The project needs is following:

  1. Hourly job
  2. Must run between 03:00am and noon.

As known by Basis, this kind schedule isn't supported by SAP. If you set an hourly job there isn't option for time frame, window or anything like. After think a little about possible solutions, I conclude there are only 2 possible solutions without ABAP development:

  1. Schedule multiple daily jobs, one for each hour
  2. Schedule single jobs with external trigger

For the first solution it is easily configured but with high maintenance effort, because if for some reason the business decided to add steps or even change the variant, will exist lots of different jobs to change.

Jobs and External triggers

The default job triggers are described bellow:

Immediate

This runs the job immediately you save the job

Date/Time

Set an schedule to the job (specified date and time)

After Job

Run the job after another job.

After event

Run the job after an occurrence of an SAP event <--- This is the matter of the Blog!

At operational mode

Run the job only determined operational mode is running. This option can be used if the job schedule is the same of the operational mode configured.

SAP Events

In SAP Netweaver some events are triggered for too many different reasons. The standard installation comes with lots of pre configured events and allows to create your own events. Following the SAP standardization create your own starting with "Z" or "Y".

SM62

On SM62, click on new. The following window pops up:

Set the event's name (starting by Z or Y) and a description for your event.


SM36

The matter of this blog is not to teach you how to schedule a job but how to make it using a special schedule. Due this, I will only take care about whats change on the regular configuration. To use the event, click on after event. This will enable the After Event area to be filed up. Select your event from the math box and do not forget to set it as Periodic Job.

Windows Task Scheduler

My servers are windows servers, but this setup can be done in any operational system (on linux use the crontab and etc). The most important is to understand the procedure by itself than only follow a procedure. On windows task scheduler create a new task and set your schedule. Here I will show you an example. Adjust it for in accordance of your need.

DetailsScreenshots

Set the task to run independent of the user is logged.

Select the triggers tab

Here it is the most important detail:

This trigger will be executed Daily at 04:38:41 PM, will trigger every minute the SAPEVT for 12 min.

In short - This trigger will start 4:38pm and will stop 4:50pm

On the tab Actions, you must execute a program called as SAPEVT.exe. This program is located in your kernel folder.

Set as argument the name of your event and the name of your system following the standard <trigger's name> name=<SID>

example - Z_TASKSCHEDULER name=SE1

And that is! Your special schedule is set successfully on your SAP system. Keep in your mind from now the trigger is the Windows Task Scheduler instead the SAP by itself.

I hope this would help you and see ya next time!

Frederich Murador

SAP Basis administrator

Labels in this area