In this blog we will go through the steps required to enable flexible workflow for Purchase Requisition in S/4 HANA Cloud. Along with that we will see what are the different configurations available with Purchase Requisitions Flexible Workflow.
Flexible workflow is alternatively called as scenario based workflow, since here user can configure different workflow process using the same workflow scenario.
Steps to follow to enable Flexible Workflow
Flexible workflow in Purchase Requisition is enabled based on the document type.
Manage you Solution App ->Configure your solution -> Requirements Processing -> Approval Settings for Purchase Requisition -> Configure
In Purchase Requisition , flexible workflow can be set at header or item level which is again based on document type.
Configuring Header/Item level(checkbox Overall Req. rel.) – Enabling the check box Overall Req. rel. sets the document type for header level approval. Disabling the checkbox sets the document type for item level approval.
Here we have enabled NB for item level approval and NBS for header level approval.
Configuring flexible workflow(Flexible Workflow checkbox) – Enabling this checkbox activates flexible workflow for Purchase Requisitions created with this document type .
In this case , we have enabled header flexible workflow against document type NBS and item flexible workflow against NB.
Now you configure workflow by defining the start condition based on which you want to trigger the approval process , who will be recipients of the workflow etc.
Manage workflow for Purchase Requisition App : Here we have two workflow scenarios “Overall Release of Purchase Requisition” for configuring header workflows and “Release of Purchase Requisition Item” for item level workflows.
Here you can define the order of the workflow by using the “Define Order” button . When the workflow is triggered during creation of Purchase Requisition, the workflows are evaluated based on the order. That is it will start evaluating from the workflow with order 1, if the Purchase Requisition created doesn’t satisfy the preconditions in workflow with order 1 then it will go to order 2 workflow and so on.
Here you can see there is a workflow “Automatic Approval of PR” at header and “Automatic Approval of PR Item” at item level. This is a pre-delivered content and it is delivered as active as this is the fallback option i.e. if none of the workflow configured are picked up , this automatic approval workflow is picked up and the Purchase Requisition is approved automatically. Since this is a fallback option order of this workflow is always the highest one i.e. the highest number.
Note: To avoid any issue with the approval process which might result in hanging Purchase Requisition , pre-delivered content of automatic approval of workflow should always be active.
You can configure new workflow by using the “Add” button or you can copy an existing workflows using “Copy” button and adding your changes to the workflow .
Configuring Header workflow:
Preconditions are basically the conditions on which you want the workflow to be triggered. In this case if the total value of the Purchase Requisition is equal to or greater than 100 EUR , this workflow will be picked up for approval process.
At header workflow scenario , you have 4 different condition to choose from. You can add more than one precondition which are separated by AND i.e. only when both the conditions are satisfied this workflow will be picked up. For few fields a value help is there to choose from as in this case company code and currency.
After this you need to configure the steps. You can have one or more steps.
You click on add to configure the steps. Here you can choose whether you want to go for automatic approval or manual approval(Overall Release of Purchase Requisition) for this step.
Once you choose Overall Release of Purchase Requisition, you need to define who will be the recipient for this step in approval process.
In recipients you have two options. Either you can define the “Role” of the recipient , so the system will evaluate who is the recipient at runtime depending upon the users assigned to that role or you can use “User” wherein you will directly assign the users who are the recipient of this step. Single or multiple recipients for the same step is supported to achieve parallel approval.
At the same time you can mention whether you want this to be approved by all the recipients of the step to move it to the next step or approval by one of the recipients is suffice to move the process to the next step. This is enabled by choosing “One of the recipients” (only one recipients approval is suffice) or All of the recipients(all recipients need to approve to move to next step).
In case of header workflow , the above three roles are available. If you want you implement you own logic to derive the recipient user, Agent Determination BADI need to be implemented.
In case of Users more than one user can be chosen from the value help as recipients.
Preconditions can be used at each step level as well. Step level precondition ensure that this particular step will be triggered only if the preconditions are satisfied. The precondition available here are the same as the one above.
For exception handling, there are different option to choose from for what you want to do if this step is rejected by the recipient of the step.
Once you have configured all these, this workflow need to be saved and activated . You can also change the order using “Define Order”.
Configuring Items workflow:
Configuring item level workflow is same as header workflow . Now only difference are with respect to preconditions and “Role” recipients.
Role based Recipients
Once all preconditions, steps and recipients added , save and activate.