SET HANDLER lcl_application->on_link_click FOR lo_events. Register hotspot click handler DATA(lo_events) = lo_alv->get_event( ). Lo_column_tab->set_cell_type( if_salv_c_cell_type=>hotspot ). Lo_alv->get_columns( )->get_column( 'COLUMNNAME' ) ). Register hotspot column DATA(lo_column_tab) = CAST cl_salv_column_table( For fields that are not defined as hotspots, the user must double-click the field or use a function key to trigger an event. If a user clicks once onto a hotspot field an event is triggered. Hotspots are special cells of an ALV list that can be compared to hyperlinks or buttons on web pages/apps. Lo_alv->get_sorts( )->add_sort( 'COLUMNNAME' ). Optimize column width lo_alv->get_columns( )->set_optimize( abap_true ). Lo_column->set_short_text( 'SHORT_HEADER' ). Lo_column->set_medium_text( 'MEDIUM_HEADER' ). Lo_column->set_long_text( 'LONG_HEADER' ). Make sure to implement appropriate exception handling for productive code.Ī simple, two-dimensional table in the SAP List Viewer (ALV) Basics "InstantiationĬolumn settings Change header text DATA(lo_column) = lo_alv->get_columns( )->get_column( 'COLUMNNAME' ). ![]() Note: For simplicity’s sake error handling of SALV errors (subclasses of exception class CX_SALV_ERROR) have been left out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |