REPORT ZSAPN_SORT_ASCENDING .
DATA : IT_MARA TYPE TABLE OF MARA.
DATA : WA_MARA TYPE MARA.
SELECT * FROM MARA INTO TABLE IT_MARA ORDER BY MATNR ASCENDING.
LOOP AT IT_MARA INTO WA_MARA.
WRITE:/ WA_MARA-MATNR.ENDLOOP.


REPORT ZSAPN_SORT_ASCENDING .
DATA : IT_MARA TYPE TABLE OF MARA.
DATA : WA_MARA TYPE MARA.
SELECT * FROM MARA INTO TABLE IT_MARA ORDER BY MATNR DESCENDING.
LOOP AT IT_MARA INTO WA_MARA. 
WRITE:/ WA_MARA-MATNR.
ENDLOOP.



Serkan AKKAVAK
Bilgisayar Mühendisi
serkurumsal@yandex.com