Skip to main content
Skip table of contents

SAPB1

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
  • Orders
  • Items
  • Price Lists
  • Credit notes
  • Delivery notes
  • Invoices
  • Purchase Credit Notes
  • Purchase Delivery Notes
  • Purchase Invoice
  • Purchase Orders
  • Purchase Returns
  • Quotations
  • 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
  • Draft
  • 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.

Configuration

The component can be configured using the properties in the Custom Property Sheet (CPS) shown in figure.

Connection Configuration


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.

Component has to be configured with any server details to connect even when "Use Connection Details from input" is set to "yes" to populate the schema on input/output ports. But during run-time, connection details provided in the input message only will be used. 


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

Use Trusted:

  • 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.

Schema Generation

The schemas are automatically generated for the ports based on the configuration.

Request Schema

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".

Response Schema

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. 

Testing

After SAPB1 component is configured, the connection to the SAP Business One company database can be tested using the Test Connection button.

Functional Demonstration

Scenario

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

Sample Input

XML
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Input xmlns:ns1="http://www.fiorano.com/SAPB1">
   <ConnectionSettings>
      <Server>192.168.1.206</Server>
      <CompanyDB>SBOdemoIN</CompanyDB>
      <UserName>manager</UserName>
      <Password>manager</Password>
      <DBUserName>sa</DBUserName>
      <DBPassword>fiorano</DBPassword>
      <DBServerType>4</DBServerType>
      <LicenseServer>192.168.1.206:30000</LicenseServer>
      <Language>3</Language>
      <UseTrusted>no</UseTrusted>
   </ConnectionSettings>
   <ObjectSchema>
      <BOM>
         <BO>
            <AdmInfo>
               <Object>6</Object>
            </AdmInfo>
            <OPLN>
               <row>
                  <ListName>MARGIN Price</ListName>
                  <BASE_NUM>1</BASE_NUM>
                  <Factor>1.000000</Factor>
                  <RoundSys>0</RoundSys>
                  <GroupCode>1</GroupCode>
               </row>
            </OPLN>
         </BO>
      </BOM>
   </ObjectSchema>
</ns1:Input>

Sample Output

XML
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Return xmlns:ns1="http://www.fiorano.com/SAPB1">
   <Key>9</Key>
   <Type>S</Type>
   <MessageCode />
   <Description />
</ns1:Return>

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.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.