Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
nikita_tabakov
Advisor
Advisor
2,174

Introduction: The Journey from Classic to Cloud

In the S/4HANA world, we hear about Clean Core all the time. Most of us also understand why Clean Core is such a great approach. And when we talk about S/4HANA Cloud, the Core is clean by definition.

However, I can imagine how inconvenient and counterintuitive resolving a general development task can be for a developer experienced in standard ABAP when working in the Cloud or Clean Core environment.

So, what am I sharing? In this blog, my intention is not to reiterate the principles of Clean Core, nor is it to provide detailed documentation of ABAP Cloud. Instead, I aim to show you an example of what happens when you need to solve a classic task in a new, cloud-ready way.

 

Classic ABAP: The Good, the Bad, and the Background Jobs

Any experienced ABAP developer knows what background jobs are. We use them all the time, especially when we want to run tasks periodically and automatically in the system.

When we need our custom code to execute periodically, we create a report with the required logic and schedule it as a background job step. You can refer to this blog to refresh your memory on how this is done.

There’s no doubt that even as we step into the Cloud and leave many obsolete methods behind, we still need such essential functionality. But wait - reports are not available in the Cloud!

Real life scenarios:

Imagine this: you are a seasoned SAP developer with several trusty ABAP reports for background usage that have worked perfectly for years. One day, you move to the Cloud, and you can’t take those reports with you!

Another case: you’re implementing all your developments in a Clean Core way from the beginning. You receive a requirement to code several processes and have them run autonomously in the system (e.g., a periodic data update). You know exactly how to solve it: create a report, schedule it in SM36 - but these tools are no longer available. You need a new way.

 

The Cloud Awakens: Modernising with ABAP Cloud

Good news! A new, cloud-ready method exists, and it comes in the beautiful class-based form we love in modern ABAP development.

How to do it, in a nutshell:

  1. Terminology Update: Instead of “Background Job,” you’ll now deal with an “Application Job.” The transition from SAP GUI to Fiori means the Application Jobs app is now your tool for scheduling. Learn more here.
  2. Code the Business Logic: Instead of creating a report, you’ll create a class. To make the class compatible with Application Jobs, add two interfaces: IF_APJ_DT_EXEC_OBJECT and IF_APJ_RT_EXEC_OBJECT. For SAP BTP ABAP Environment, different interfaces apply (see links below).
  3. Register Your Class: Register your class for Application Jobs by creating a Job Catalog Entry.
  4. Create a Job Template: To create a "variant" of your Job Catalog with prefilled fields, create a Job Template. All these steps are done in Eclipse ADT.

Once you’re finished, use the Application Jobs Fiori app to schedule a job based on the Job Template.

Profit:

Old school reports

->

Modern class-based implementation

SAP GUI: SE38, SM36, SM37

->

Eclipse native configurations & Application Jobs Fiori app

Classic development

->

Clean Core-compliant development with all its advantages

S/4HANA On Premise

->

 Any S/4HANA or BTP ABAP Environment

Let's see a real-life example.

 

Real-World Example: A Customer's Case

The problem.

One of my customers relied on a standard Analytical Query built on a complex stack of CDS views and AMDP procedures. The data selection speed was insufficient.

The solution.

We decided to persist the analytical data daily for quick access. On top of this persisted data, we created a new analytical view for high-performance data selection. To automate this process, we needed a periodic job.

Additional conditions.

The project strategy required Clean Core implementation.

Let’s see how this was achieved.

 

The How-To: Step-by-Step Guide

1. Class with business logic

Create an ABAP class for your application job:

1.png

 

Define parameters for the Application Job (e.g., using class constants)

2.png

See how this parameters will look like in the Fiori App:

3.png

We now need to define what happens, when the Application Job framework calls our class:

4.png

 
2. Job Catalog

We need to create an entry and specify the class for job execution - all in Eclipse ADT:

5.png

 
3. Job Template

Finally, we create a variant for our job. We can add values for some of the parameters:

6.png

 

Now we are all set from the development point of view. We can launch the Application Jobs app and create a job. 

7.png

8.png

9.png

10.png

 

P.S.

That’s it! The Application Jobs app includes additional features (e.g., job status monitoring) not covered in this blog. Refer to the official documentation for more.

For SAP BTP ABAP Environment, updated versions of class interfaces exist. At the time of writing, S/4HANA still uses the older versions.

This blog isn’t a comprehensive guide to all “Standard ABAP → ABAP Cloud” transformations but demonstrates how familiar concepts can be adapted for the Cloud.

I hope I’ve shown that there’s no rocket science here!

So, what’s next? Use this blog as a quick guide for ABAP Application Jobs or as inspiration for ABAP Cloud. Stay tuned for more on tackling challenges in the Classic ABAP → ABAP Cloud journey!

 

Links

  1. Application Jobs in ABAP Environment (BTP) (latest)
  2. Application Jobs in S/4HANA (latest)
  3. Application Jobs - Learning Journey
4 Comments
BjörnS
SAP Mentor
SAP Mentor

Hello @nikita_tabakov,

thank you for the short summary of this topic, there will be a long way for developers to get their jobs to the new world. I have one more comment, officially it is called ABAP Cloud, I don't think Cloud ABAP should be used.

Greetings

Björn

nikita_tabakov
Advisor
Advisor
0 Kudos

Hello @BjörnS,

Thank you for your feedback! I agree, let's use the proper name. Corrected.

Habib_KANNOU
Product and Topic Expert
Product and Topic Expert

Hello and Many Thanks for this Great Blog @nikita_tabakov 

raffaele_mormone
Product and Topic Expert
Product and Topic Expert

Thank you Nikita: great Blog!