Tutorial by Examples

This example portrays the most simple ALV creation using the cl_salv_table class and no additional formatting options. Additional formatting options would be included after the TRY ENDTRY block and before the alv->display( ) method call. All subsequent examples using the ABAP Objects approach to...
This example shows how to optimize the column width so that column headings and data are not chopped off. alv->get_columns( )->set_optimize( ).
This example hides the MANDT (client) field from the ALV. Note that the parameter passed to get_column( ) must be capitalized in order for this to work. alv->get_columns( )->get_column( 'MANDT' )->set_visible( if_salv_c_bool_sap=>false ).
The column text may change upon the horizontal resizing of a column. There are three methods to accomplish this: Method NameMaximum Length of Headingset_short_text10set_medium_text20set_long_text40 The following example shows usage of all three. A column object is declared and instantiated as a re...
The following method call enables usage of many advanced features such as sorting, filtering, and exporting data. alv->get_functions( )->set_all( ).
This method increases readability by giving consecutive rows alternating background color shading. alv->get_display_settings( )->set_striped_pattern( if_salv_c_bool_sap=>true ).
By default, when an ALV is displayed, the title at the top is just the program name. This method allows the user to set a title of up to 70 characters. The following example shows how a dynamic title can be set that displays the number of records displayed. alv->get_display_settings( )->set_l...

Page 1 of 1