If you dealt with services that have big WSDL files, you have probably encountered issues. You may need to edit WSDL yourself and try again. Sometimes you try to delete all the proxy objects(not only root) but some become stuck in an inconsistent state. You also can not delete them from SE11.
The solution of SAP for these kinds of problems (as stated in the SAP Note 1604254) is manually calling the DELETE_SINGLE_PROXY method of the class CL_PROXY_DATA from the SE24 transaction.
However, if you have many objects this solution gets infeasible. So I wrote a little ABAP report for my use case.
As I have developed and used this solution, it became clear that the best practice is to have different prefixes for each proxy in an ABAP package. If the package + prefix combination is unique, deletion will be easy.
Give me the code
REPORT zproxycleaner. DATA: tb_fat LIKE tadir OCCURS 0 WITH HEADER LINE. TABLES: tadir. SELECT object obj_name INTO CORRESPONDING FIELDS OF TABLE tb_fat FROM tadir WHERE obj_name LIKE 'ZFP#_%' ESCAPE '#' AND devclass EQ '$TMP' . LOOP AT tb_fat . CALL METHOD cl_proxy_data=>delete_single_proxy EXPORTING object = tb_fat-object obj_name = tb_fat-obj_name. ENDLOOP.
Thanks for reading,