I'm sure some of you will have heard of the SAP Report BSP_UPDATE_MIMEREPOS. Especially when working with Web Dynpro ABAP Themes it is incredibly helpful for uploading custom themes to the mime repository.
Sadly it is only helpful in creating folders. Not so much when you need to delete a folder. And due to its somewhat rudimentary interface, it makes it incredibly easy to create a whole heap of folders where they shouldn't be and where they cannot be deleted.
(For example by uploading a theme to /SAP/BC/UR/... instead of /SAP/PUBLIC/BC/UR/... The folder /SAP/BC/ and its subfolders are protected in the sense, that the context menu will not show a 'delete' option)
Thus if you find yourself in the situation where you have misspelled the mime repository path where you wanted to place your files, and the path you have created is protected and thus cannot be deleted using the context menu in SE80, this little trick might help.
DISCLAIMER: Using this method makes it possible to break your SAP installation, by deleting files that are important! I take no responsibility for any important/required/etc files deleted using the description below
NOTE: You will require permissions to debug and to change variables while debugging.
Set a breakpoint in the class CL_TREE_MODEL Method HANDLE_NODE_CONTEXT_MENU_SEL at Line 20:
-------------------------------------------------------
RAISE EVENT node_context_menu_select
EXPORTING node_key = long_key fcode = fcode.
ENDMETHOD. "HANDLE_NODE_CONTEXT_MENU_SEL
--------------------------------------------------------
Now select any context menu entry for the folder you want to delete. When your debugger comes up, change the value of the FCODE variable to 'MR_DELETE'. You will be asked if you really want to delete. Then the wrongly placed folder should be gone.