Use UNION ALL whenever possible

images/thumbnail.jpg - Thumbnail

In SQL, UNION is used to combine the results of two queries. But in many cases, UNION ALL should be used instead.

Replace value of an internal table field

images/thumbnail.jpg - Thumbnail

Now that ABAP has comprehensions, there are a number of superpowers that aren’t always obvious. Here, I’ll show you how to change the value of a single field in all, several or just one record of an internal table.

Who triggered the exception?

images/thumbnail.jpg - Thumbnail

Exceptions can be passed back, method by method, bubbling up, and caught by a method that has nothing to do with the one that raised it. And how will you find it?

Attributes that are global variables in disguise

images/thumbnail.jpg - Thumbnail

There’s nothing worse than seeing code that abuses variables. They’re so delicate, and yet they’re treated so badly. Poor things. And to those who have to read them. The worst way to treat a variable is to make it global. It’s hard to believe, but in 2025 this crime continues to plague our systems. Well, here’s a way to show them some love.

VALUE #( ) and nothing else

images/thumbnail.jpg - Thumbnail

I once wanted to test a class whose constructor took several parameters, each requiring an instance of a different interface. These instances weren’t easy to create and weren’t relevant to the test. After some experimenting, I found a way to work around the problem.

Test boolean methods implicitly

images/thumbnail.jpg - Thumbnail

A quick reminder. I thought this was obvious but I keep seeing IF statements that explicitly test the result of a boolean method against ABAP_TRUE or using INITIAL. There’s no need! ABAP is clever in this regard.

Execute code after a COMMIT

images/thumbnail.jpg - Thumbnail

Remember how with CALL FUNCTION IN UPDATE TASK you could delay some actions until the moment of a COMMIT?

Tech Radar

images/thumbnail.png - Thumbnail

I found this amazing chart of SAP technologies.

FILTER

images/thumbnail.jpg - Thumbnail

The FILTER function is new and still relatively unknown. I will give you an example of how it can be used.

Everything Everywhere All At Once

images/thumbnail.jpg - Thumbnail

Sometimes it’s useful to look at two areas of the code at the same time. If the areas are in different classes, just open them both. But what if they’re in the same class? For example, if you want to make a method inspired by or related to another.