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.

To all those whole criticize 7.4 syntax

images/thumbnail.jpg - Thumbnail

This post is addressed to the collective character that represents all the people who have told me that they like some things in the new 7.4 functional syntax but think that you shouldn’t overdo it and should avoid using REDUCE and all the other unnecessarily weird things because the code gets more obscure, it’s slower and they don’t see any advantages.

Are you serious?

Use BASE to not ruin what you already have

images/thumbnail.png - Thumbnail

We used to use the APPEND and INSERT commands to add rows to internal tables. Now that ABAP has grown, we can use VALUE, REDUCE, CORRESPONDING, etc. But what if the internal table already has rows and we don’t want to lose them?

Don't MESH with ABAP

images/thumbnail.jpg - Thumbnail

ABAP 7.4 brought a lot of lauded novelties. Of all of them, the one less talked about is MESH. Let’s analyse it and see how unfair that has been.

Easily modify internal table record

images/thumbnail.jpg - Thumbnail

The new way to get data from internal tables is also the new way to put data into internal tables.

ABAP inside SQL statements

images/thumbnail.jpg - Thumbnail

Did you know that, if you SAP is recent enough, you can use complex ABAP expressions in the middle of SQL commands?

Table lookup without having to deal with CX_SY_ITAB_LINE_NOT_FOUND

images/thumbnail.jpg - Thumbnail

Before the modernization of ABAP in 7.40, a table lookup required an auxiliary variable and at least 4 lines of code.

NOT

images/thumbnail.jpg - Thumbnail

No, ABAP will never have the NOT operator.

MOVE-CORRESPONDING between two tables with automatic look up

images/thumbnail.jpg - Thumbnail

Abapinho hasn’t been talking a lot about 7.40 because most of the new possibilities have already been widely discussed in other sites and we don’t want to reinvent the wheel.

But, here and there, I find small useful jewels which seem to still be under the radar. This is one of them.

The simplest route to go from SELECT to RANGE

images/thumbnail.jpg - Thumbnail

Today we’ll try to optimize the code to convert a SELECT into a RANGE