Supported by
Supported by Inetum

SALV consistency report

images/thumbnail.jpg - Thumbnail

Sometimes a SALV has inconsistencies which can go unnoticed. For example, if its structure has an amount field which doesn’t have an associated currency field:

TYPES: BEGIN OF ty_s_data,
         bukrs TYPE bukrs,
         wrbtr TYPE wrbtr,
       END OF ty_s_data.

DATA: o_salv TYPE REF TO cl_salv_table,
      t_data TYPE STANDARD TABLE OF ty_s_data.

START-OF-SELECTION.

  cl_salv_table=>factory(
    IMPORTING
      r_salv_table   = o_salv
    CHANGING
      t_table        = t_data ).

  o_salv->display( ).

Although hardly anyone knows it, SALV has its own consistency report. To run it you just need to press SHIFT+RIGHT_DOUBLE_CLICK in a white space of the screen. This is what you’ll get for the code above:

Relatório SALV

Now that you know, don’t go saying an ALV is ready until you’ve run its consistency check.

Thank you Pierre Ameye for the tip.

The photo is out of focus, I know, but I liked it.

Greetings from Abapinho.