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
4. Leave list with return to the selection screen
5. SET CURSOR
and
GET CURSOR with addition LINE...
(without FIELD
)
6. Handling of EXIT
in list events
7. SET PF-STATUS SPACE
activates standard list status
8. Fixed list columns during list display
9. New effect of SKIP
at end of page
10. New additions with WRITE [TO]
for alignment
11. Help (F1
) and Possible entries (F4
) now also in "LIKE
" fields
12. GET CURSOR
on field symbols and literals
13. System tables %_LIST ... protected against access
16. Display 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
With WRITE
and ULINE
, you can now use the addition
"AT
" 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
With FORMAT
,
WRITE
and
MODIFY LINE
, you can now use variables to parametrize all format specifications
(INPUT
, INTENSIFIED
, INVERSE
, COLOR
). In any of these additions, a "=" is followed by the variable.
Example
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
List backup
You can now save ABAP/4 lists as list objects.
To save the
basic list or the details list of the current application, you use the function module 'SAVE_LIST'
.
This function module returns the desired list as a list object to an internal table of the structure
ABAPLIST
. Alternatively,
SUBMIT ... EXPORTING LIST TO MEMORY
allows you to place the basic list of any report, rather than the display, in
SAP memory and, after return from the called report, to retrieve
it with the function module 'LIST_FROM_MEMORY'
as a list object. You can then save the list object like any other internal table (in a database, file system, ...).
For further processing, use the function modules 'WRITE_LIST
' (output a list object as a list),
'DISPLAY_LIST
' (output a list object in a pop-up) and any existing or planned converters ('LIST_TO_ASCI
',
'LIST_TO_RTF
', ...).
In SAPoffice, you can save any displayed list in
the private folders of the currently logged on user by choosing System >ListSave (SAPoffice). More functions are planned.
Modification 4
Leave list with return to the selection screen
When you leave the list display of a report, you now return to the report selection
screen where your previous entries remain displayed. This applies only provided the selection screen has not been suppressed by the request
(SUBMIT...VIA SELECTION-SCREEN
). Leaving the list may be triggered by any of the following:
- F3 / Back to the basic list of the report
- F15 / Exit in any list of the report
- The function LEAVE SCREEN
in the application program.
Note
For reasons of compatibility, the LEAVE
function does not offer this functionality. 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
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
, ...) are not affected by this change.
Modification 7
SET PF-STATUS SPACE
activates standard list status
If you want to use a standard list status
(STLI
, PICK
, INLI
)
in the list processing, but first want a dialog with your own user interface, you can achieve this with
SET PF-STATUS SPACE
(when creating the list).
Previously, you could only do this by copying the standard list status to your own PF
status.
Modification 8
Fixed list columns when displaying a list
SET SCROLL-BOUNDARY
allows you to restrict the area of a list page affected
by horizontal scrolling. You can use NEW-LINE NO-SCROLLING
to flag individual list lines as "unmovable".
Modification 9
New effect 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 output as the first line
of that new page (after TOP-OF-PAGE
).
This resulted in 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. You can use them when
outputting to a list and for string processing with WRITE
... TO. In the former 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
Help (F1
) and Possible entries (F4
) now also in "LIKE"
fields
Previously, you could only get field help
(F1) and possible entries
(F4) for fields which had a direct reference to a data element (usually
table fields). In Release 3.0, this is supported for work fields that refer to a table field with
DATA ... LIKE
. This of course also applies to field symbols and parameters of subroutines.
Modification 12
GET CURSOR
on field symbols and literals
The
GET CURSOR FIELD
function now always returns the name of a "global symbol",
i.e. 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. With 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 address the system tables involved in list processing
(%_LIST ...
) in all ABAP/4 programs and in debugging. This is no longer supported
since 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 with
DESCRIBE LIST NUMBER OF LINES lin INDEX SY-LSIND
.
Modification 14
Symbols in lists
You can now use WRITE
with the
addition '...AS SYMBOL'
to output 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 FORMAT
and WRITE
statements, you can now define particular areas in a list as hotspots.
When you click once with the mouse in one of these areas, it is as if you had placed the cursor on the
clicked position in the list and then pressed the function key F2 (i.e. like double-clicking, but 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 allows you to format quantity fields according to a unit. Quantity fields are packed fields and usually have the type QUAN in the ABAP/4 Dictionary. Apart from their defined number of
decimal places, you can format them according to the unit specified in UNIT
, e.g. for item specifications without
fractional portion.
This translation does not reflect the current version of the documentation.