"
Etiqueta > alv
Supported by

ALV Grid built in error protocol

We’re all lazy. It’s just human. Programmers are human. We’re often lazy when it comes to the way we program something. And usually being lazy when making a program will result in someone else having more work when maintaining it.

Let he who is free of laziness throw the first rock.

I won’t!

Ler o resto do artigo! »

Use a Standadrd GUI status without copying it

When you want to use CL_GUI_ALV_GRID in a CONTAINER you must copy a standard Status GUI from another program. For example, the GUI Status “STANDARD” of the function group SALV. And then, in the screen’s PAI you do:

SET PF-STATUS ‘STANDARD’.

And thus the little standard buttons show up on your screen.

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 use SALV instead of the old ALV functions

SALV classes are more versatile and more recent than the old function modules. So, for new ALVs always use SALV. The only exception is editable ALVs which SALV classes are still very incapable of doing.
http://scn.sap.com/docs/DOC-10365
http://scn.sap.com/docs/DOC-10366

Exemplary example of SALV

Unless you want to do data editing, the only dignified way to use ALVs these days is through SALV classes. They are more modern and more elegant, and those who use them can achieve a social status until now only available to owners of a license plate.

Ler o resto do artigo! »

Multiple choice ALV in a modal dialogue box

Do you know how to present an ALV with a list of records in a dialogue box allowing multiple choice? I didn’t. But I do now. Let me explain how.
Ler o resto do artigo! »

Automating the ALV field catalogue

Sometimes I ask myself what percentage of the world’s ABAP code is unnecessary. A paradigmatic example of how time can be wasted writing code which is of no use to anyone and only creates problems is the ALV’s all-too-common field description definition sitting directly in ABAP.

Ler o resto do artigo! »


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