Demo entry 6719641

alv list

   

Submitted by Alex on Mar 13, 2018 at 08:06
Language: ABAP. Code size: 879 Bytes.

"-----------------------------------------
"Searching for Specific Patterns with LIKE 
"-----------------------------------------
REPORT z_demo_reading_data_in_abap.

SELECT *
  FROM sflight
  WHERE carrid IN ( 'AA', 'LH', 'UA' )
    AND seatsmax - seatsocc >= 30
    AND fldate BETWEEN '20181001' AND '20181031'
    AND planetype LIKE 'A%'
  INTO TABLE @DATA(flights).

DATA(title) = |AA,LH,UA Airbus flights in October 2018 with at least 30 free seats: { lines( flights ) }|.

"$. Region Displaying flights in ALV List
cl_salv_table=>factory(
  IMPORTING r_salv_table = DATA(alv_list)
  CHANGING  t_table      = flights
).

alv_list->get_functions( )->set_all( ).
alv_list->get_columns( )->set_optimize( ).
alv_list->get_display_settings( )->set_list_header( CONV lvc_title( title ) ).
alv_list->display( ).
"$. Endregion Displaying flights in ALV List

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).