Skip to Content
Author's profile photo Ashutosh Deshpande

Workflow debugging : Trick ;)

Most of ABAPers are dependant on debugger more than code editor 😀 . In the same way when I learnt workflow, I was wondering if I can debug workflow like R3 report/WDA. There are some situations while executing the workflow where we need to check container values on runtime and the data flow through the workflow.

So for all the ABAPers, refer below steps. This is the magic trick to debug workflow 😉

1.     Open BOR method which you want to debug. Put below code in it. Save and generate the BOR.

        This is infinite loop code. 😀


2.      Trigger the workflow.

3.     Go to SM50, you will observe one task is in Running state with user as WF-BATCH.


4.     Select that record and click Administration from menu bar.

        Go to Program and then click on Debugging, this will open new session for debugger.


5.     Terminate the infinite loop by clicking to ‘Go to Statement’.


Now you can debug your workflow methods. This trick works fine in development server, but don’t forgot to comment/remove the infinite code before transport to Production 😀


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Modak Gupta
      Modak Gupta

      Hi Ashutosh

      Appreciate that you took the effort to share your learning with us!!

      Not to discourage you, but a similar post already exists since 2013:

      Moreover, the technique you mentioned will only help when it is a custom workflow and that too in Development. What about an issue in production system? In a Standard Workflow?

      The thread above uses a similar approach, however, enables debugging in PRD as well .

      The issue with yours and the above thread's approach is that  we should know in advance where a problem might occur...which is hardly a case in real time! AND moreover, it can be applied to custom workflows only.

      SAP has provided some notes to help with the above problems - 1731777 and 1782731.

      Intention is only to bring my thoughts to  the table.



      Author's profile photo Ashutosh Deshpande
      Ashutosh Deshpande
      Blog Post Author

      Hi Modak,

      Thank you so much for your reply. 🙂

      Actually I had visited the same link before writing this blog.

      My approach is exact similar but here my intention is to present my learning with some images, it will help for better understanding of readers.

      For PRD debugging, I can suggest another approach. Rather than creating Z table. Flags can be maintained in TVARVC table.

      This will work in custom workflows. But for standard workflows you need to unlock BOR methods.



      Author's profile photo Rob Dielemans
      Rob Dielemans

      In the rare case that you need to debug workflow almost exactly as it would be at runtime you simply need to (temporary) change WF-BATCH user to dialog and place en external break-point for the workflow user. ]

      Author's profile photo Pavel Astashonok
      Pavel Astashonok

      and what about foreground steps? is it possible to debug?

      Author's profile photo Abongile Nyamakazi
      Abongile Nyamakazi

      You do not need to write a code for this just go to your code on Utilities->settings->debugger-> change user name to WF-BATCH