To Sort Table Maintenance Before Display

To Sort 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.

1
2
3
4
5
6
7
8
9
10
11
12
13
MODULE SORT_EXTRACT OUTPUT.
  DATA : IT_ZTEST LIKE ZTEST OCCURS 1 WITH HEADER LINE .

  IF NOT SY-UCOMM = ‘NEWL’.
 
    IT_ZTEST[] = EXTRACT[].

    SORT IT_ZTEST BY F1 F2 F3.

    EXTRACT[] = IT_ZTEST[].

  ENDIF.
ENDMODULE.  ” SORT_EXTRACT OUTPUT

Добавить комментарий

Ваш адрес email не будет опубликован.