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

  • Find object dependencies which lack translations

  • Provides a nicer browsing interface to help on manual translation

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. Now imagine the following scenario. You are in the BANANA1 module doing something. There, you must call a class from the MORANGO module. Of course, this class launches exceptions of the type ZCX_MORANGO. This is the context.

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.