May 2019
Beginner to intermediate
548 pages
12h 39m
English
To create zebra coloring where the background of one row is white and the next is gray and so on, we just need to add one more structure to the ALV called a layout structure.
At the beginning of creating a zebra pattern, we need to declare a variable of lvc_s_layo type, as follows:
DATA: ls_layout TYPE lvc_s_layo.
Of course, a layout structure has many more fields, for instance, a field named edit. If we add abap_true to this, then we can change data in rows. After this, we just need to fill in one field of this structure:
ls_layout-zebra = abap_true.
Add this structure to set_table_to_first_display as an export parameter:
CALL METHOD lr_alv->st_table_for_first_display EXPORTING is_layout = ls_layout CHANGING it_outtab = lt_spfli it_fieldcatalog ...
Read now
Unlock full access