LeverX ABAP Essentials - Debugging SAP Workflow

1,199 views
1,033 views

Published on

While testing SAP Workflow you need to debug ABAP code in a method used in one of the background tasks. This presentation describes a method for debugging.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,199
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

LeverX ABAP Essentials - Debugging SAP Workflow

  1. 1. Essential SAP Tutorial SAP ABAP Tips:Debugging a Background Task in SAP Business Workflow By Vadzim Khlystun 1 Copyrighted 2012 by LeverX, Inc.
  2. 2. Tutorial Goal  Sometimes while testing SAP Workflow you need to debug ABAP code in a method used in on of the background tasks. Just setting a break-point in this method won’t work since background task is executed in another context in background. Fortunately, there is a workaround exits which can be used to debug this scenario.  Be careful when using this technique because it based on causing an infinite loop in ABAP stack and can hang up SAP system if used improperly. 2 Copyrighted 2012 by LeverX, Inc.
  3. 3. Step 1 Add following code at the  DATA lv_exit. beginning of DO. the method you want to IF lv_exit = X. debug and set EXIT. a break-point at the first line. ENDIF. ENDDO. 3 Copyrighted 2012 by LeverX, Inc.
  4. 4. Step 2 Run/trigger the workflow you want to debug. Run transaction SM50. Select process generated by your workflow (which most likely has username WF_BATCH) 4 Copyrighted 2012 by LeverX, Inc.
  5. 5. Step 3  In menu select Administration - > Program - > Debugging  A new session with active debugger will pop up.  After finishing debugging, change value of variable lv_exit to something else or end the process by selecting ‘Cancel’ button in Administration menu.21 July 2012 5 Copyrighted 2011 by LeverX, Inc.
  6. 6. Conclusion Described technique is a powerful tool which is very useful when testing SAP workflow. Use it responsibly to not cause outages in SAP system. 6 Copyrighted 2012 by LeverX, Inc.
  7. 7. Contact InformationPlease contact us for more information about our services or solutions available. LeverX, Inc. 800 West El Camino Real, Suite 180 Mountain View, CA 94040 USA Tel: (650) 625 – 8347 Web Site: www.LeverX.com 7 Copyrighted 2012 by LeverX, Inc.

×