Application Development and Automation 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: 
Read only

SCHEDULE TASK FROM TABLE

Former Member
0 Likes
517

Hi All,

I am creating a program that I would like to run at certain (predefined) dates of a month e.g. the 7th and the 20th. If the day falls on a weekend or public holiday, it triggers events on the next working day. It actually debits a certain amount (stop order kind of thing) according to the instructions of a client on specific dates. I would like to store the dates in a table and create a program that would trigger the specified actions on the date.

1 ACCEPTED SOLUTION
Read only

Sougata
Active Contributor
0 Likes
491

Why don't you write a shell program which Submits your current program after checking the day? In the shell program you check the condition (i.e. the date is 7th or the 20th, public holiday or not etc.). If its true it does a SUBMIT of your main progarm otherwise exits without doing anything. You can then schedule your shell program to run every day of the year.

Don't forget to reward points if helpful.

Cheers,

Sougata.

3 REPLIES 3
Read only

Sougata
Active Contributor
0 Likes
492

Why don't you write a shell program which Submits your current program after checking the day? In the shell program you check the condition (i.e. the date is 7th or the 20th, public holiday or not etc.). If its true it does a SUBMIT of your main progarm otherwise exits without doing anything. You can then schedule your shell program to run every day of the year.

Don't forget to reward points if helpful.

Cheers,

Sougata.

Read only

naimesh_patel
Active Contributor
0 Likes
491

1. Create a table which stores the predefined date. You can create a program to update that table. In the program write a logic which can help you identify that weather the day is working day or holiday.. You can take the help of the Factory calenders in SAP. May be you need to create one calender to check your dates, if not avaliable.

2. In your program checks the system date with the date defined in the table. If you found your run date in the table you can processed the program further otherwise stop the program. Schedule a job which can run your program everyday. Give appropriate messages in the program so, after comletion of the job you can go to job log and check out the status of the program.

Regards,

Naimesh Patel

Read only

0 Likes
491

The code is supposed to check the table for an identifier and use that to schedule a job on each day of the month on a certain time to transfer cash from an account to another account (stop order).