"
Etiqueta > DDIC
Supported by

The curious case of the partially protected structure

The other day I was trying (and failing) to modify a line of a SORTED TABLE.

Ler o resto do artigo! »

DDIC structure key

Today when I want to create a SALV I always create a DDIC structure with the data elements already set to show the texts I need. This avoids the need for code to manipulate the field catalog.

Ler o resto do artigo! »

APPEND STRUCTURES do more stuff than I thought

During all my ABAPian life I was convinced that APPEND STRUCTURES had one single purpose: to add new extra fields to an existing standard table.

But I recently learned that they let you do two more things after all:

Ler o resto do artigo! »

Best practices
Thou shalt always use a predefined structure with ALV

It is common to find an ALV data structure explicitly defined in the code. If this is done, the field catalog has to be manually constructed. If a predefined structure (from DDIC or declared as a TYPE) is used instead, the field catalog can be automatically built. This approach is always better and results in less code, even if the field catalog needs to be adjusted here and there.

Automating the ALV field catalogue

Best practices
Thou shalt consider using SM34 clusters

If a development requires more than one customising table consider grouping their maintenance views under a cluster. This way it will be more intuitive to maintain them. This makes even more sense if one depends on the other since in the cluster definition these relations can be explicitly defined.

Example: Como encavalitar tabelas (portuguese)

Best practices
Thou shalt use a constants table

Whenever you feel a constant value can change and you can’t add it as a user parameter, store it in ZCONSTS. This table should never be used directly. Instead, a class like ZCL_CONSTS should be created to properly access it, like shown in this article:
https://abapinho.com/2009/06/constantes/ (portuguese only)

Resist the temptation of using T900 or similar tables for this purpose. It’s true that a lot of people do it. But it’s ugly, durty and besides these tables don’t even have an adequate key because they were not designed with this in mind.

SE16N’s technical view

Hi. How’ve you been? How’s life? All cool? This tip is so simple that if we don’t talk for a while it will all end too quickly. The sun is shinning. It rained in the morning but now it stopped.

Moving on.

Every time I see someone still using SE16 I wonder why, since SE16N is so much better and already exists for so long. But this is not the tip.

The tip is that in SE16N you can turn a technical view on which, besides the field’s technical name, gives you more useful information on the field.

Before:

se16n_vista_tecnica_desligada

You can find it under the “Extras” menu:

se16n_vista_tecnica

After:

se16n_vista_tecnica_ligada

Thank you Sérgio Fraga for the tip.

And thank you OZinOH for the photo.

Greetings from Abapinho.

Adding values to a standard domain

If you think it’s impossible to add values to a standard SAP domain without requesting an activation key, you’re wrong.

Ler o resto do artigo! »

Compare a table across two systems

The SCMP transaction compares the content of a table across two systems. It is very useful, especially for parameterization tables.

It is very easy to use. It allows for the pre-selection of the registers and fields to compare. It also allows you to only display the differences, which is convenient for tables with lots of data. I don’t think any more explaining is required. Ite et videte.

This tip recently appeared in the SAPtricks blog and I think it is so useful that I have reposted it here, in case you haven’t already seen it.

Thanks to Dale Harris for the photo.

Greetings from Abapinho.

SELECT comparing 2 fields of the same table

This tip is simple and quick, but I bet 200.482 Portuguese escudos that few know it.

Ler o resto do artigo! »

Create RANGEs in DDIC without getting all wound up

I am using RANGEs more and more. I use them at breakfast, lunch, and dinner and outside meal times. It’s like soy sauce. A few spoonfuls and everything is instantly tastier.

Ler o resto do artigo! »

Lock data in Z-tables without a locking object

Ler o resto do artigo! »

Maintaining table maintenance authorisation groups

There are some projects in which the authorisations group associated with table maintenance is always &NC&, that is, Not Classified. It signals that everything there is friendly and nobody is hurting anyone else. But there are other projects where authorisation groups are taken seriously. But this is not synonymous with saying that they are organised. Serious or not, usually it all ends in a big mess, with nobody knowing who is authorised to do what.

This tip may help.

Ler o resto do artigo! »

Beautiful table relationships diagrams

Nice relation diagrams for standard tables. Rui Dias revealed me a site where you can check the relation between any standard table with each other.

For instance for T012.
And if you try KNA1 it gets even better.

Do you like it? I do.

Thanks Rui Dias.

Greetings from Abapinho.

Dot and comma or comma and dot?

Some numbers have dots, some numbers have commas and some numbers have dots and commas. The problem is that there are also numbers that have commas and dots. The thing is, there are commas that are dots and dots that are commas, depending on where you are from, in other words, depending on user’s configurations. When importing a file with decimal numbers, these numbers’ alpha-numeric fields must be converted into numeric fields. It is not uncommon for this conversion to be carried out manually or even with the feet but there is a function module that makes life easier and converts it clearly and automatically:

MOVE_CHAR_TO_NUM.

Note: When tested in SE37, this function module appears not to be able to handle decimal places but when used programmatically it works properly.

Thank you to Bruno Esperança for the tip.
And thanks to ImipolexG for the photo.

Greetings from Abapinho.


About Abapinho
Abapinho runs on WordPress
Articles (RSS) e Comments (RSS).