The representative instance communicates with the following partners:
The communication between the representative instance in the ABAP program and the ALV Grid on the presentation server takes place interactively at runtime.
The interactive standard functions that are provided for screen output and the generation of the ABAP print list are therefore implemented in the cl_gui_alv_grid class.
The following information cannot be stored directly in the representative instance:
This data must be stored in variables in the program and passed to the representative instance in method calls.
Data Retention for the List
Data to be displayed must be passed to the representative object as a standard internal table (sorted or hashed tables are not allowed).
The representative instance does not have a copy of the data. It just manages a reference to the internal table passed in the method call.
The representative instance in the calling program performs all interactive actions of the instance on the presentation server on the internal table, such as sorting, filtering, and so on. The lifetime of the internal table that contains the list data must be as long as the lifetime of the representative instance or longer.
Sorting of the ALV Grid changes the sort order of the internal table in the calling program. All other actions only read the data.
Additional Information in Detail
You can use the global data types specified in the figure to define data objects in the calling program. These data objects can be filled with additional information and then passed to the representative instance, to control the following:
Passing of List Data and Additional Information
You use the set_table_for_first_display method to pass the list data, the field catalog, and other additional information to the representative instance. You pass the list data that you want to display with the it_outtab parameter.
If you pass the name of a global structure type from the ABAP Dictionary to the i_structure_name parameter, the representative instance automatically generates the corresponding field catalog. The data table only displays the columns with the same names. However, there must be a column with the same name in the data table for every component.
You set the configuration options of the layout variants for the user with the is_variants and i_save parameters. You can use the i_default parameter to set an existing layout variant as the initial variant.
You can pass default settings for the appearance of the ALV and print list output using the is_layout and is_print parameters. The names of field groups defined in the field catalog are passed using the it_special_groups parameter.
You can use the it_toolbar_excluding parameter to pass the names of the standard functions of the toolbar that are to be hidden.
If you want to change the automatically created field catalog or create it yourself, pass a corresponding internal table to the it_fieldcatalog parameter.
You can pass default settings for filtering and sorting the data to be displayed using the it_filter and it_sort parameters.
Note: For more information about the parameters, see the online documentation.