Skip to Content
Technical Articles
Author's profile photo Fatih Pense

ABAP Mass Delete Problematic Proxy Objects

Hi everyone,

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,

Fatih

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Jelena Perfiljeva
      Jelena Perfiljeva

      Thanks for sharing!

      Had to see the note to believe it. OMG. SAP Support could've just written a small program like this one and attached it to the note. Not to mention someone should've probably done something to prevent such inconsistencies in the first place. What about unit test, eh, SAP?

      Author's profile photo Alejandro Jacard Plubins
      Alejandro Jacard Plubins

      Have to agree, the same note should have provided som custom code to download and apply to mass-delete proxy objects.....(sigh)

      Author's profile photo Alexey Zaretskiy
      Alexey Zaretskiy

      A more standard alternative:

      1. Run report SXIVERI_PROXY_DDIC_CHECK, it will show all inconsistent entries.
      2. Select the entries you want to delete and press the magic button
      3. Profit!

      Author's profile photo Fatih Pense
      Fatih Pense
      Blog Post Author

      Hi Alexey,

      I agree that if the report "SXIVERI_PROXY_DDIC_CHECK" solves your problem, you should first try the standard solution.

      I don't remember the details of my problem. However, the SAP note also mentions the report. The code in the blog post is the last resort but also built on a suggested solution from SAP.

      Thanks for your contribution.

      Regards,
      Fatih