Product Information
Features and Limitations – Flexible workflow For PR and PO in S4 HANA on premise
Background
With S4 HANA on premise version 1709 SAP has been bringing lots of innovations in Sourcing and procurement line of business. One of the most notable of them is Flexible workflow for Purchase requisition , Supplier invoice and Purchase order.
Note: This blog is created with S4 HANA On premise version 1709 FPS01 in mind, If SAP releases more features in further release then i will update this blog with more details.
Updated with additional Features in 1809 & 1909:
In 1809 SAP has introduced some new Features as well as some of the limitations of 1709 are addressed.In this blog you will see those updates with #1809update.
In 1909 SAP has introduced some new Features and some of the limitations of 1709/1809 are addressed. In this blog you will see those updates with #1909update.
What is it?
- Flexible workflow is a scenario based workflow which can have more than one start conditions
- Has a possibility of determining approvers through lot of different options
- Has an option to specify under which condition should the workflow step be triggered / applicable?
- It can be configured using a Fiori app and approval action can be taken from Fiori App
- Supports Fiori 2.0 push notifications
- Its an alternate to Release strategy
Features :
Flexible workflow scenario
You can create multiple flexible workflow scenarios for a procurement document instead of making one big complicated workflow
Pre conditions
For triggering workflow and for determining if a step in the workflow is applicable you can use these pre conditions
This is how conditions can be seen in SAP gui
Agent determination
For each workflow steps , you can specify how the approver determination should happen
You can also use fiori app “Manage Teams and Responsibilitie” – To configure your approver team Responsibility management
This is how agent determination configuration is seen in SAP Gui below
Parallel Approval
If you want parallel approval for any of the steps then you can do it using below option.
Exception handling
When the approver decides to reject a work item – you can define what should happen next
Supports push notifications
It supports push notifications which is Fiori 2.0 feature
Supports integration with Fiori My inbox
It supports integration with Fiori Myinbox app which is SAP’s suggested inbox for all the workflow actions in S4 HANA
Pre requisites:
- Define scenarios – Follow this link and link for defining scenarios in SPRO node SAP NetWeaver –> SAP Gateway Service Enablement –> Content –> Task Gateway –> Task Gateway Service –> Scenario Definition
- Scenario activation in SPRO node Sap Netweaver -> Application Server->Business Management->Sap Business Workflow->Flexible Workflow->Scenario Activation.
- Follow OSS note 2441740 and Fiori App library links in references for needed gateway services configuration
- Activate Flexible workflow at document type level – For Purchase Order
- Activate Flexible workflow at document type level – For Purchase requisition:
- Configure decision buttons for my inbox at path : SAP NetWeaver-> SAP Gateway Service Enablement-> Content-> Workflow Settings-> Maintain Task Names & Decision Options
- Activate Fiori 2.0 Notifications at task and workflow level in tcode : SWF_PUSH_NOTIF1
How to configure it?
Follow the blog Flexible Workflow for Purchase Order and PO to Invoicing Process in S/4HANA Cloud
Master link for all the sourcing & procurement flexible workflows – Flexible Workflow for the Approval of Documents in Sourcing and Procurement
Admin T code
SWF_PROCESS_ADMIN – To check if the flexible workflow scenario is active & to test the flexible workflow
What can be improved?
- Allow triggering of PR flexible workflow from SAP GUI transactions , currently for PR created from SAP GUI, Flexible workflow doesn’t get triggered
- Ability to add own custom conditions for approver level / start conditions. Currently we can chose only from limited fields provided in workflow expression for each template.
- Possibility to edit an existing active version of Flexible workflow, instead of creating a copy of workflow scenario everytime.
- Provide step details in BADI MMPUR_WORKFLOW_AGENTS_V2 as an importing parameter so that for each step’s agent determination a new badi implementation can be written
- Provide an approval preview in Flexible workflow tab in ME23n tcode / Fiori app to see with which approver is the document waiting for approval – something like shown below :-
- Provide a transport mechanism for Flexible workflow, currently it has to be recreated in each environment
- Provide a way to control the authorizations using flexible workflow like we have authorization objects M_BANF_FRG via the release code (FRGCD) for PR, M_EINK_FRG via the release group (FRGGR) and which release codes (FRGCO) for PO with release strategy.
- Ability for requestor to add Ad-Hoc approver in Flexible workflow
- Ability to edit the document during approval and re-triggering workflow
- Provide approval or rejection comments in the Header/ item text of the PR/PO document
- A consistent template between PO and PR flexible workflow template , same BADI , same agent determination criteria, same flexible workflow config at document type level
- Apart from Fiori Myinbox app, Provide a way to approve PR/PO from SAP Gui tcode
- Provide a way to configure email notification and allow customer to maintain their own email template and email subject
#1809 Update:
#5 – SAP has provided approval preview for purchase order in SAP GUI tcode ME23n
#13 – Email notification can be configured for flexiblwe workflow
#1909 Update
#1 – Adding Custom conditions are now possible , BADI – SWF_WORKFLOW_CONDITION_DEF & SWF_WORKFLOW_CONDITION_EVA
#2 – Flexible workflow also gets triggered when PR created from SAP GUI
#4 : BADI is updated with additional import parameters STEPINFO , PreviousApproverList & WORKFLOWSCENARIO ID
#5In Purchase Requisition created from SAP GUI , approval preview is now available.
#9 – Configuration is provided to influence retriggering of workflow for PR + a BADI
MM_PUR_S4_PR_WFL_RESTART, however such feature is not available for PO
References:
Master link for all the sourcing & procurement flexible workflows – Flexible Workflow for the Approval of Documents in Sourcing and Procurement
Manage Workflow for Purchase Requisitions Fiori App library
Manage Workflows for Purchase Orders Fiori App library
Flexible workflow for purchase requisition
Manage workflow for purchase requisition
Flexible workflow for purchase order and po to invoicing process in s4hana cloud
Responsibility Management in Flexible Workflow
How to Set up the Email Notification for the Sourcing & procurement Flexible Workflow
Create Custom flexible workflow – S/4HANA Flexible Workflows: Workflow Scenario Development and Configuration – 1
S/4HANA Flexible Workflows: Workflow Scenario Development and Configuration-2
Important SAP Notes:
2646400 – BADI – Workflow Agent determination MMPUR_WORKFLOW_AGENTS_V2
2775709 – Purchase Requisitions Workflow Restart using SSCUI and BADI
2767845 – How to define new Procurement Pre-conditions in Manage Workflow Apps
Using Manage Teams and Responsibilities for Procurement
Using Manage Teams and Responsibilities App
2570961 – Create an Employee in S4 HANA with HCM or without HCM
2570961 – Simplification item S4TWL – Business User Management
Stay tuned for more innovations in sourcing and procurement line of business in S4 HANA 1809 like procurement hub – central purchase requisitions, central purchase orders and central contract And many more.
Please leave your comments to help me improve the content of the blog.
Happy learning!!!!
Ashish Shah
very informative Article
Thank you for reading the blog.
very detailed and informative
Thank you for reading the blog.
Hi All,
I am on 1709 S/4 Hana (on premise), have a question can Manage workflow fiori app be used in below mentioned scenario:
Have a custom workflow can that be used for managing workflows from Fiori.
What are prerequisite for same on workflow end and Fiori end.As in Manage workflow we are able to see only standard workflows and not the custom created.
Thanks & Regards,
Ashwini
Hi Ashwini,
Yes ist possible to implement custom flexible workflow using manage workflow fiori app, i have tried it myself and it works well. However you Need to understand How Flexible workflow works!!!
Regards,
Ashish Shah
Hi Ashish,
thanks a lot for your acticle.
What is the current status/update regarding the newest release 1809?
Which points "What can be imporoved" are implemented/solved in 1809?
Thanks a lot and regards,
Benedikt
Hi Benedikt,
In 1809 None of the Features in "what can be improved" are implemented yet.
In fact i updated the blog with the other Features that i discoved that are also not still available in 1809.
Regards,
Ashish Shah
Thanks very useful blog
Hello Ashish Shah ,
Thanks for the nice blog .
In the section "What can be improved?" I have read this point .
So do you mean , through1809 version , SAP is giving provision for customers to have their own set of preconditions along with those that are provided by SAP? or Do you want SAP to improve these things in the next version...
Because I have a requirement to have custom start conditions . So if SAP is going to provide that functionality through 1809, we can take that upgrade . Please clarify
Hi Pawan,
So far in 1809 i have not been able to add custom conditions in PR or PO standard flexible workflow.
I had a similar requirement in 1809 and when i checked with SAP , i was told that adding a custom start condition in Standard PR / PO flexible workflow is not possible.
I decided to copy the Standard template of PO/PR flexible workflow and i could add custom conditions.
Regards,
Ashish Shah
Hello Ashish Shah ,
I am also having a similar requirement . Can you please guide me how and where did you do the changes in standard work flow(in a copied version) to consider other custom conditions as well?
Thanks a lot
Dear all,
due to the fact that advanced PR not run into the flexbile WF we activated the "classic" release strategy. Is there any option that the PRs created in FIORI App also run into the release strategy?
How can we handle advanced POs - can we manage this with flexible workflow? We have to use the advanced POs, because the App not allows to enter text information on header or item level.
Thank you.
Christian
Release: 1709
Hi All,
How should I understand Flexible workflow for PO and PR in relation to Release Strategy? Is Flexible workflow an alternative to release strategy? Can both be working same time in the system?
Best Regards,
Naeem Khan
Those are alternates. If both frameworks are active, it leads to a conflict.
At least in 1709 FPS2
thank you for great blog
but for Activate Flexible workflow at document type level – For Purchase Order
'scenario based column ' not appear in our system as shoot below!!
Thank you for this informative blog.
Just want to know that from where i can see preconditions in SAP GUI Screen. Can you please share a navigation or t-code
Thank You in advance.
You can see it with t-code SWDD.
Double click the navigation area and you will see it.
Hi Ashish Shah
thank you for the great blog.
It would be so great if you can point out the config was made on frond-end or back-end.
I am struggling for this issue. We have hub deployment implemented, it would be so good if you can point out at "define scenario" part should be done in front-end (Gateway service) or back-end.
Thank you in advance.
Hi Chin,
All the steps mentioned above are configured in backend system.
Regards,
Ashish Shah
Hi Ashish
how to see preconditions in sap gui ? spro track please.
Please use tcode SWDD_SCENARIO to see the pre conditions
Hi Ashish Shah
could you please let me know if Hi External Email Notifications onpromise 1809 and if its only valid for flex workflow
Regards
hi Ashish,
it is very useful information. Thank you very much.
Please let me know how many maximum approves can be assigned to the work flow. As I knew as for PR/PO release strategy we can configure maximum 8 release codes . But as for our business requirement some times it should trigger more than 8 approves. Is there any way to configure for more than 8 approves in release 1709 or 1809?
Thanks,
Ravikumar.
Hello,
As I understand, you can have as many steps in the workflow as you want.
Though you can have only 3 types of agents in standard PR Manager, managers manager, account object owner.
With badi implementation you could have more than that.
But PR PO release with more than 3 approvers, looks like a very heavy process ?♂️
Hi Ashish,
Very useful blog. I have one question over here.
I have configured one custom document type same as NB. My workflow is getting triggered. but My Approver name is not showing in the PO. Checked in SWIA tcode step histroy.
Getting info as Activity 'ReleasePO' skipped according to step condition 'PODocumentType'..
Can you please help me?
Thanks in advance
Hi Mehool,
Do we have to do any additional configuration step in order to trigger the workflow for the custom document type .. I'm getting the error "Workflow instance not defined". So i'm wondering if we have to define the workflow scenario id to the custom document type in the config
Thanks
Satya
One question, where do you get to see the conditions in SAP GUI? Additional comment on limitiations, regarding flexible workflow for contracts purchas organization is not available as a condition.
Another limitation in version 1809 is that in the pre conditions for the Total Net fields mounts larger than 2147483647 are not accepted, this might seem like enough but for currencies that has a large conversion rate is easy to have documents with bigger amounts.
That's a great article with excellent description.
Just wondering if anyone has updates on this from 1909 as well? Any more of the limitations removed in 1909? Any new features added in 1909? etc.
Would be great to get some info on this as well.
Thank You,
Mithun.
Hi Ashish,
Thank you for sharing nice blog on flexible workflow. However I have few queries:
Please suggest.
Thank You.
Abhishek
How the licensing works with flexible workflow? Any internet users allowed?
Hi Ashish,
Thank you for sharing the nice Blog on flexible workflow. I need some clarification on the same.
In 1809 release, we have a rejection notification to initiator in SAP FIORI is available only in case of PR case right ? is this functionality is also available in PO/SES case ?
Thank you in advance.
Hi Ashish,
First very thanks for this informative blog post on a topic for which we don’t have much information available over SCN. I would like to add one more point for the below section.
What can be improved?
Not sure whether this feature is already existing. Please share your thoughts on this.
Thanks,
Sijin
Hello Sijin,
you mean this is not managed by the SAP standard?
Then, what if you order your purchasing document?
You are authorized whereas an approver is missing for an approval level?
Workflow is stuck, is in error?
Regards.
Laurent.
What I have observed is, if in case Approver is missing or somehow we are not able to fetch an approver. Then in such cases we should write a 'RETURN' statement in the BADI code else it will give a dump.
The other questions you have asked is open with Ashish let him respond.
Hi Sijin,
As of now you have to write code in badi for fallback approver.
Regards,
Ashish Shah
Hi,
please update if the below limitation is improved in any of the releases
Hi Hubaib,
In 1909 pr Flexible Workflow also work for PR created from SAP gui.
Regards,
Ashish Shah
Hi Ashish Shah,
Thanks for the informative blog.
If we attach something in Fiory , this will not update back in SAP GUI same like the comment?
Where this Attachment get stored/saved and where can a requester check all the attachments of an Approver?
Regards,
NIKHIL JACOB
Hi Ashish, I got an opportunity to work on SAP HANA @ 2020. This blog helped me a lot to configure the Flexible controlled workflow for my client. I am getting following challenges, we are in 1909..
Were you able to figure out the status issue. After workflow completion the PR shows status 03 instead of 05. the workflow steps show the decision as RELEASED in the container but the PR isn't updated with status.
Hi Praseeda, Yes, this can be due to missing authorization for the WF user. Check in SUI1 transaction code on your particular PR document. Later assign ample authorization for SAP_WFRT user which will resolved your issue.
Kind Reagards,
Arun Kota.
Hi Indresh,
I have updated the blog with additional information about the approval BADi and its related OSS notes , i can already see previous approver list as a new parameter from 1809 version.
For missing approvers , suggestion is to configure fallback approver, this is a standard workflow practice and not specific to flexible workflow.
Regards,
Ashish Shah
Hi Friends,
is there a way to implement any USER-EXIT at BEFORE_CREATE WORKITEM as it is possible in classics workflows?
The Idea is to trigger the push-notification when a new decision workitem is created.
Thanks in advance and best regards,
E.
Hi Elton,
You should use standard push notifications options :
https://blogs.sap.com/2020/06/01/s-4-purchase-order-flexible-workflow-push-notifications/
https://blogs.sap.com/2020/06/08/s-4-flexible-workflow-abap-code-for-push-notifications/
https://help.sap.com/viewer/e3ab5c17f17e48a8b02372ab747f5358/2020.000/en-US/53b86779f07d44519d398d8155f6d513.html
Regards,
Ashish Shah
Hi Ashish
Very much Informative
I was facing the issue
configured the team and responsibility but still Roles not able to see it in manage workflow app
Regards
Simar Akmal
Hi Simar,
I am facing the same issue. Have you found a solution?
Redards,
Heorhii Litvinov
Hi Simar,
If you haven't found an answer to your questions then look at this link.
https://help.sap.com/viewer/8308e6d301d54584a33cd04a9861bc52/2020.000/en-US/73c04858392e9244e10000000a4450e5.html
Regards,
Ashish Shah
Hi Ashish,
How can the last approver for PR/PO cancel his decision in both cases approve/reject !!
Thanks in advance
Abbas
Hi Abbas,
All approvers can take approval decisions from Fiori Inbox.
Regards,
Ashish Shah
Hi Ashish,
you mean no chances for mistakes happen in approval decisions
Best regards
Abbas
Unfortunately, SAP assumes so.
If any approval decision is done, the PO status changes immediately. Only way would be to restart a new workflow for the same PO, so it goes the approvers again, for the decision.
But then, if some other processes would've triggered based on the PO status change, then can't really help it.
Hi Mithun,
Thanks for your support, in fact, I have another requirement to retrigger wf for rejected PR after editing and save required changes!!
Regards
Abbas
Hi Mustafa,
Configuration is provided to influence retriggering of workflow for PR using BADI MM_PUR_S4_PR_WFL_RESTART
Regards,
Ashish Shah
Hi Ashish,
We have implemented the following BADIs to add start conditions for triggering PO flexible workflow.
1) SWF_WORKFLOW_CONDITION_DEF
2) SWF_WORKFLOW_CONDITION_EVAL.
Inside the method of SWF_WORKFLOW_CONDITION_EVAL-EVALUATE_CONDITION - We are not getting the PO number which is supposed to be part of importing parameter (is_sap_object_node_type-sont_key_part_1).
Please suggest.
Hi Utkarsh,
Did you check this OSS note? This will give you a hint
2767845 – How to define new Procurement Pre-conditions in Manage Workflow Apps
2841783 - How to define new Pre-condition in Manage Workflow for Purchase orders
Regards,
Ashish SHah
Hi Ashish,
Thank You for the blog, very good information. I have below questions to everyone, please help if you anyone has any clue: (we are in 1809 version):
Thanks in advance and looking forward for updates.
Bhargav
Hi Bhargava,
As these questions are not really related to the Flexible workflow, I'd suggest posting them under the Q & A's, instead of blog comments.
Cheers,
Mithun.
Great work on keeping up with the issues and the updates. I will look forward to the 2020 changes.
Great work , really helpful ,
I have a question , Is there a simple (admin) way to approve PR's in the background (similar to ME54N)? Fiori app ? ,
Hi ,
Thanks , so far i havent seen any such standard app to approve the flexible workflow PR in background.
Regards,
Ashish Shah
Great article.
In 2020 in the InBox for PR approval no info for the PR item is shown. No chance to see content of the PR and cannot change anything.
Any idea what's missing in configuration?
Thanks.
BR Klaus
Hi Klaus,
Apologies for late response , if you havent solved it already, you are missing configuration -
Mandatory: Define visualization metadata for My Inbox
You can navigate to the config from below link
Flexible Workflow for the Approval of Documents in Sourcing and Procurement
Regards,
Ashish Shah
Hi Ashish,
Recently we are comparing the behavior of the flexible workflow in SAP Fiori and SAP GUI.
When a PR is created from SAP GUI, it triggers the workflow but we have not been able to approve it fom SAP GUI, the only way to approve it is from SAP FIORI.
Are there any configurations where it is possible to approve from SAP GUI?
Thanks in advance.
Best Regards,
Ana Cecilia Reyes
Hi,
We are implementing on premise 2021 and I have a question regarding the approvers. We are not implementing HR and I was wondering if it is possible to use the Fiori requisition approval app without having an HR mini master record and employee with info type 105/0001?
My idea is to have a custom table with approval chains (the client basically has one approval chain per department about 75). We would then use the BADI to determine the agent from the table which will store user IDs. I am trying to get away from having to setup the org structure and the employee records if possible.
Thanks
Dennis
I have the exact same scenario too. Ashish Shah pls advise
Ashish Shah Very good information! Thanks. Just a question
FWF Can be activated for GL Posting, W/O Purchase order?