转 Forward a work item to your own currently logged in SAP ID

Forward a work item to your own currently logged in SAP ID

By Anirban Bhattacharjee, KPIT Cummins and Infosystems from Link

Purpose: The purpose of this document is to demonstrate how you can forward a work item to your own ID. This is not possible via the standard transaction SWIA. For example, if your SAP ID is XYZZ and you are logged into SAP via this ID, you would try to forward the work item to this same ID by running SWIA. This transaction you are executing from this ID itself. But SWIA will give you the prompt “You cannot choose yourself as an agent” and not allow this forward.

 

Business Scenario: Many times when testing various workflow developments, we need to forward a work item to our own ID for testing purposes. Sometimes it becomes difficult to maintain our own ID in the Agent / Approver tables as they might need Customizing Transport Requests or other business constraints. Standard T-Code SWIA does not allow forwarding the work items to your own ID. On such situations we either need to forward the work item to some other test IDs or ask someone else to do it for us.

Not any more, as with this technique you can even forward any work item to yourself while you are logged in via that same SAP ID and be able to do your testing.

Process: The steps are very simple

·         We will take a work item and first try to forward it to the current logged in SAP ID (self ID) via T-Code SWIA. This will not work.

·         We will then use a special function module to forward this work item to our own logged in SAP ID.

Looking at a work item in the workflow log

Here the following foreground work item currently does not have any agents assigned to it.

We check the work item ID from the technical log

The work item ID for the user decision step is 2733499. We will now run transaction SWIA and enter this work item ID

Now we will select this row and try to forward it to the logged in ID via which this workflow is been tested and this transaction is being executed

 

SWIA gives the following prompt when I try to forward the work item to the current logged in ID via which SWIA is being executed and workflow being tested

The transaction SWIA prompts; “You cannot choose yourself as an agent” and does not allow the Administrator Forward.

Process to forward this work item to self:

Now to make this possible, we need to run the function module:

SWW_WI_FORWARD

This highly useful function module allows you to skip any previous checks and forward to any desired Agent / Approver, including self.

We need to enter the same work item ID for the user decision step 2733499. This we had entered previously in SWIA.

Pass the importing parameter PRECONDITIONS_CHECKED as “X”. This will ensure no conditions are checked!!!

In the TABLES parameter NEW_AGENTS, pass your own logged in SAP ID, like US-XXYYZZ.

This should be the same agent to whom you tried to forward via SWIA but it failed. So this will be the self logged in ID.

The function module screen will look as shown

Now execute the function module. We will see the function module returns the work item status as READY with the selected new agent

To verify that the WI forward worked as expected, we look at the workflow log – agents again

We can see now that the log does not say “No selected agents”, but is showing our own ID to which we forwarded the work item to.

Also note the e-mail like icon, indicates that the work item came as a forward.

In technical log, the step details also confirms that the Forward was a success

Checking in business work place SBWP, to verify with certainty that the work item did get forwarded successfully to own logged in ID

Conclusion: Thus we have successfully forwarded a dialog / foreground work item to own logged in ID even when standard transaction SWIA did not allow the administrator forward to self.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值