Skip to Content
Technical Articles
Author's profile photo Anjan Paul

Implementation of Workflow in SAP Cloud Platform with back-end as S/4Hana On-premise leveraging Odata, Gateway, Cloud Connector, API management and SCP Workflow Service

In this blog we will see, how can we implement  Workflow in SAP Cloud Platform with back-end as S/4 Hana On Premise leveraging On-premise Gateway, Cloud connector and  SAP API management   – Real time scenario.

 

In  a Hybrid cloud scenario, private data are stored in On-premise system. This is most popular architecture now-a-days for SAP cloud implementation.

 

 

Flow-

In this blog we are taking one of the most used scenario in Work Order management in ISU operation.

The below is the operation flow.

  1. Work Order will create in OnPremise System.
  2. It will Approved or Reject in SAP Cloud Platform using My Inbox Fiori APP.
  3. If Approved Work Order will automatically  released.

 

Tool and Services  used-

  1. SAP Odata on Hana On-premise System
  2. SAP Gateway on Hana On-premise System
  3. Cloud Connector to connect Hana On-premise with SAP Cloud Platform
  4. SAP API Management on SAP Cloud Platform
  5. SAP Workflow on SAP Cloud Platform
  6. SAP Fiori on SAP Cloud Platform

 

Architecture-

 

 

Development :

 

  1. Create a Gateway service in OnPremise system and activated it.

 

 

2. In SAP Cloud Platform Cloud Connector integrated .

 

3.  Create an API with Odata of On-premise .

 

 

 

4.  Now create a Workflow in SCP.

 

 

 

For  GetWorkOrder  consume the API with GET  operation.

 

For   WorkOrderRelease assign the user for taking decision.

 

 

For UpdateWorkOrder  use the API with Put operation.

 

 

Please NoteIn this scenario we take help of API Management to create micro-service. But without API we can also directly consume Odata service using Odata Provisioning in SCP.  But using a API there are lots of advantage of micro-services.

 

Operation-

  1. Create a Work Order in On-Premise System.

 

 

2. Now the work Order  have only CRTD Status , not have REL status.

 

 

3. Now in SAP Cloud Platform, we can see a New workflow instance for Work Order Release workflow running.

 

 

 

4. In the Fiori My  Inbox  app on SAP cloud Platform, user got item to take action : Approve or Reject.

 

5.  After Approval, workflow got completed.

 

6.   Work Order in On-Premises system changed to   REL status .

 

 

 

  Your requirement   fulfilled.

 

 

Summary:  Though it is quiet complex  development architecture, but its have lots of flexibility, Error handling tool, Policies for thread protection, cyber attack of API   are added advantage.

 

Have a great day.

 

Assigned Tags

      9 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Tripurari Rai
      Tripurari Rai

      Good end to end process explanation Anjan : )

      Thanks for sharing great content as you do always.

      Author's profile photo Archana Shukla
      Archana Shukla

      Hello Anjan,
      Nice blog. Just one question: you could have directly consumed the OData service in workflow. Any reasons for exposing it as an API? Anjan Paul

      Author's profile photo Anjan Paul
      Anjan Paul
      Blog Post Author

      Thanks Archana .

       

      You are right. I already mentioned in the blog about Odata Service direct  consume.   But it is  showed here about another way of implementing workflow using API.  API is beneficial in some cases than direct odata consume like Quota policies , transformation policies, securities policies which are needed very much at the time of cross system connection with cloud.

      Author's profile photo Lucas Frattini Lopez
      Lucas Frattini Lopez

      Hi Anjan,

       

      Excellent blog, I have a question: What event does the workflow start? I see that the "GetWorkOrder" task does a Get to the API, but which event triggers that Get? I can not understand how to start the workflow.

      Thank you for sharing,

       

      Regards

      Author's profile photo Anjan Paul
      Anjan Paul
      Blog Post Author

      Hi Lucas,

      To  call workflow please use SAP cloud workflow API.

       

      Thanks

      Author's profile photo Pavan Kumar
      Pavan Kumar

      Hi Anjan,

       

      Can you please share the snippet how you triggered Workflow instance from S4. Is it in Exit of Transaction Save or wherever it is.

      Not sure how to call the workflow API, Post Method of Workflow instance (V1/workflow-instance). It would be helpful if you could share it.

       

      Regards
      Pavan Kumar

      Author's profile photo Archana Shukla
      Archana Shukla

      Hello Pavan,

      Your answer is probably in this blog (see the last section)
      https://blogs.sap.com/2018/12/04/hunting-zombies-the-scp-way/

      Regards,
      Archana

      Author's profile photo Sai Santhosh
      Sai Santhosh

      Hello Anjan Paul,

      In my development, i need to have valueHelp inside workflow HTML5 can it possible. Data will be consumed from S4 onPremise system.

      Regards,

      Sai Santhosh

      Author's profile photo Rutuja Pangavhane
      Rutuja Pangavhane

      Hi Anjan,

      Can you please let me know how is your detail page with action buttons in MY INBOX coming? Are you using Workflow Forms or an HTML5 app to get the data from S/4 HANA?

       

      Thanks & Regards,

      Rutuja.