The SAPB1 component can be used to perform operations on SAP Business One ERP solution. Using these four versions of components, operations can be performed on the corresponding version of SAP Business One. Currently SAPB1 component supports simple select, insert , update, upsert (update/insert) and delete operations for the following business objects.
- Business Partners
- Price Lists
- Credit notes
- Delivery notes
- Purchase Credit Notes
- Purchase Delivery Notes
- Purchase Invoice
- Purchase Orders
- Purchase Returns
- Delivery Notes Return
- Receipts Incoming Payments
- Journal Entries
- Payments to Vendors
- Stock Transfer
- Product Trees
- Production Order
- Chart of Accounts
- Inventory General Entry
- Inventory General Exit
- Down Payments
- Payments Draft
- Purchase Down Payments
- Sales Tax Invoice
- Purchase Tax Invoice
SAPB1 component requires credentials of company to be connected as part of the configuration. This details along with chosen business object type and operation are used to connect to the company and fetch the schema which is required to perform the operation.
Points to Note
- This component cannot be launched in-memory of the peer server.
- This component requires SAP Business One client environment installed on the machine where peer server is running.
- This component requires Microsoft .NET Framework 3.5 or above installed on the machine where peer server is running.
The component can be configured using the properties in the Custom Property Sheet (CPS) shown in figure.
Figure 1: Connection Configuration Panel
Use Connection Details from input: Select "yes" to use connection details provided in the input request message or "no" otherwise.
Server: Name of the machine where SAP Business One Company server is present.
Company DB: Name of the SAP Business One company database.
UserName: SAP Business One user login name.
Password: SAP Business One user password.
DB UserName: SAP Business One company database's user name required as part of SQL server authentication.
DB Password: SAP Business One company database's password required as part of SQL server authentication.
DB Server Type: Server type of SAP Business One company database.
Figure 2: DB Server Type drop-down box
License Server: Machine name of SAP Business One License server along with port number of sub license server (e.g. localhost:30000).
Language: Language of SAP Business One data.
Figure 3: Language drop-down box
- yes: To use windows authentication in SQL server.
- no: To use SQL server's own login credentials for authentication.
Select Object Type: Business object type on which the operation has to be performed.
Select Action: The operation which has to be performed on the selected business object type.
Figure 4: Action drop-down box
Error Handling Configuration
Figure 5: Error Handling Configuration Panel
Details of these configurations can be referred in Common Component Configurations section.
The schemas are automatically generated for the ports based on the configuration.
The input schema is auto generated based on operation, business object selected and the property "Use Connection Details from input" as shown below.
Figure 6: Input Schema for Select/Delete operation when Use Connection Details from input is set to "no".
Figure 7: Sample Input XML for Select/Delete operation when Use Connection Details from input is set to "no".
Figure 8: Input Schema for Select/Delete operation when Use Connection Details from input is set to "yes".
Figure 9: Sample Input XML for Select/Delete operation when Use Connection Details from input is set to "yes".
Figure 10: Input Schema for ADD/UPDATE/UPSERT operation of Price List when Use Connection Details from input is set to "yes".
Figure 11: Sample Input XML for ADD/UPDATE/UPSERT operation of Price List when Use Connection Details from input is set to "yes".
The output schema is auto generated based on operation, business object selected as shown below.
Figure 12: Output Schema for ADD/UPDATE/DELETE/UPSERT operation.
Figure 13: Output Schema for FETCH operation of Price List.
After SAPB1 component is configured, the connection to the SAP Business One company database can be tested using the Test Connection button.
Add a new Price List to SAP Business One company database and display the response.
Configure the SAPB1 component as described in Configuration section and use Feeder component configured with the schema fetched from the connected port of SAPB1 to send input request and use display component to check the response.
Figure 14: Demonstrating Scenario 1 with sample input and output
Returned response includes key of the newly added business object, type S (Success) or E (Error) according to whether operation is successful or not. If the operation fails, corresponding Message code and description is returned.