Technology Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
Jay2
Product and Topic Expert
Product and Topic Expert
7,529

Who should read this?

This blog is tailored for two main groups of professionals:

  1. BASIS experts who are seeking option to automate their ERP jobs and increase their operational efficiency.
  2. SAP Build experts who want to explore the complex use cases and possibilities with SAP Build suite.

Together with my colleague @Gunter , we've embarked on a journey to redefine the approach to ERP job scheduling. Before we dive in, let’s get a sneak peek into the services that power our approach – a glimpse into SAP Business Technology Platform (BTP) toolbox.

Jay2_0-1706509509476.png

This is relevant to our SAP ERP and S/4HANA customers.

Introduction

In the realm of SAP ERP, Job scheduling plays a pivotal role in automating processes and background tasks, including the execution of ABAP programs and report generation. Recently, a significant SAP note was released, signaling the upcoming maintenance of existing solutions

** SAP note (https://me.sap.com/notes/0003216013

What are the customers options after 2024?

Option 1:

  • Customers can continue to use SAP BPA by Redwood after end of maintenance 31.12.2024, in ‘Customer specific maintenance’.
  • This means, if a customer opens an XX-PART-REDWOOD support case after 31.12.2024, they will receive troubleshooting/configuration advice.
  • No new code-fixes or product updates will be available for BPA 9.1 after this date.

 Option 2:

Option: 3:

  • SAP “SAP Intelligent Robotic Process Automation” (IRPA) is a possible alternative but does not exactly replace the functionality of SAP BPA.
  • IRPA can replace some use cases for which BPA is used. But it is not a 100% replacement for BPA so you need to look at each use case individually.

Our focus in this blog is on Option 3 outlined in the SAP note, which involves leveraging SAP IRPA, now recognized as SAP Build Process Automation.

Note – Our solution approach is built with certain consideration and may not fit with every customer scenarios. Detailed review must be done before considering the proposal.

How is a job scheduled manually in SAP ERP?

Before going into our solution approach, it's crucial to grasp the foundational process of manually scheduling a job within SAP ERP. This understanding sets the stage for appreciating the efficiency gains and streamlining that SAP Build Process Automation brings to the table.

To visualize the manual scheduling process, consider a scenario where a planner is responsible for planning a job to run an ABAP program periodically. Monitoring the job's status is essential, achieved through the respective transaction codes – SM36 for defining the job and SM37 for monitoring.

Manual ProcessManual Process

This served as a valuable guide, illustrating the planner's role in planning jobs and monitoring their execution. Our solution approach will be constructed using the foundational blocks outlined above.

Solution Approach

Jay2_0-1706514098967.png

Jay2_0-1706515354913.png

Our solution for SAP ERP job scheduling is a well-coordinated framework built upon four fundamental building blocks: Planner, Watchdog, Scheduler, and Monitoring. Each block plays a distinct role in ensuring the seamless execution and management of scheduled jobs.

Planner -The Planner will utilize a dedicated web tool to upload job templates (Excel file). These templates serve as comprehensive guides, containing a curated list of various jobs to be executed. The Planner's responsibilities include:

  • Uploading Job Templates

Scheduler - The Scheduler module takes care of executing and tracking the initiated jobs. Its primary responsibility is to check the status of jobs that have been started and provide real-time updates. The Scheduler performs the following key functions:

  • Job Execution - Initiates the execution of jobs based on the templates uploaded by the Planner.
  • Status Reporting - Returns the current status of jobs, ensuring transparency in the execution process.

Watchdog - The Watchdog is an overseer that keeps an eye on multiple schedulers within the system. Its role is to initiate and manage schedulers as needed, ensuring optimal distribution of tasks and maintaining system efficiency. The Watchdog's tasks include:

  • Monitoring Schedulers
  • Dynamic Instantiation - Initiates schedulers as per workload, ensuring a balanced distribution of tasks.

Monitoring - The Monitoring module empowers administrators with insights into the status of scheduled jobs. It provides a centralized view, allowing for efficient oversight and intervention if required. The monitoring module's responsibilities encompass:

  • Administrative Insights
  • Job Status Overview - Presents a consolidated view of the status of all scheduled jobs.

Now we have good understating of each foundation block, let’s understand the process flow with help of the following animated image.

ezgif-5-195319c226.gif

This is a 3 layered solution approach, described as follows –

  1. Planning & Scheduling – Admin will start planning with help of an Excel file and upload the same in web application (tool). All planning data will be persisted in the Database. This tool will be built using SAP Build Apps that can be deployed on BTP Kyma / CF runtime.
  2. Automation – Automation will be designed and deployed using SAP Build Process Automation. Automation will pick up the correct job template which is in released state and available for execution.Jay2_0-1706518798355.png

    Our solution seamlessly integrates with the underlying SAP ERP through a set of well-supported BAPIs. SAP Build Process Automation provides BAPI SDK which can be leveraged to establish the communication with the ERP system.

    • BAPI_XBP_JOB_STATUS_GET - Retrieves the status of a specific job in the SAP ERP system
    • BAPI_XBP_JOB_STATUS_CHECK - Checks the status of a specific job, indicating whether it is running, scheduled, or completed.
    • BAPI_XBP_JOB_OPEN - Initiates the opening of a new job for scheduling in the SAP ERP system.
    • BAPI_XBP_JOB_ADD_ABAP_STEP - Adds an ABAP step to an existing job.
  3. DATABASE – This will be our primary database which stores all information related to job templates, Schedules, status. We will be using PostgreSQL on SAP BTP

Demo

It's time for demo video which showcases SAP ERP job scheduling solution in action.

Final Thoughts - 

Our exploration of SAP ERP job scheduling,  powered by the capabilities of SAP BTP services can be leveraged to build an automation tool to cover the requirements to a certain extent, again depending on actuals this may vary.  Thank you very much, going through this blog, and please do share your thoughts and comments on this approach.

References -

  1. We have created the following flow chart while designing the solution approach. You can refer to it for inspiration.Screenshot 2024-01-29 at 6.56.43 PM.png
  2. Planners excel templateScreenshot 2024-01-29 at 6.46.27 PM.png
  3. SAP Note
  4. Background jobs 
  5. SAP Transaction codes which can be useful - SE36, SE37, SM36, SM38, SE38, BAPI
  6. PSQL with CAP 
3 Comments