前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ABAP工作流(workflow)的调试方式

ABAP工作流(workflow)的调试方式

作者头像
Jerry Wang
发布2020-07-21 10:54:11
6830
发布2020-07-21 10:54:11
举报

There are several posts in SCN talking about workflow debugging. Most of them are manually generating an endless loop and then can launch debugger in SM50. However, if you try to debug standard workflow, you are not allowed to manual inject any endless loop in standard code. If the original developer is not so kind to leave any switchable endless loop in standard code, you have to go another way.

In this example a common debugging approach is demonstrated:

Document builder is an application provided by SAP which can allow you to generate output file with format PDF, DOCX and HTML from various input with format DOCX, HTML and TXT. The workflow is also supported. When a document is generated and released, one work flow item will be sent to the respective approver.

However during my testing, I meet with error message “Workflow without approver”, although I have maintained the approver in customizing correctly.

So I guess there must be something wrong during the agent determination of workflow runtime. In order to find the root cause I have to debug it.

the involved workflow is WS40400006.

step1: tcode SMQS to degegister the queue WORKFLOW_LOCAL_001. Never forget to re-register it once you finish debugging.

step2: step breakpoint on workflow framework method CL_SWF_RUN_WIM_EXECUTION_MGR~START_EXECUTIONS, CL_SWF_RUN_WFM~EXECUTE_QUEUES:

then repeat the steps to trigger your workflow.

step3: tcode SWI1. Now you will find one entry for your workflow item. Execute it:

the first breakpoint is triggered:

click F8, then the second breakpoint is triggered:

This method covers the fundamental logic of workflow execution engine. There is a big loop to traverse all steps which are currently executable:

After some debugging finally I found root cause: there is something wrong with my setting regarding organization unit. After fixing that the error message is gone

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-07-19 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档