Events in Table Maintenance SAP ABAP

Hi All,

Table maintenance is the standard recommended method which allows contents of SAP tables to be accessed or modified. Standard table maintenance generator provide basic read/write functionalists. If you required to have custom logic/custom validations in your table maintenance, you can use use events to achieve these custom requirements.

Example requirement: User should only be able to read/write data under company code '1000'. You can have your own logic with authorization according to customer requirement. 

This requirement can be achieved by implementing a custom read event. Type 'AA' event which creates a custom data read routine should be implemented.

First step of the development is to create the standard table maintenance. Go to transaction SE11 and select Utilities > Table Maintenance Generator from the main menu.


Set parameters function group, authorization group, screen number and transport detail.


Then in the change mode of the table maintenance select Events under Environment > Modification menu.


Set the event type as AA and form routine name. AA is the event type to bypass the standard selection routine.


Click on the editor button to implement the form routine under a Z include. Implement the logic to remove the restricted data rows from table 'Total'.

FORM display_screen_and_read_data.

LOOP AT total.

  DATA ls_TAB TYPE ZFI_TAB.

  PERFORM table_get_data. 


    MOVE <vim_total_struc> TO ls_TAB.

    IF ls_TAB-bukrs NE '1000'.
      DELETE total.
      CONTINUE.
    ENDIF.

  ENDLOOP.


ENDFORM.

SAP, SAP ABAP, Table Maintenance, Events, Table Maintenance Events, SE11, Modifications, Enhancement, Table Maintenance modification, Events in Table Maintenance, Isuru Fernando.


Labels: , , , , , , , , , ,