Skip to Content

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. 😀

/wp-content/uploads/2015/01/1_622764.jpg

2.      Trigger the workflow.

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

         /wp-content/uploads/2015/01/2_622765.jpg

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.

         /wp-content/uploads/2015/01/5_622778.jpg

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

          /wp-content/uploads/2015/01/6_622780.jpg

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 😀

Ashutosh

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. 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:

    http://scn.sap.com/community/bpm/business-workflow/blog/2013/10/23/how-to-debug-workflow

    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.

    Regards,

    Modak

    (0) 
    1. Ashutosh Deshpande 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.

      Regards,

      Ashutosh

      (0) 
      1. 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. ]

        (0) 

Leave a Reply