Well, someone asked before, because the code is too little has not been sent ... Give it out today.
As we all know, table maintenance is actually a TC, but the table maintenance is unified, do not use the common name of the table name what, this is not much to say, to focus:
The general ordering of the TC can be placed in any position of the 1,PBO (before loop); 2,pai processing end position (in many places)
This dick is too lazy to logic, I just add a MODULE directly before the loop , as follows:
OUTPUTmodule module LOOP at EXTRACT with CONTROL CURSOR nextline . MODULE endloop.
Before you write the code, take a look at the table structure and the ' date ' position to sort:
OK, see the location, write the following code:
*&---------------------------------------------------------------------**& Module Mod_set_sort OUTPUT*&---------------------------------------------------------------------**text*----------------------------------------------------------------------*MODULEMod_set_sortOUTPUT. Field-symbols: <fs_field>TYPEAny."TYPE ZMMT0006-ZJJSJ. ASSIGNextract+ -(8) to<fs_field>. SORTExtract by<fs_field>Descending.Endmodule.
Don't ask +13 (8) What it means ...
OK, sort the end, if you want to multi-dimensional, define two, three also line, four can also ...
Sm30 Table Maintenance Sort