Skip to content

ABAP Keyword Documentation →  ABAP - Release-Specific Changes →  Changes in Release 3.0 

List Processing in Release 3.0


1. WRITE and ULINE with Variable Position and Length Specifications


2. Variable Format Specifications with FORMAT, WRITE, and MODIFY LINE


3. Saving lists


4. Exit list and return to the selection screen


5. SET CURSOR and GET CURSOR with the addition LINE... (without FIELD)


6. Handling of EXIT in list events


7. SET PF-STATUS SPACE activates standard list status


8. Fixed list columns in list display
(leading column)


9. New behavior of SKIP at end of page


10. New additions with WRITE [TO] for alignment


11. Field help (F1) and input help (F4) now also in
"LIKE" fields


12. GET CURSOR on field symbols and literals


13. System tables %_LIST ... protected against access


14. Symbols in lists


15. Hotspots in lists


16. Output of QUAN fields (WRITE addition UNIT)

Other versions: 7.31 | 7.40 | 7.54

Modification 1

WRITE and ULINE with variable position and length specifications


In WRITE and ULINE, the addition "AT" is not available which allows dynamic position and/or length specifications.


Example

DATA: POS TYPE I    VALUE 5, 
      LEN TYPE I    VALUE 10, 
      F(20)         VALUE 'Test output'. 

WRITE AT /POS(LEN) F. 
ULINE AT /POS(LEN). 

Modification 2

Variable Format Specifications with FORMAT, WRITE, and MODIFY LINE


In FORMAT, WRITE, and MODIFY LINE, it is not possible to use variables to give parameters to all format specifications (INPUT, INTENSIFIED, INVERSE, COLOR). In any of these additions, a "=" is followed by the variable.


Example

DATA: COL TYPE I,
      INT TYPE I,
      F(20)    VALUE 'Test output'.

IF <condition>.
  INT = 1.
  COL = 5.
ENDIF.

WRITE F COLOR = COL INTENSIFIED = INT INPUT ON.
FORMAT COLOR = COL INTENSIFIED = INT.

Modification 3

Saving Lists

ABAP lists can now be saved as objects known as list objects.
To save the basic list or the details list of the current application, the function module 'SAVE_LIST' is used. This function module passes the required list as a list object to an internal table of the structure ABAPLIST. Alternatively, the basic list of a report can be passed to the SAP memory instead of the display by SUBMIT ... EXPORTING LIST TO MEMORY, and then, after returning from the report, be retrieved as a list object by the function module 'LIST_FROM_MEMORY'. The list object can be saved like any other internal table (in a database or file system, for example).
For further processing, use the function modules 'WRITE_LIST' (output a list object as a list), 'DISPLAY_LIST' (output a list object in a dialog box), and any existing or planned converters ('LIST_TO_ASCI', 'LIST_TO_RTF', and so on).
In SAPoffice, any displayed list can be saved in the private folders (SAPoffice) of the currently logged on user by choosing System → ListSave (SAPoffice). More functions are planned.

Modification 4

Exit List and Return to the Selection Screen


When the list display of a report is exited, the selection screen of the report is displayed again. The entries made on the selection screen are preserved. Prerequisite: The selection screen has not been suppressed by the request (SUBMIT...VIA SELECTION-SCREEN). The list can be exited by
- F3 / going back to the basic list of the report
- F15 / exiting any list of the report
- the programmed function LEAVE SCREEN in the application program.


Note

For reasons of compatibility, the function LEAVE does not offer this function. Instead, Release 3.0 includes a special variant LEAVE LIST-PROCESSING.

Modification 5

line level


Note

2


Example

The following example shows how the previous usage of SY-CUCOL can be replaced by the function GET CURSOR:

DATA: CURSORPOSITION TYPE I, 
      CURSOROFFSET   TYPE I, 
      CURSORLINE     TYPE I. 

AT LINE-SELECTION. 
  CURSORPOSITION = SY-CUCOL - 2 + SY-STACO.               "old 

AT LINE-SELECTION. 
  GET CURSOR LINE CURSORLINE OFFSET CURSOROFFSET.         "new 
  CURSORPOSITION = CURSOROFFSET + 1.                      "new 

Modification 6

list events


Note

This change has the following consequence: In report processing (with a logical database), EXIT from TOP-OF-PAGE and END-OF-PAGE previously terminated processing of the logical database and branched directly to the list display. Now, only the event TOP-OF-PAGE or END-OF-PAGE is terminated. Any remaining logical database events (START-OF-SELECTION, GET, and so on) are not affected by this change.

Modification 7

SET PF-STATUS SPACE Activates Standard List Status

If a standard list status (STLI, PICK, or INLI) is required in list processing, but a dialog with a separate user interface is needed first, this is made possible by using SET PF-STATUS SPACE (when creating the list).
Previously, this was only possible by copying the standard list status to a separate PF status.

Modification 8

Fixed List Columns when Displaying a List (Leading Column)

SET SCROLL-BOUNDARY enables the area of a list page affected by horizontal scrolling to be restricted. NEW-LINE NO-SCROLLING can be used to flag individual list lines as "unmovable".

Modification 9

New Behavior of SKIP at End of Page

Previously, if SKIP occurred at the end of a page and there was a fixed number of lines per page (as defined by NEW-PAGE LINE-COUNT), a new page was started and the blank line was displayed as the first line of that new page (after TOP-OF-PAGE).
This produced unwanted line shifts on a new page, although the only purpose of SKIP was to separate different areas of the list. Therefore, SKIP is no longer executed on the next page unless explicitly requested by NEW-PAGE.

Modification 10

New Additions with WRITE [TO] for Alignment


WRITE now has the additions LEFT-JUSTIFIED, CENTERED, and RIGHT-JUSTIFIED for left-justified, centered, or right-justified output. They can be used in output to lists and for string processing with WRITE ... TO. In the first case, the alignment refers to the output field in the list. In the latter case, it refers to the target field specified after TO.

Modification 11

Field Help (F1) and Input Help (F4)) Now Also in "LIKE" Fields


Previously, field help (F1) and input help (F4) were only available for fields which had a direct reference to a data element (usually table fields). Now, this is supported for work fields that refer to a table field with DATA ... LIKE as well. This of course also applies to field symbols and parameters of subroutines.

Modification 12

GET CURSOR on field symbols and literals

The function GET CURSOR FIELD now always returns the name of a "global symbol", in other words, a field that is still valid when the list is displayed. Names of field symbols and local variables are invalid in this context.
For field symbols and reference parameters of subroutines, the function returns the name of the global symbol that may have been assigned when the list was displayed. In literals, the return code is no longer set to 4, but the field name becomes SPACE and the return code 0. The contents of the literal are returned as ... VALUE.

Modification 13

System Tables %_LIST ... Protected Against Access

Previously it was possible to directly address the system tables of list processing (%_LIST, ) in all ABAP programs and in debugging. This is no longer possible. The most common reason for wanting to do this (determining the number of lines in a list with DESCRIBE TABLE %_LIST LINES lin) can now be achieved by using DESCRIBE LIST NUMBER OF LINES lin INDEX SY-LSIND.

Modification 14

Symbols in Lists

WRITE with the addition '...AS SYMBOL' is now used to display certain characters in a list as symbols.


Example

INCLUDE <SYMBOL>. 
WRITE: / SYM_PHONE AS SYMBOL.        " Output: telephone symbol 

Modification 15

Hotspots in Lists

By using the addition '...HOTSPOT' with the statements FORMAT and WRITE, it is now possible to define particular areas in a list as hotspots.
Clicking once with the mouse in one of these areas triggers the same response as placing the cursor on the clicked position in the list and then pressing the function key F2 (in other words a double-click is achieved with a single click).


Example

DATA F. 
FORMAT HOTSPOT. 
* or 
WRITE: / F HOTSPOT. 

Modification 16

Output of QUAN Fields (WRITE Addition UNIT)


WRITE now has the addition UNIT which enables quantity fields to be formatted by unit. Quantity fields are packed fields and usually have the type QUAN in ABAP Dictionary. Apart from their defined number of decimal places, they can be formatted by the unit specified in UNIT, for example, for item specifications without decimal places.