Additional Blogs by SAP
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

Duet Workflow Template 1.0 allows you to turn SAP approval workflow into Outlook approval process. But how do you determine which SAP workflow can be used for Duet Workflow Template, consider there are so many SAP delivered or custom developed workflows in your system?

First, it doesn’t matter if it is a SAP delivered or custom developed workflow. Duet Workflow Template doesn’t care.

Second, the workflow template must have a user interaction task. Duet Workflow Template does care about that.  Please pay attention here, I said user interaction task, means a step inside the workflow template. So no matter how complex is your workflow template, you have different logics to branch to different processes. However, as long as you have one or multiple steps of user interaction task, you can still turn those steps into Outlook approval process. Only those steps, all other processes in your workflow template will remain the same as they are.


Now, what is a user interaction task?

A user interaction task means user needs to make some decisions. For example, approve or reject is the most explicit user decision. Others like change or no change, release or not release, submit or cancel etc.

Inside SAP workflow template, there are mainly two types of user interaction task - User Decision and Dialog Activity.

User decision is the best fit for Duet workflow template. When you see an icon with a question mark like below in your workflow template, you are all set to use the Duet Workflow Template! That is a user decision task.



Many of the time you see icons like below.  That would be a dialog activity if it requires user interaction.




For this type, it needs a little more work to make Duet Workflow Template happy.

Option one - go ahead and schedule Duet Workflow Template to pick up workflow items related to this activity step. Approval mail will still be sent to Approver’s Outlook Inbox. When Approver clicks on approve or reject button, decision will be sent back to SAP workflow engine. But since there is no place in task container to hold the decision key (Because it is a dialog activity, it doesn’t have a decision attribute as the below picture), workflow engine doesn’t know how to process the following workflow step.



So if you are an ABAP programmer, you can use the Duet Workflow Template Inbound Custom Handler to do the application logic and update workflow container. The Inbound Custom Handler is the function module invoked when the Outlook decision is received in SAP. For example, your decision is to release a purchase requisition. The decision key will be 0001 by default when it reaches SAP. So based on this decision key, you can call the release method of business object BUS2105 in the Inbound Custom Hander to release the overall requisition. The method will be “BAPI_REQUISITION_RELEASE_GEN”. Of course you need to figure out what is the release code and release group etc in order to pass the correct parameters to the release method.

You can take a look at the SAP default Inbound Custom Handler “S_OSP_WF_PAT_DEFAULT_CH_IB” to see how you can create your own custom handler.

Option two - insert a user decision task in your workflow template. My opinion this is a more straight- forward method. You will need to do some binding between the task container and the workflow container. Such as passing the purchase requisition release code to the next workflow step, but you eliminate the work to do ABAP coding in Inbound Custom Handler.

I shall give more detail in my next blog on how to insert a user decision task in a workflow template such as purchase requisition. So stay tuned.