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 Scheduling

Former Member
0 Kudos

Hello,

I am trying to schedule a job that runs every night at 2.00am, but for a certain period every month - say from 4th April to 25th April, excluding weekends.

I have been told that I need to write an ABAp program for this, as the end date for a job cannot be defined in job scheduling.

The requirement is to run the job for a fixed number of days every month.

How do I achieve this?

Thanks for your help!

vaishali

Moderator message: please choose more descriptive subject lines for your posts.

Edited by: Thomas Zloch on May 25, 2011 1:52 PM

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor
0 Kudos

SAP's own periodic job scheduling capabilities are limited.

Some potential workarounds for your scenario, more or less nasty, expensive or complex:

- create specific holiday and factory calendars and use these in your jobs for skipping to next "workday"

- schedule multiple monthly jobs on the desired days

- write bespoke scheduling program (as suggested above and below)

- deploy more sophisticated, 3rd party job scheduling tools

Thomas

7 REPLIES 7

Former Member
0 Kudos

Hi,

Write a program in which use a FM to run the job which you have to run. Schedule this ABAP program to run at 2:00AM everyday. Inside the program check the system date and accordingly decide whether your job has to be run or not.

The FM J_1O1_JOB_START is used to start a job. Similarly you can search more FMs in SE37 by putting *job* in the description field.

Hope this helps.

former_member404244
Active Contributor
0 Kudos

Hi,

Please go through the below link... you can also go for TVARV table .

Regards,

Nagaraj

0 Kudos

Hello,

I cannot find the Finish date anywhere in the variant maintenance screen!

vaishali

Former Member
0 Kudos

hi,

Try this link below..

ThomasZloch
Active Contributor
0 Kudos

SAP's own periodic job scheduling capabilities are limited.

Some potential workarounds for your scenario, more or less nasty, expensive or complex:

- create specific holiday and factory calendars and use these in your jobs for skipping to next "workday"

- schedule multiple monthly jobs on the desired days

- write bespoke scheduling program (as suggested above and below)

- deploy more sophisticated, 3rd party job scheduling tools

Thomas

0 Kudos

Thanks Thomas.

We will explore the option of using the holiday calendar as we are not using the same for any other module.

Former Member
0 Kudos

Hi ,

This is not SAP standard method But you try with below logic .

1.Write one more program with selection parameter on which date your original program has to run.

2.Inside this program if the selection parameters meet the condition with system date then trigger a event which will the schedule the original job.

3.Schedule the first program daily, if it meets the condition it will the trigger the event which will start the batch job which oyu required..

Regards,

Ravi