SAP Basis – Process automation light via BTCAUX10

Almost all customers make intensive use of batch management as part of SAP Basis to automate their processes. Although already relatively powerful in comparison, SAP could definitely add a few more functional features to the SM36 in some areas. Since it did not do this for a long time, the customer assumed that nothing more would happen here. And yet, some time ago, a small undocumented light appeared on the horizon.

Update 08/18/2015: After using it for some batch jobs, it turns out that rescheduling does not always work reliably. The problem is addressed to SAP, as soon as a solution / hint correction is available, I will remove this hint here again. Until then, please keep an eye on the job.

You can’t teach an old dog new tricks

As mentioned at the beginning, there is a lot to be said for using the integrated background processing in SAP, because functionally it already brings a lot to the table: Jobs from multiple steps, (limited) options for job chaining, extensive scheduling options including plant calendar, automatic dispatch of result spools. Nevertheless, there are things that others can do better – admittedly mostly those that do nothing but process automation, above all Redwood and Automic:

  • direct job chaining, even in multiple executions
  • status-dependent job starts (evaluating previous results)
  • cross-system job chaining
  • more complex scheduling options (from to time or date periods)

For the latter requirement I recently found a practical tool while browsing the SCN, but I could not find any additional documentation: BTCAUX10. Apparently there is an unreleased SAP Note 1527859 that contains the search term, but it is not part of 997328.

nonote
The corresponding note isn’t public.

When would you like it?
So it was a case of testing for all it’s worth. The result: this tool makes it possible to do two crucial things beyond the normal scheduling options:

  • Restrict a periodic job to a specific date period.
  • Restricting a periodic job to a specific time span.

This basically works as follows:

The report BTCAUX10 can be started safely (yes, there is a selection mask ;). As expected, it receives as input parameters the job name, report/variant, scheduling user and the period. Already the first start date shows an interesting new feature: the last execution date may be 365 days after the first date.

BTCAUX10
Selection Screen BTCAUX10

This is extremely practical if a 15-minute job is only to run over a period of 8 weeks, and the necessary scheduling cannot be remembered over this period.

The second very interesting possibility of the restriction is the time (Time Interval), here times of day can be indicated, between which the job may run (Use Restriction). For example, a regular consumption job can be configured to run every two minutes, but only during production shift times between 06:00 and 22:00.

The first scheduling shows that it actually does what it promises. After correctly filling out the selection mask (I recommend the use of a BTCAUX10 variant, because I needed easily 10 attempts until the parameters fit as intended) and a spirited press on Execute, the job is scheduled in the dialog under the specified name. This consists of two steps. The first one schedules the successor job, taking into account date and time restrictions. The second then contains the specified step of the actual program execution.

A really useful tool, which extends the SM36 functionality.

May it be a little bit more?

But it is not perfect. For example, what if I need a multi-step job or want to have a different user in the job steps than the one specified as the job scheduler?

Here, too, a solution has been found. The first step, which takes care of scheduling the successor, actually does not take a job reference stored somewhere else as a template, but the actual job. So if I go into a ‚released‘ job instance and change it, the first step copies these changes into the successor.

Step1
This first step plans for the successor, the template is the current job.

This way you can easily insert steps and change execution users (or make other settings that BTCAUX10 does not provide in the selection mask) by modifying the released job.

Have fun with testing, if someone has problems I am grateful for feedback.