Get Example source ABAP code based on a different SAP table
List Processing in ABAP Release 3.0 ITOC
ABAP_MODIFICATION_NN 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 ABAP Coding
ABEXA 01146 ABAP_EXAMPLE_END
ABAP_MODIFICATION_NN Variable Format Specifications withFORMAT>, WRITE>, 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>, and COLOR>). In any of these additions, a => is followed by the variable.
Example ABAP Coding 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.> ABAP_EXAMPLE_END
ABAP_MODIFICATION_NN 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 user 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 -> List> Save (SAPoffice)>. More functions are planned.
ABAP_MODIFICATION_NN 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. As a 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
Latest notes: For reasons of compatibility, the function LEAVE>> does not offer this function. Instead, ABAP_RELEASE 3.0 includes a special variant LEAVE LIST-PROCESSING>>. ABAP_HINT_END
ABAP_MODIFICATION_NN SET CURSOR> and GET CURSOR> with Addition LINE...> (without FIELD>)>
The functions SET CURSOR LINE>> and GET CURSOR LINE>> enable the cursor to be positioned or the cursor position to be determined in lists at line level>. This is useful in cases where the whole list line (and not the field within the line) is relevant. Previously, the syntax rules required the addition FIELD> to be used.
Latest notes: In general, the function GET CURSOR LINE l OFFSET o> should be used when the absolute cursor position (column) within a list line is evaluated during an interactive list event. The system field SY-CUCOL> does not refer to the list line, but to the displayed list section. After horizontal scrolling, the relative cursor position ( SY-CUCOL>) and the absolute cursor position are different. Furthermore, the system field SY-CUCOL> contains the value 2 > if (for reasons of compatibility) the cursor is on the first visible list column, which makes the calculation of the absolute position difficult. ABAP_HINT_END
Example ABAP Coding
The following example shows how the previous usage of SY-CUCOL> can be replaced by the function GET CURSOR>: ABEXA 01147 ABAP_EXAMPLE_END
ABAP_MODIFICATION_NN Handling of EXIT> in List Events>
The function EXIT>> now has the same effect in all list events> (AT LINE-SELECTION>>, AT USER-COMMAND>> , AT PF...>>, TOP-OF-PAGE ...>>, and END-OF-PAGE>>) as in MODULE>>, FORM>>, and FUNCTION>>. The event therefore ends immediately and the processing continues at the call location (for example, after EXIT> from TOP-OF-PAGE>, the triggering statement WRITE> is executed; after EXIT> from AT LINE-SELECTION>, the list is displayed immediately). Previously, the list was displayed here in both cases (the triggering WRITE> was ignored) and, if there was also indented list processing ( LEAVE TO LIST-PROCESSING>> from CALL SCREEN>>), the entire list processing was terminated.