Adaptation of the ALV Grid Control
You can change the layout of your ALV grid, for example, you can select the title, create a striped (zebra) pattern for the lines, or optimize the column width.
Main Fields of the Layout Structure
Lvc_s_layo is a global structure type and some of its fields are as below :
Field |
Description |
grid_title |
Title with a maximum of 70 characters |
zebra |
If ‘X’, the list is displayed with a striped pattern |
no_headers |
If ‘X’, no column headers are displayed |
sel_mode |
A setting that determines how many cells lines, and column can be selected |
cwidth_opt |
If ‘X’, column width are optimized |
info_name |
An additional data table field that contains information about coloring of lines |
ctab_fname |
An additional data table field that contains information about coloring of individual cells. |
Selection of Cells, Columns, and Lines
Depending on the value you enter in the sel_mode field in the layout structure, users can select individual or several lines or cells.
To select several entries, press the CTRL key and keep the mouse button pressed while clicking further rows, columns, or cells.
To select a continuous range of rows, columns or cells, press the SHIFT key and keep the mouse button pressed.
Exception Columns
You can use exceptions to indicate by means of a traffic light whether threshold values have been reached, on a line-by-line basis.
The instructions to display the threshold values are as follows:
Sort Criteria
In the internal table, insert a line for each sort criterion that you want to define.
To sort data using sort criteria, enter the column name in the fieldname field. If you use more than one sort criterion, in each case, enter the sequence in which the sort criterion is evaluated in the spos field. Alternatively, you can also insert the fields in the required sequence in the internal table of sort criteria. Enter X in the up field if you wish to sort the entries in ascending order.
If you want to sort the entries in descending order, enter X in the down field.