<< Click to Display Table of Contents >> How to create a vendor in SAP from Bizagi via web services |
Overview
Integrating Bizagi with SAP is easily configured by means of Bizagi's built-in SAP connector.
To view an example of how to use this connector and invoke SAP BAPIs from any part of your process, refer to SAP connector example.
In cases where you wish to integrate your SAP system through web services instead of using this connector (direct RFC connection), you may do so by using Bizagi's Web services connector.
Through both approaches you will not need to do any programming, as both the SAP connector or the generic WS Connector provide full graphical mapping features to configure your inputs and outputs.
In this section we will describe how to integrate Bizagi with SAP through Web services, by relying on Bizagi's WS Connector.
Before you move on
It is strongly recommended to use Bizagi SAP connector instead of a web services-based integration due to these aspects:
1. The SAP connector features a powerful capability to configure error handling.
Through this option you may configure special routing and treatment for functional errors (SAP exceptions predefined at the BAPI).
2. The SAP connector authenticates directly with an authorized SAP user, instead of delegating security to your web service setup.
Often, security configuration for the web service setup requires more time to achieve correctly (i.e. the right security level, which is not too restrictive to cause issues nor too permissive to be prone to vulnerabilities), and such configuration does not provide the same maintainability advantages.
3. The SAP connector offers enhanced performance due to the RFC connection it uses, instead of going over HTTP/HTTPS.
Similarly, the direct RFC connection is commonly set through a more secure channel which can also rely on hardened measures (such as restricted ports).
Integrating through web services, instead of by means of the SAP Connector is useful when:
1.An RFC connection is not possible between your Bizagi and your SAP system.
2.You wish to implement this integration by having a broker-based architecture: by using a middleware serving as an integration hub (e.g an ESB) so that Bizagi and SAP connect by means of this broker.
The following image illustrates the above concept:
So before moving on, make sure you are using the integration method that is more appropriate to your needs.
Prerequisites
In order to accomplish this integration it is required to:
•Have the BAPIs in your SAP system that manage the master data in SAP, published as methods in a Web service (by using SAP's Netweaver options and utilities or the SAP XI/PI component).
If you are not familiar with publication of SAP functions in a Web service, we recommend you to browse SAP's online help to have a guide for this procedure according to your SAP version and installed components.
Further information about SAP Netweaver and its modules, can be found at SAP's documentation.
Example
In this example we will query first a vendor in SAP, and create it if it is a new vendor (master data).
We part from having the functions to query and create a vendor already published in a Web service (BAPIs), as described in the prerequisites.
The workflow model for this Process in Bizagi is as shown below:
The process outline creating the vendor is SAP is:
1. A user requests the inclusion of a vendor by inputting the vendor's name and code (in Bizagi, the vendor will be addressed as "provider" for this example).
2. Bizagi queries in SAP if the given vendor (by name and code) already exists.
3. If the vendor does not exist, the user inputs all the necessary information for a vendor's creation.
4. When the request is approved by an approving user, then Bizagi creates the vendor in SAP and shows the user the confirmation code.
What you need to do
We will use the WS Connector to integrate Bizagi with SAP in two different parts of the process:
1. Configuring the invocation in Bizagi to query a vendor
First, we configure the invocation of a BAPI which looks up a vendor at the modeled tasks in Bizagi called Verify provider in SAP.
2. Configuring the invocation in Bizagi to create a vendor
We repeat similar steps and this time use the WS Connector to configure the invocation of a BAPI which creates a new vendor at the modeled task in Bizagi called Create provider in SAP.
Steps
In detail, this is how we configure both invocations.
1. Configuring the invocation in Bizagi to query a vendor
To configure the Web service invocation in Bizagi through the interfaces wizard, go to the sixth step of our Process Wizard in Bizagi (Integrate) and select Define integration interfaces.
In our first integration point, we will configure the Verify Vendor in SAP Service Task to invoke the method which queries if a vendor exists in SAP.
By clicking on this service Task, Bizagi will launch its interfaces wizard that will guide the configuration in four steps.
First, select SOAP as the Service type, and input the web service's WSDL URL and click Go.
Select the corresponding method. Click Next.
Then, map the input parameters sent from Bizagi to SAP by dragging and dropping the code and name of the vendor into the expected parameters:
Click Next.
The mapping for the output parameters will allow the vendor's information to be updated and shown in Bizagi (if the queried vendor does exist):
In this window, map the incoming result to Bizagi and click Next.
For the last step, click Finish (we do not need to define specific error handling in this invocation).
Now we proceed to configure the second Web service invocation.
2. Configuring the invocation in Bizagi to create a vendor
To configure the Web service invocation in Bizagi through the interfaces wizard, we use again the sixth step of our Process Wizard in Bizagi (Integrate) and its option Define integration interfaces.
This time, choose the Create Vendor in SAP Service Task to configure the invocation of the method which creates a vendor in SAP.
Select SOA as the Service type, and input the web service's WSDL URL and click Go.
Select the corresponding method. Click Next.
Then, map the input parameters sent from Bizagi to SAP by dragging and dropping the code and name of the vendor into the expected parameters:
Click Next.
The mapping for the output parameters will update in Bizagi the confirmation response (and reference number for the created vendor).
In this window, map the incoming result to Bizagi and click Next.
For the last step, click Finish (we do not need to define specific error handling in this invocation).
At this point we have set our Bizagi-SAP integration for our vendor process, Provide Request.
In execution, Bizagi creates a vendor master data directly in SAP, and SAP will return the reference number for the created vendor.
This vendor can now looked for and worked in SAP.
Last Updated 2/8/2022 2:32:12 PM