Hi Jie,
First use the OKCODE of the Table maintaince.
Case Sy-ucomm.
when 'DELE' ." Check the Status of the Table maintaince Screen.
when 'SAVE' .
When 'Chnage' .
End case.
put the Logic inside your case as per your requirement.
Regards,
Nishant