Category > Articles
Supported by
Supported by Inetum

The rot is noble after all

images/thumbnail.jpg - Thumbnail
For many years I’ve been complaining about how backward ABAP development ecosystem is and how long it takes to evolve. Every time he heard me saying it a good friend of mine would wisely advise me to never bite the hand that feeds you. But how can a man not speak out?

Software design patterns in ABAP

images/thumbnail.jpg - Thumbnail
We are constantly learning. But once in a while we learn something which is a leap forward forcing us to look in a new way to everything we do. The last time this had happened was when I started using OO in ABAP. OO was not new to me as I had already used it extensively in Java, C#, C++, etc. But to finally be able to apply these precious concepts on my daily job was a relief and a big improvement in the quality, flexibility and speed of my work.

Internal table secondary indexes

images/thumbnail.jpg - Thumbnail
This is how internal tables used to be declared: DATA: itbl TYPE TABLE OF bkpf.

How to sabotage standard texts

images/thumbnail.jpg - Thumbnail
Some times I don’t like the names SAP gave to things. So I change them. For example, one day I was very angry and thought all customers were parasites. So I did the following:

In ABAP's name, I baptize you

images/thumbnail.jpg - Thumbnail
When we learn ABAP, we are taught a series of rules on how to name variables. Not everyone uses the same rules but, still, some strict rules are shared between many people: Local variables must start with L: L_BUKRS; Global variables must start with G: G_MODE; Internal tables must have T_: LT_MARA; Structures must have S_: LS_MARA; Object references must have R_: R_CUSTOMER; input parameters must start with I, output with O, changing with C and returning with R. And the most stupid of all, field-symbols must start with FS_: <FS_MARA>. In the early XXI century those rules made some sense (except for the field-symbols on, which was, and still is, as stupid as writing ‘pencil’ in all our pencils). Today they don’t make much sense anymore. Let me explain.

Abapinho Dev Tools: Translator

images/thumbnail.jpg - Thumbnail
Nuno Morais has developed another very useful tool to help simplify mass translations of most SAP objects. The toold is not for automatic translation between two languages. Instead, it has the following features: Export an Excel file with texts Import an Excel file with texts Copy texts from one language into one or more languages Create a transport order with the changed texts

Abapinho Dev Tools: Dependencies

images/thumbnail.jpg - Thumbnail
Nuno Morais developed a very useful tool which can compare objects between systems and works much better than transaction SREPO. Abapinho will be its official repository. Code in GitHub. Soon, an instruction manual. Until then, go on and try it. If you like it or have any suggestion please leave a comment here. Thank you Nuno for having developed this and for sharing it with the world in Abapinho. Greetings from Abapinho.

DELETE vs CLEAR vs REFRESH vs FREE

images/thumbnail.jpg - Thumbnail
DELETE CLEAR REFRESH FREE These are different ways of deleting all data from an internal table. They look the same. But they aren’t.

Converting an exception into an exception

images/thumbnail.jpg - Thumbnail
If you’re still not using exception classes, then you’re making a mistake. Cause they are very healthy for your code. They’re not only good nutrients for the system, they also make it lean and less vulnerable to diseases. There are cases where you still need to deal with the old exceptions. For example, when a function module is invoked. In this article I am presenting a suggestion that seems a little complex, but it works very well if you need to integrate the old exceptions with exception class in a simple way. And though it is sophisticated, you only need to do it once. Once it’s done, it’s easy to use.

Teach ABAP to juggle

images/thumbnail.jpg - Thumbnail
What can be done when a night is not enough to complete the daily processes?

Text search in a WebDynpro

images/thumbnail.jpg - Thumbnail
SAP doesn’t know how to do things right the first time. The WebDynpros are a good example of this. It doesn’t even let you do a text search. It’s sad. Fortunately Sérgio Fraga has found a way, though it’s rather laboured:

Chained exceptions

images/thumbnail.jpg - Thumbnail
Today I will teach you how to chain exceptions. It’s a very practical solution to a complicated, not so obvious problem. Let’s start by describing the problem. Imagine you are in the application BANANA. The application is quite complex. It has three modules: BANANA1, BANANA2 and BANANA3. Each one has its exception class ZCX_BANANA1, ZCX_BANANA2 and ZCX_BANANA3. Since the application is in fact well designed, all the exception classes inherit from the same ZCX_BANANA.

Communication by event between programmes

images/thumbnail.jpg - Thumbnail
In Greek mythology, the gods’ most commonly used means of communication with mortals was rape. They would rape for no reason whatsoever. The closest thing we have to rape in ABAP is the command “SUBMIT”, which is also the most common way of communicating between two programmes.

Packages 2.0

images/thumbnail.jpg - Thumbnail
SAP R/3 repository is a wonderful thing. A vast warehouse of data elements, structures, tables and much more, readily available to one and all. As developers, it is extremely convenient to quickly pick these elements and pull them into our programs as necessity conveys, while our string of thought remains virtually uninterrupted. Well, not all is sunshine and roses. If you are not careful with the mushrooms you pick you might get a poisoned one.

Request Based Debugging

images/thumbnail.jpg - Thumbnail
If you look up the UNAME system variable in debug within a RFC call you may think it kind of odd to find a username that is not your own. What happens is that the system adopts a specific username for remote calls and a new session is started. A new session implies a new execution context and, hence, all our strategically placed breakpoints will no longer be recognised. This problem can hinder a simple debug forcing us to run through the code looking for THAT remote call to THAT particular system. SAP has a solution.