7 - Flexible Fiori Workflow

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 19

Flexible Fiori Workflow

1 Basics
Technique for approval process. Exists since 1610 and sine then this technique has improved and established into
many transactions/documents.
Purchasing is a risky process: High chance of frauds as the money is going out of the organization >> many
approval stages may be needed.
Approval can be done either with

 Flexible Workflow or
 Classic Release strategy without classification
 Classic Release strategy with classification and release codes

Challenges of the Release strategy


1. Complex to maintain and understand. We’ll always need functional consultants to set it up
2. Max. level of approvals: 8. However, you must know that the higher number of approvals does not
necessarily mean the better control!
3. We must use the same class if we roll it out from plant to plant/ purch org to purch org
4. Config and changes to release strategy require transaction request.
5. Exception handling is not available. There’s no return possibility. If smb rejects the release, then the
approval chain must start anew.

Pre-requisites for the flexible workflow:


1. S4H with Fiori UI
2. HR/MM – HR mini-master + SAP users
3. Activate Flexible Fiori workflow on the Purchase Doc Type level (NB, ZNB, ZPS …). You can switch
between classic release strategy and flexible WF (activation can be ticked/unticked). SAP will check at
the moment of the document creation, what approval technique to use. If both techniques are configured,
then the flexible WF overrule the classic release strategy.

Recommendation for conversion: Go-live with Release strategy and then switch to flexible WF in 2 nd phase.
Green field implementation: Flexible Fiori WF (since 1909).

Challenges of the Flexible WF


1. Once the WF has been triggered, you won’t be able to change the object until and unless you step out of
the workflow (with approval/rejection).
2. Approval/ Rejection comments won’t be visible in the PO/PR header

T codes/ Apps to approve:


Classic Release Strategy: “My Inbox”, “Gui inbox” and ME29N, ME28
Flexible WF: Only with “My Inbox” app
2 Configuration

2.1 PR
> Section “Flexible Workflow for Purchase REqs” in each Business object. See below

Go to (Activate Flexible WF for Purchase Reqs)

*** In the earlier versions, there


was a bug when the last column
“Scenarios..” was not visible in this
screen. To fix it, you have to either
close this screen and reenter or log
off and log in again

If “Scenario-based WF” is ticked, then the Flexible WF will kick off.

Another table is “Manage conditions to restart flexible WF”:

If PR has been approved and you want to take it to re-approval >> this is the set of fields, that needs to be
changed , so that PR goes to re-approval again. SS Proc is Self-service Purchase Req and Prf. Is Professional
Purchase Req.
“Activate Intelligent Approval of Purch Requisitions”: It uses the history data to provide the confidence rating so
that you can understand how many indepth checks you need to do to approve this PReq. Some Pres can be
approved without looking at them and the others require detailed verifications. To enable this config, you have to
connect to SAP Cloud platform system and purchase a separate app to enable this feature, then integrate with this
app.

2.2 PO
Exactly same thing is available for Purchase orders

There’re not so many options in the restart conditions, but you can implement BADI to include more fields
Also for the “Conditional Restart”, you’ll need to implement BADI using this config (go to F1 for Config item to
get the BADI name):

2.3 Fiori apps


Search “Manage Workflow”

Manage Workflow for Purchase Orders


With flexible WFs you may have multiple workflows running for different conditions in a sequence. But the very
last one must always be Auto Approval and it MUST be activated!!! This is important because the document
otherwise could get stuck in approval with no way out of it.
Whenever the condition has been met, the document will enter into the Workflow. All remaining workflows in the
lower levels will be IGNORED!!!
Decision1: Which Workflow need to be selected (see above). Example of conditions: Purch. Org = A and CC = B.
Decision2: How approval need to happen? How many approval steps/levels are required? Examples
Step1: <100 AUD >> Self-approval
Step2: 100 < ... < 1000 USD >> Approver 1
Step3: 1000 < ... < 100000 USD >> Approver 2
...
You can definitely create at least 10-15 steps. And in this decision tree, ALL steps will be checked
and approvers assigned! These steps can be complementary or trigger single-step approval. See
example below.
To enhance the condition sets, you must implement a BADI. With the basic settings, you can
nominate only basic approvers.
Multi-assignment is possible: E.g. either all 4 approvers must approve or only one out of 4.
If at any steps the document gets failed (rejected), then the WF will go on exception handling. For each
step exception rules can be defined, whether the document (1) must come out of the workflow or (2) can
go to the next step (3) must restart the WF.
Design is very simple. Even end users can set up this flexible WF.

3 Manage Workflow apps - DEMO


Manage Workflow – Purchase Orders
Create a new WF
3.1 Start Conditions
to enter into this WF: Different conditions for diff. WF types are available
See the OR / AND logics below

For our example we’ll set these 2 OR conditions


3.2 WF steps
WF steps must be defined before activation. After activation no changes are possible. To solve it, you’ll need to
copy it into a new version and deactivate the older version.
Let’s set 3 steps:
(1) Less than 1000 USD > Auto Approval

(2) 1000 < ... < 10,000

3.3 Approvers
“Agent Determination by BAdI” will be used most.
BADI: MMPUR_WORKFLOW_AGENTS_V2.
However, other options that require Org structure could be selected, if your HR Org structure is defined. At least a
part time HR consultant is required.

Another option would be the USER with User ID.

3.4 Step Conditions

3.5 Deadlines
to make the tasks overdue: in 6 hrs this step will be shown in My Inbox as OVERDUE step. However, as for now
this step will not be redirected to anybody else / other level
3.6 Exception handling

Final version of the steps


3.7 Save and Activate WF

3.8 WF Modifications
If you open the WF you created, you can find the WS reference. If more conditions must be added / agents etc,
then you can customize it in the same way as Standard ABAP Workflow (T code SWDS ...)
3.9 Additional Resources
https://help.sap.com/docs/SAP_S4HANA_CLOUD/0e602d466b99490187fcbb30d1dc897c/
f83f5260160d40a4ac1797e7d8b1eb5e.html
https://help.sap.com/docs/SAP_S4HANA_CLOUD/0e602d466b99490187fcbb30d1dc897c/
b563175740945b38e10000000a44147b.html
https://help.sap.com/viewer/af9ef57f504840d2b81be8667206d485/2020.002/en-US/
clacc9fa4c2041be952bb7c1c8f902ae.html

4 Create Purchase order


4.1 App “Manage Purchase Order”

You can see "Net Value”. Now let’s check Approval Details

Step1 was skipped. Step2 is ready for approval.


If you’d have net value > 10,000, then steps 1 and 2 would have been skipped.
This information became available in GUI since 1909 without errors. In S4H IQX I still see the wrong data here.

4.2 My Inbox

You can see header and item details and can easily navigate between items. When clicking on PO, you can also
navigate to PO.

Available buttons are:

 Approve,
 Reject,
 Show log (will display WF chart with steps),
 Claim/Release >> when multiple approvers are assigned. Then the guy can claim or reserve it for the
period, they’re working on this PO. Other approvers won’t be able to release this object while someone
else is working on it.
 Forward >> Forward. You’ll be able to forward to other recipients.
 Suspend >> Put on Hold. E.g. until 30th of February this task will disappear from “My Inbox” and then
reappear again after 30th.

For some reason, I cannot see the box for entering a “decision note” >> see below. Not sure, how I can submit a
rejection/approval comment to the requestor.
After implementation of this note, I was able to see the comment field: 3331780 - "Decision note" text field for a task action
is missing in My Inbox - SAP for Me

4.3 Withdraw from Approval


As mentioned at the beginning, PO cannot be changed while being in approval. In the app “Manage Purchase
orders”, you have the option to WITHDRAW FROM APPROVAL. See below

5 Email Notifications
Possible to send an email notification since 1909 and also configure notification templates.
Available Fiori apps are

5.1 Maintain Email Templates


Predefined templates are available. To use them we need to copy this template and put it to our scenario (based on
our scenario ID). We need to search for templates starting with MMPUR... for purchasing and starting with
SWF_CRT* / SWF_WORKFLOW* for WF approvals
For SWF_CRT*: YY1 is the scenario ID.
You will be able to get scenario IDs from SAP help link:
https://help.sap.com/docs/SAP_S4HANA_CLOUD/0e602d466b99490187fcbb30d1dc897c/
f83f5260160d40a4ac1797e7d8b1eb5e.html

Let’s select the template and copy it

Once it’s copied, we can modify it.


We can add a new language or add a URL link to “my inbox” app

You can add some more fields from WF to this template. Available fields are in “Show Data fields”
How will receive this email? This depends on the WF settings. Can be one or multiple persons. It’s important that
users are provided with correct email IDs. Also Basis team must check and configure email triggers.
Where’s the email should be maintained??
In S4H user ID is now linked with Business Partner. The recommendation is to maintain email address in
both places: SU01 and PA30 (info type 0105 – stype 010)
This email will be copied into t code BP. E.g. Infotype 0105 / Sty 0001 is a UserID.

Once this email is triggered, you’ll be able to see it in SOST or a fiori app “Display Email Transmissions”.

**Question1**
If you want to get more details into the template >> not from the WF, but from the transactional object >> then
you have to customize it and read the data from the WF container and create your own template (ABAP
developer).
**Question2**
Can approval be done directly throught the email? Not, only link to “My Inbox” is provided.

5.2 Display Email Transmissions (like SOST)

This app is deprecated in version 2023


5.3 Manage Workflow App
This is the app that consolidates all Fiori workflows. This is for Basis team, but still it gives you a good overview
of all the flexible workflows that exits.

5.4 Workflow administration


In this app you can do a details analysis of the Workflow, if required.

You can cancel, restart the workflow. You can forward the work item to another user.
Select work item and go to Work item Log. Here you can see all the steps associated with the WF.

E.g. “Forward Work item”

5.5 Workflows with Issues > T code SWI_HC_CLOUD


5.6 Restart suspended workflows
5.7 Workflow in Status Error > T code SWI_PR_CLOUD

You might also like