[SAP PROCESS AUTOMATION] – CONNECT BUSINESS PROCESSES WITH EXTERNAL SYSTEM

Hi guys, in this article I want to share a scenario end to end How to connect business processes with external system like SAP S/4 HANA on-premise, S/4 HANA public cloud by using action feature in SAP Process Automation.

You can use mode on-premise OR public cloud, it’s the same configuration.

In this article, I do not have account product for S/4 HANA public cloud so I will do this by using model ON-PREMISE.

PREREQUISITES

  • SAP BTP trial account
  • S/4HANA system where Sales Order business module is available – active service API_SALES_ORDER_SRV
  •  Communication user to access S/4HANA Sales Order inbound services – account on S/4 HANA

SETUP ENVIRONMENT

STEP 1 ACTIVE SERVICE API_SALES_ORDER_SRV

Step 1.1 To active service API-SALES_ORDER_SRV in backend S/4 HANA on-premise, do the following

  • Login S/4 HANA
  • Go to T-CODE SEGW
  • Open Project API_SALES ORDER
  • Register service
  • Test by SAP Gateway Client

Step 1.2 Test service create sale order by POSTMAN

Next, we will create sale order.

Open POSTMAN and create new REQUEST

Endpointhttps://<host s4hana>:44300/sap/opu/odata/SAP/API_SALES_ORDER_SRV/A_SalesOrder?sap-client=<sap-client>
MethodGET – to get CSRF TOKEN
MethodPOST – to create new sale order
Content-Typeapplication/json
Body{
    “OrganizationDivision”:”string”,
    “DistributionChannel”:”string”,
    “SoldToParty”:”string”,
    “SalesOrderType”:”string”,
    “PurchaseOrderByCustomer”:”string”,
    “SalesOrganization”:”string”
}
AuthenticationBasic Authentiation – username/password backend S/4 HANA
STEP 2 CONFIGURATION SAP CLOUD CONNECTOR

Next we have to configure SAP Cloud connector connect to service of S/4 HANA.

You can reference here to configure SAP Cloud Connector

STEP 3 CREATE DESTINATION ON SAP BTP CONNECT TO ON-PREMISE
TypeHTTP
URLHTTP://<virtual-host-cloud-connector>:<virtual-port>/sap/opu/odata/SAP/API_SALES_ORDER_SRV/A_SalesOrder?sap-client=<sap-client>
Proxy TypeOnPremise
AuthenticationBasicAuthentication
Location IDLocation ID of SAP Cloud Connector
UserUser backend – S/4 HANA
PassPassword of user backend – S/4 HANA
Destination configuration

sap.applicationdevelopment.actions.enabledtrue
sap.processautomation.enabledtrue
Additional properties

Check destination on SAP Process Automation

Create Action Project in Lobby

STEP 1 Download open API specification
STEP 2 CREATE AND CONFIGURATION ACTION PROJECT IN SAP PROCESS AUTOMATION
  • Go to SAP Process Automation
  • Go to tab Lobby
  • Create
  • Build an automatic processe
  • Choose Actions
  • Browse to API Specification
  • Go to project and choose request type is method POST by usung filter
  • Add actions
  • Next, we will choose fields input and output. Because boy for this API just a few field so another field we will remove. Base on your S/4 HANA on-premise we will have default value differently
OrganizationDivision10
DistributionChannel10
SoldToParty3000000
SalesOrderTypeZFOB
PurchaseOrderByCustomer0272346
SalesOrganization1010
  • Choose field for output
CreatedByUser
CreationDate
DistributionChannel
OrganizationDivision
PurchaseOrderByCustomer
RequestedDeliveryDate
SalesOrder
SalesOrderDate
SalesOrderType
SalesOrganization
SoldToParty
TotalNetAmount
  • Enable X-CSRF
  • TEST
  • Save & Release & Publish to Library

DOWNLOAD TEMPLATE BUSINNESS PROCESS AND ADD ACTION INTO BUSSINESS PROCESS

STEP 1 DOWNLOAD TEMPLATE BUSSINESS PROCESS
STEP 2 ADD ACTION AND CONFIGURATION BUSINESS PROCESS
  • Open Business Process
  • Add action from library into business process
  • Create destination for action
  • Configuration Input for action

Next we have to binding data from business process trigger form into input data of action.

  • Review output data of action
  • Release and deploy business process

Next, we have to release and deploy business process, when deploy we have to choose destination which configured in SAP BTP

RUN BUSINESS PROCESS

STEP 1 RUN SALES ORDER APPROVAL BUSINESS PROCESS

STEP 2 MONITOR SALES ORDER APPROVAL PROCESS
  • Go to monitor and search process
  • Go to inbox and approve

SUMMARY

In this article, I shared one end to end scenario How to create sale order on S/4 HANA Onpremise from trigger form approval in SAP Process Automation. Thanks for your reading and any advise kindly leave your comment on this.

Thanks.

Joseph.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.