Professional Documents
Culture Documents
Consider a batch job that needs to be run on every 3 Saturday in a month. If you set it up using transaction SM36 as a repetitive batch job you see that the options provided do not match this requirement. We can achieve this by creating a factory calendar then using the factory calendar option in SM36. Let us see below how we configure these settings. Configuration: Create a new factory calendar that has one working day which is always the 3 Saturday of the month. You use transaction SCAL to create factory calendars. Select the Factory calendar radio button and then click on the change icon.
rd
rd
In the next screen enter the calendar ID, its description, and the years for which it is valid.
As we are going to use Special rules only, we dont need to enter a holiday calendar or define workdays on this screen. Press Save and then click on Special rules. In the next screen that appears enter the specific dates for which you want the calendar to be active. Tick the Workday check box for these dates.
Press save and go back to Overview screen. Click on the Calendar button to see what these dates look like in a calendar format.
Double-click on a year to see the work dates in a calendar format. Workdays are highlighted in yellow on your screen and non-working days are in green. In our example we have set dates only for 3 months, so you see no of workdays as 3 for year 2009.
By following the above steps we have set up a new factory calendar Z4. Job scheduling in SM36:
Create a new job ZTEST and click on Start condition. Press Date/Time and tick the Periodic job check box. Click on the Monthly button and press Save.
Then click on Restrictions button. In the pop-up of Start date restrictions enter calendar id as Z4 and select Move job to next working day option which restricts the job.
We can see the job planned start date is set to 15.08.2009(3 Saturday in August) and frequency is set to Monthly. Define the steps and complete the job set up by pressing save.
rd
FACTORY CALENDAR
A factory calendar distinguishes between working days and non-working days.
Dependencies
If you have entered an exception rule for non-working days and have selected factory calendar, you must enter a factory calendarthat is relevant to your company.
T.CODE: - OY05
PATH: - SPRO -> IMG ->TIME MANAGEMENT -> WORK SCHEDULES -> DEFINE PUBLIC HOLIDAY CLASSES
3.Define Factory Calendar, select the working days and assign holiday calendar to factory calendar.