Skip to Content

I found the below steps very useful to sort the table maintenance before display.

  • Go to SE11 and enter table name(eg. ZTEST) ->Display
  • Click UTILITIES menu->Table Maintenance Generator
  • Click on ENVIRONMENT menu->Modification->Maintenance screens->Double click on record in the popup.
  • Write one MODULE SORT_EXTRACT (in PBO of the maintenance view screen) to sort exactly before Table Control loop statement(LOOP AT EXTRACT WITH CONTROL)
  • Write the below piece of code at SORT_EXTRACT to sort Table Maintenance.

    MODULE SORT_EXTRACT OUTPUT.

    DATA : IT_ZTEST LIKE ZTEST OCCURS 1WITHHEADER LINE .

    IF NOT SY-UCOMM = ‘NEWL’.

    IT_ZTEST[] = EXTRACT[].

    SORT IT_ZTEST BY F1 F2 F3.

    EXTRACT[] = IT_ZTEST[].

    ENDIF.

    ENDMODULE” SORT_EXTRACT OUTPUT


    Source: An SAP Consultant: SAP ABAP – sorting Table maintenance

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Jörg Sauterleute

    I have “optimized” the MODULE Content, to be able to use it more than once

    CODE:

    CASE objh-objectname.    “global field 🙂

      WHEN ‘<YOUR_MAINTVIEW>’. 

        DATA : IT_ZTEST LIKE <YOUR_MAINTVIEW> OCCURS 1 WITH HEADER LINE .

         […]

    ENDCASE.

    (0) 

Leave a Reply