SAP LIST SYSTEMFIELDS



Get Example source ABAP code based on a different SAP table
  



ABAP_LIST - System Fields
The sections below give an overview of the system fields relevant for list processing. The list that is currently being created is called the current list (like the current page, or current line). A list that has just been displayed, possibly involving a list event, is known as the displayed list. Absolute means that the list itself is referred to and not the state of the list dynpro. A line selected by a list event on which the cursor is positioned, or which is read by READ LINE, is called the selected line.

System Fields During List Creation
These system fields are set after every interactive list event and by the statement READ LINE. System FieldMeaning sy-pagnoPage number of the current page of the current list. Counting begins at 1. sy-linnoNumber of the current line on the current page. Counting begins at 1. sy-colnoNumber of the column on which the cursor is positioned on the current list. Counting begins at 1. sy-linctNumber of lines per page of the current list, if it was specified by the LINE-COUNT addition of the statement REPORT or NEW-PAGE . Otherwise, sy-linct has the value zero. sy-linszLine width of the current list. Set by the LINE-SIZE addition of the REPORT or NEW-PAGE statement. sy-title List header. Set in the text elements of a program or by SET TITLEBAR. sy-srowsCurrent number of lines in the display window. Counting begins at 1. sy-scolsCurrent number of columns in the display window. Counting begins at 1.

System Fields After List Events System FieldMeaning sy-lsindList level of the current list; (basic list: 0, first details list: 1, ..., 20<(>th<)> details list: 20). sy-lsind can be set in the program to replace the current list with the list of the set level. sy-lilliAbsolute number of a selected line in the displayed list. Counting begins at 1. sy-listiList level of the displayed list. sy-liselContent of the selected line. sy-curowNumber of the line in the GUI window on which the cursor of the displayed list was positioned. Counting begins at 1. sy-cucolNumber of the column in the GUI window on which the cursor of the displayed list was positioned. Counting begins at 2. sy-cpageNumber of the first displayed page of the displayed list. Counting begins at 1. sy-staroNumber of the first line on the first displayed page of the displayed list. Counting starts at 1, the lines of the page header are included. sy-stacoNumber of the first displayed column of the displayed list. Counting begins at 1. sy-ucommFunction code that raised the event on the displayed list. sy-pfkeyGUI status of the list currently being displayed.



Latest notes:

The program SHOWLISY displays the current values of the system fields above. Changes to the values caused by scrolling, changing the window size, selecting a list line, and so on, can be monitored.
ABAP_HINT_END