SM30 Table Maintenance do sort

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.