Sample Program: Job Start on Workday (JOB_CLOSE)
* Start on particular workday of each month according to
* factory calendar.
*
* In this example, we hardwire the number of the workday and the
* workday. These specifications could also be collected from the
* user with BP_START_DATE_EDITOR.
*
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
CALENDAR_ID = '01' " ID of R/3 factory calendar
" for determining workdays
JOBCOUNT = JOBNUMBER
JOBNAME = JOBNAME
PRDMONTHS = 1 " Specify whether job is to be repeated
" monthly, bi-monthly, etc. You may not
" use other PRD* fields. They are
" ignored.
START_ON_WORKDAY_NOT_BEFORE = SY-DATUM
" Start job not before the specified
" date (today's date)
START_ON_WORKDAY_NR = '03'
" Start job on the third workday in the
" factory calendar, with respect to
" start or end of month, as specified in
"