Monday 19 June 2023

Schedule Background Job with Last Execution Date and Time or with a Time Window

Owing to various business scenarios, we might come across requirements where background jobs must be scheduled. Now, the most common way to schedule batch job is through the TCode SM36. Especially, in case of Interfaces through which SAP receives huge volumes of data from Third Party and must process them in one batch run, nightly in most cases, Background Jobs are critical.

However, few cases arise where SM36 does not meet our requirements sufficiently. For example, if the requirements are such that, the job must only run within a specific timeframe or the job should have a last execution date, SM36 fails to accommodate those cases.

For such scenarios, SAP has provided one standard program BTCAUX10 that will accommodate that business case. This SAP standard program allows users to schedule Batch Jobs with a specific Last Execution Date/Time or with Time Window.

SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Preparation, SAP ABAP Tutorial and Materials, SAP ABAP Learning, SAP ABAP Certification

Imagine a scenario where the Batch Job should run every night in specific interval within 8 pm to 9 pm. The standard program BTCAUX10 allows users to achieve this case. Executing the program will schedule a Batch Job. Following is the selection screen wherein we need to fill out the necessary parameters.

Enter Job name, Report name, Variant, Period Values, Start Execution Date/Time.

Now, if you want to specify the last execution date/time post which the Job should not run, then enter the Last Execution Date.

SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Preparation, SAP ABAP Tutorial and Materials, SAP ABAP Learning, SAP ABAP Certification

Now, if the requirement is to specify a particular timeframe, tick the below checkbox and enter the time window.

SAP ABAP Career, SAP ABAP Skills, SAP ABAP Jobs, SAP ABAP Preparation, SAP ABAP Tutorial and Materials, SAP ABAP Learning, SAP ABAP Certification

If needed, further restrictions can be put on execution date wherein you can run the Job only for working days. To achieve this, we need to maintain the Factory Calendar.

No comments:

Post a Comment