Supported by
Supported by Inetum

How to render CL_GUI_ALV_GRID in background

images/thumbnail.jpg - Thumbnail

Someone decided to run an editable ALV (based on CL_GUI_ALV_GRID) in background. It dumped. The solution is simple but not that obvious.

You just don’t provide a container to the ALV Grid when you are running it in background.

There is even a specific method for it:

    IF NOT cl_gui_alv_grid=>offline( ).
      DATA(o_container) = get_container( ).
    ENDIF.
    go_grid = NEW cl_gui_alv_grid( i_parent = o_container ).

You can now run it both online and in background.

Greetings from Abapinho.