Nowadays we’ve FIORI’s MyInbox App, that serves the same “purpose” as SBWPs transaction (user’s inbox/outbox), were the user/approver could execute all their Workflows actions and reviews.
But in some cases, it’s needed to “see” what’s in the user’s inbox (pending Workflows) to execute any action or checks, etc., a part from the Approval processes (MyInbox or SBWP). To achieve this and many other Workflow functionalities, you should use the SAP_WAPI* functions. They serve pretty much all the needed Workflow functionalities, such as: Read a user inbox, execute an action on a Work item, start a Event/Workflow, read Work item containers, etc.
Let’s see 2 of them, read user’s inbox and execute a work item actions.
To read any user’s inbox, use the SAP_WAPI_CREATE_WORKLIST function:
Just place the desired user on the USER input field, and on the Worklist return there is his inbox Work items.
In case some of these Work items are “Users Decision”, you could execute a desired option using SAP_WAPI_DECISION_COMPLETE:
Let’s say on the Workflow below:
I want to execute the Approve Action for it:
So basically i need the Work item ID and set the Decision Key(on the case above 0001 to Approve).
After the execution, the Workflow continues it’s execution as it wore Approved by MyInbox or SBWP.
Explore the WAPIs Functions, you’ll find a lot of useful ones in there.