There are cases when we just have to delete a wrong record, which has been entered by mistake or it is already not relevant and stops more important transactions. First of all, we have to check all other options, because deletion directly from the table can cause bigger problems.
If we already investigated the case and there is no other option to solve the problem left, than we have to delete it.
But it is not so easy to delete from a SAP table, when the table has no maintenance view and we are not able to delete directly.
There is one trick for such situations. There is an option to delete or modify a record in debug mode. This so called “Workaround” has to be used very carefully, because it may cause inconsistencies. If we are sure and we know what we are doing, we can execute following steps:
- We open the table with transaction SE16 and using SE16 standard list. This can be set in the menu – settings>> user parameters>>browser data>> select SE16 standard list
- Enter selection criteria and display the record, which should be modified or deleted with transaction SE16.
- Type “/h” in command box and press enter. This will start the debug mode. We press the button with the glasses and the debugger is opened or we doubbleclick on the record.
- We need to create a break-point at subroutine ‘SET_STATUS_VAL’ program ‘SAPLSETB’. To do this we can press SHIFT+F6 and set the break-point easy by entering the name of the program in the field program and the subroutine in the field formula. We press OK and the break-point is set.
- Next step is to press F8, which executes the whole program until the break-point. The program stops exactly on the place where ‘SET_STATUS_VAL’ is defined. We click on the variable ‘code’ and it appears on the right part of the screen where we can change its value from “SHOW” to “EDIT” or “DEL”.
- We press again F8 to execute the program till the end and the record is opened for deletion or for modification. A “delete entry” button appears.
- Save and ready.