You are on page 1of 4

Easy Job Scheduling Using BP_JOBVARIANT_SCHEDULE

PDF download from SAP Help Portal:


http://help.sap.com/saphelp_erp60_sp/helpdata/en/fa/096ccb543b11d1898e0000e8322d00/content.htm
Created on September 11, 2014
The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help Portal.
Note
This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.
2014 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP SE
and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are provided by
SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be
liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express
warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. SAP and other
SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in Germany and other
countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.
Table of content
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 1 of 4
Table of content
1 Easy Job Scheduling Using BP_JOBVARIANT_SCHEDULE
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 2 of 4
1 Easy Job Scheduling Using BP_JOBVARIANT_SCHEDULE
To schedule a job from within a program using the express method, you need only call the BP_JOBVARIANT_SCHEDULE function module.
The express method has the following characteristics:
Simplified job structure: The function module schedules a job that includes only a single job step.
The function module uses default values for most job-processing options. You cannot, for example, specify a target printer as part of the call to the function
module. Instead, the job step uses the print defaults of the scheduling user.
Only ABAP reports can be scheduled. You must use the "full-control" method to start external programs.
The range of start-time options is restricted. Event-based scheduling is not supported.
The function module works as follows:
1. You name the report that is to be scheduled in your call to the function module.
2. The function module displays a list of variants to the user. The user must select a variant for the report.
You must ensure that the variants required by your users have already been defined.
3. The user picks either "immediate start" or enters a start date and start time. Optionally, the user can also make the job restart periodically. The job is then
scheduled.
Example
You could use the following code to let users schedule report RSTWGZS2 for checking on the status of online documentation:
call function 'BP_JOBVARIANT_SCHEDULE'
exporting
title_name = 'Documentation Check'
" Displayed as title of
" of scheduling screens
job_name = 'DocuCheck' " Name of background
" processing job
prog_name = 'RSTWGZS2' " Name of ABAP
" report that is to be
" run -- used also to
" select variants
exceptions
no_such_report = 01. " PROG_NAME program
" not found.
call function 'BP_JOBVARIANT_OVERVIEW' " List the jobs that
exporting " have been scheduled
title_name = 'Documentation Check' " Displayed as title
" of overview screen
job_name = 'DokuCheck' " Jobs with this name
" are listed
prog_name = 'RSTWGZS2'
exceptions
no_such_job = 01.
The code would present your users with a sequence of two screens. On the first screen, shown below, the user can select from available variants or add new
variants:
On the second screen, the user can pick a start date and time for the job and decide whether the job should be repeated periodically. The function module
finishes with a success message when the user schedules the background job.
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 3 of 4
See also
Managing "Easy-Method" Jobs with BP_JOBVARIANT_OVERVIEW for an easy method for letting users manage their background jobs.
PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.
Page 4 of 4

You might also like