Ansicht
Dokumentation

ABENVIRTUAL_SORT_FLIGHTS_ABEXA - VIRTUAL SORT FLIGHTS ABEXA

ABENVIRTUAL_SORT_FLIGHTS_ABEXA - VIRTUAL SORT FLIGHTS ABEXA

rdisp/max_wprun_time - Maximum work process run time   ABAP Short Reference  
This documentation is copyright by SAP AG.
SAP E-Book

- Virtual Sort of Flight Data

This example demonstrates the virtual sorting of an internal table containing flight data.

Source Code

Execute

Description

In this example, an internal table flight_tab containing flight data is sorted virtually by the longitudes and latitudes of the departure and arrival cities. To do this, two additional tables from_city_tab and to_city_tab are constructed. The lines of these tables contain the longitudes and latitudes of the departure and arrival cities from the respective lines of flight_tab.

Virtual sorting with the method VIRTUAL_SORT of class CL_ABAP_ITAB_UTILITIES takes place at the operand position of a FOR expression for a table iteration. The virtual sorting involves all three internal tables. The temporary result of the sorting is used to construct a sorted internal table from the lines of flight_tab. This table is only temporary, and is an input parameter of the method WRITE of class CL_DEMO_OUTPUT.

It is sorted once in ascending order and once in descending order. This does not change the order of the lines in the internal tables that are involved. These remain in their original unsorted state. Virtual sorting makes it possible to generate various sorted output data without affecting the original data.






CPI1466 during Backup   General Material Data  
This documentation is copyright by SAP AG.

Length: 1676 Date: 20240329 Time: 141932     sap01-206 ( 43 ms )