Learning Objectives:-
This unit describes:-
- How to create a business object SAP Business Partner in SAP Business One?
Introduction: #
In this tutorial, we will learn How to create a Business partner object in SAP Business one using Operation POST in SAP business one Adapter. To Send Data from Salesforce to SAP Business partner in the SAP business one application, we need to have SAP Business Partner Message Type and SAP Business one Adapter. We can process data manually and scheduler to know detail about How to run the outbound interface manually or scheduler please follow this link: https://docs.skyvva-dev.com/docs/tutorial-v2-41-lightning/129-how-to-run-the-outbound-interface-through-the-manually-or-scheduler/.
Pre-required: #
- Create Integration
- Create Connection destination on SAP Control Board.
- Generate SAP Business one Metadata by using Import SAP Metadata.
- Create Outbound Interface and Inbound Interface linked with Metadata SAP Business one.
- Create SAP Business one Adapter on SAP Control Board.
Step 1: Create Integration:
To know detail about Integration, please follow this tutorial. What is Integration, and How to use it?
- Here’s Integration
Step 2: Create Connection Destination SAP Control Board.
- Click SAP Control Board on Integration.
- Fill name choosing type SAP Business One and click Continue.
- Here’s an example.
- Fill Host URL, Port Forward, Username, Password, URL Path, and Company Database of SAP Business one Application.
- Click ping SAP Connection and Click Save Button.
- Here’s Example.
Step 3: Create Metadata SAP by using SAP Import Metadata.
- Go to Repository and click Import SAP Metadata
- Choosing Direct SAP Connection?
- select Connection Type,
- Select Connection Destination,
- Choose to Create Message Type to invoke SAP Business One API
- click Retrieve.
- Search Metadata Name Business Partner, choose a business partner, and click create Message Type.
After that, we will see the message type object Business Partner.
- Here’s the message type of business Partner.
Step 4: Create Outbound Interface, Inbound Interface, and linked with Message Type that we generated.
- Create Outbound Interface as a Request Interface and linked SAP BusinessParner message type.
- Here’s Request Interface.
- Do mapping and click save.
- Create Inbound Interface as Response Interface and linked SAP Business Partner message type.
- We are using operation Update to avoid creating a new record.
- Here’s Response Interface.
- Do mapping
Step 5: Linked Request and Response Interfaces.
- Linked Request Interface and Response Interface. We need to request Interface Detail and scroll down to see Inbound/Outbound set up.
- Put Response Interface in field Repone Interface by clicking the pencil and click the Save button.
- Here’s Example.
Step 6: Create SAP Business One adapter.
- Go to the SAP control board and click tap Adapter.
- Click New Button.
- Fill Name, Type: SAP Business one, Deployment: On Premise, Integration Framework: Service Layer, Protocol: Rest, Authentication: Basic, Past the API endpoint that we copy from Create Metadata in the properties API service Endpoint URL, Choosing Operation Post, Request and Response Format Json, and choose connection Destination.
- Here we have select the non in Salesforce Id Handling. It means in the response it will not return the salesforce Id back.
- Click ping connection to make sure that the configuration adapter is successful.
- click save
- Here’s Example.
If we select “Return Salesforce Id into the response” then the Salesforce Id will come in the Response interface.
• Go to Request Interface and Linked this adapter.
Here’s an example.
Step7: Callout Data by using Manual Process.
- Go to Interface, tap on SAP Control board, select Request Interface, and click Manual Process.
- Select Manually Select the subjects using the Query Builder and click Next.
- Click Execute SOQL, a select record that we want to send to SAP business one, and click OK.
- Click Send.
- Go to Message Monitor to see the result.
- Here’s the result In SAP Business one Application.
Summary #
Finally, we have learned how to create a record from salesforce to SAP Business One Application using operation POST in SAP Business one Adapter. In the next section, we will learn how to update Business Partner using Operation PATCH in SAP Business One Adapter.