Getting Started With SAP Business One SQL


First published on: 11/09/2023/5:05 pm

 

Overview

 

SAP Business One SQL Version 10 up until FP2011 was not supplied with Service Layer, SAP Business Ones native REST API. In order for the Saltbox to communicate with SAP Business in this scenario, a webservice component known as B1WebAPI. This is an IIS Website hosted on a webserver that sits along side the main SAP Business One SQL Server and is used to connect over https from Saltbox to the Webservice which in turn translates the request being sent to a DI-API call and a result CRUD update in SAP Business One.

 

This Guide explains how to install B1WebAPI and then how to configure your Connection Configuration in Saltbox to connect too it.

 

Saltbox B1WebAPI Installation

Introduction

Vision33 has developed the Saltbox product to extend workflow and integration capabilities for SAP B1. This document explains the various environmental dependencies which are needed to be fulfilled before setting up Saltbox in a client on premises environment.

Terminology

  1. AppServer B1WebAPI is installed on this server.
  2. SAP B1 Servers – SAP B1 server
  3. Database server – HANA or SQL Database Server
  4. Saltbox – This is iPaaS (integration Platform as a Service) developed by Vision33

 

Software Prerequisites

Both 32bit and 64 bit DI-API Versions need to be installed on the AppServer where B1 Web API is to be setup on.

If the B1 System is deployed on HANA, a SQL Server needs to be available for B1WebAPI to hold its licensing information, this can be a locally installed version of SQL Express. If the customers B1 Deployment is SQL, the same SQL Server can used to hold this information

 

 

SAP B1 User licenses

  1. B1 Indirect User license (required all the time to run B1WebAPI)

The SAP B1 user with b1 indirect user license is required to setup B1WebAPI on an AppServer. This is a mandatory requirement and needed for the project to move ahead

Internal AppServer to SAP B1 Server Port/Firewall Requirements

Depending upon the SAP B1 version, certain ports must be opened on SAP B1 servers to allow access from the AppServer. Here is a list of ports which must be opened from AppServer to SAP B1 Servers.

*The below rules are INBOUND firewall rules and should be completed on the windows firewall of the SAP B1 Servers and Database server. If there are any questions, please reach out to your Vision33 Consultant.

If you are running SAP 9.X:

If you are running SAP 10.x

 

If you are using SQL as your Database

 

If you are using HANA as your Database

 

External Ports Whitelisting/ Port Forwarding

Saltbox IP Whitelisting / Port forwarding

To use Saltbox (iPaaS) platform, there is a requirement to open port 443/tcp to the AppServer that is hosting the B1WebApi. In some cases, 443/tcp may not be available so we can use 4033/tcp.

When opening the port we require whitelisting the saltbox server IP. The IP you need to whitelist :

You will need to open an INBOUND rule on the windows firewall on the AppServer to allow access for the IP and port above.

You will need to open an INBOUND Port forward firewall rule on your corporate firewall to allow access for the IP and Port above to the AppServer.

SSL Certificates and DNS Record Entry

Saltbox integration will require a trusted 3rd party SSL Certificate (self-signed are not allowed) to be installed on the AppServer and a DNS entry.

  1. AppServer

With the AppServer running on-prem, there is a requirement for a Trusted SSL certificate to be applied/installed on the AppServer

As a recommendation, we suggest you create the following certificate name: B1webapi.yourcompanysdomainname.com

*If you need help with this please advise your Vision33 consultant.

 

  1. External DNS Entry

An external DNS entry will be required for your certificate name. This entry would point to the public IP of the firewall in which you are completing the whitelisting and port forwarding in the steps above listed in the section called “External Ports whitelisting / Forwarding”

 

Vision33 is here to help with any questions you may have. So please reach out to your Vision33 project manager if you need assistance with any of the items and they will arrange a call with the appropriate team members.

Installation instructions

  1. Run the B1WebAPI installer on the SAP Business One server.

  2. 2. Step through the installer welcome screen, and prerequisites as shown below.

 

B1WebAPI welcome screen. Press Next to continue.

 

 

B1WebAPI Prerequisites screen. Press Next to continue.

 

B1WebAPI Prerequisites screen. Press Next to continue.

  1. Select the desired components. For a typical install, all components should be enabled.

 

 

 

B1WebAPI Choose Components. Select the desired components and press Next to continue.

  1. Choose install location. This is the location where B1WebAPI web files will reside.

 

Warning: Do not change the default directory for the first installation of B1WebAPI. Additional installations are rare, and may be installed in alternate locations after an initial installation has been completed.

 

 

B1WebAPI Install Location can be selected. Press Install to complete the installation.

  1. If the option to Configure B1WebAPI was selected, the following configuration screen will be displayed. This step may be skipped, in which case, InterConnect Server Tools may be used later to configure these settings.

To configure B1WebAPI settings, fill in the connection details shown below. For a detailed description of each field, see Technical Reference: InterConnect Server Tools - B1Config.

 

Ensure to configure the Attachments Directory for any Portal installation to ensure full Portal functionality.

 

 

 

 

B1WebAPI connection configuration screen. Edit connection details for one or more SAP Business One companies. Press Save when complete.

  1. If the option to Configure IIS Website was selected, the following configuration screen will be displayed. Enter all details as described below. For a typical install, press okay. For additional installs, ensure “Name” and “Port” are unique, then press okay.

 

 

IIS website configuration screen can be used instead of manually setting up the website within IIS. Press OK when the IIS website is set up.

  1. Complete the installation of B1WebAPI.

 

Complete the B1WebAPI installation by pressing Finish.

  1. At this point, the B1WebAPI is installed.

 

Post installation settings

 

 

In IIS, find the Application Pool associated with the website, go to advanced settings and change the settings below to values in the screenshot.

 

 

 

 

 

Identity: Should be Network Service (low priority) Helps in capturing log files. This is done for consistency

 

Maximum Worker Process: Set this to 2 (Critical) as we cache the connection details this needs to recycle to free memory. If this goes in recycle as the calls are invoked it can crash the app pool, THIS SHOULD NEVER BE SET TO 1!!!

 

 

Private Memory Limit: Set this to 500000 (Critical) as part of the cleanup process IIS will recycle once it reaches its threshold. With the additional worker process this should keep the application running smoothly.

This should continue to be monitored to see the usage of the Worker Processes (Task Manager) and increase if required. 500000 is the baseline we use.

 

 

Installation Instructions – Interconnect Server Tools

 

  1. Run the InterConnect Server Tools installer on the SAP Business One server.
  2. Step through the installer welcome screen as shown below.

 

InterConnect Server Tools welcome screen. Press Next to continue.

  1. Select the previously installed B1WebAPI location. This will allow InterConnect Server Tools to access profile information associated with the B1WebAPI.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Choose B1WebAPI location. Select the B1WebAPI already installed and press Next to continue. Choose B1WebAPI location. Select the B1WebAPI already installed and press Next to continue.Choose B1WebAPI location. Select the B1WebAPI already installed and press Next to continue.

  1. Choose install location. This is the location where InterConnect Server Tools application files will reside.

 

  1. Complete the installation of InterConnect Server Tools:

Complete InterConnect Server Tools installation by pressing Finish.

Complete InterConnect Server Tools installation by pressing Finish.

  1. At this point, InterConnect Server Tools is installed and a license may be requested.

 

 

 

 

Applying Licenses

  1. Start Server Tools in Admin mode on the server where B1WebAPI was installed (typically the SAP Business One server).

Using Windows Start menu, go to Start > All Programs > zedIT Solutions > B1WebAPI > InterConnect Server Tools. Right-click on the menu option and select run as Administrator…


 

  1. Open the license window by pressing the licenses button (marker 1 below).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

using the Licenses button (1).

  1. A notice will be displayed if no licenses are applied, which will be the case for new installations. If this notice is not displayed, that means a license has been applied to at least one product.

Press OK to proceed.

 

 

 

 

  1. Press the Create License Request button (marker 1 below) if licenses have not yet been applied or if the existing licenses must be updated. Available licenses will be displayed on the License Administration screen. See Requesting a Portal License for more detail.

 

Press the Create License Request button (1) to open the license request form.

  1. Fill in the contact information and press the generate button (marker 1 below) to create and save a license request file.

e.

 

Fill in the details and press the Generate button (1) to create a license request file.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


 

 Pick a folder to save the license

 

 

 

 

                                                                                     

  When the license file is saved, press OK to continue.

 

 

 

 

 

 

 

 

 

 

 

 

 

.

  1. Send the license request file to Support (support@vision33.com) and include the following details:

 Products to be licensed.

 Version to be licensed.

Support will endeavor to create a license within one business day.

 

 

Send an email to support with the license file, products and version.

  1. Unzip, then install the license file provided by Support. This file will typically be the same as your server name. Press the Import License File button and select the license file sent by support.

Warning: Installing a license will remove all previously assigned application licenses. Named user licenses will be maintained but application licenses will need to be re-applied. This may trigger metadata updates, which will force B1 users to log out and log back in.

 

Import (1) the license file provided by support.

Import (1) the license file provided by support.

Select the file (1) and press the Open button (2).

Select the file (1) and press the Open button (2).

  1. Assign the desired licenses to each company using the Used check-box.

Warning: Hana metadata installation can take much longer than SQL. Due to the in-memory nature of Hana databases, metadata can take several minutes to install for each Portal, even up to an hour or so.

 

Allow the system to proceed even if it looks like it's "not responding". For new installs, you can check on the progress in Hana Administration Console by selecting a count of the UDT tables from CUFD.

 

 

 

 

Select the profile (marker 1 below), then assign application licenses (marker 2

below). If prompted, confirm metadata installation prompts to install version-specific metadata.

Note that metadata installation will force all B1 users to log out and log back in, so ensure this is scheduled ahead of time to avoid B1 disruptions.

 

 

Select the profile (1) and enable product licenses (2).

Once the Application license is installed, a user may be configured in B1, then assigned licenses in the named user license section.

 

Shown here, Employee Portal, Customer Portal and Customer Portal Order Pad are licensed for version 91.4 with installed meta-data.

Shown here, Employee Portal, Customer Portal and Customer Portal Order Pad are licensed for version 91.4 with installed meta-data.

NB For B1WebAPI Only, “Interconnext – 1 Company” should be ticked for the relevant databases required for licensing.

 

Trouble Shooting

 

 

Issue: Attachments not working

 

 

Troubleshooting steps:

Verify the setup of the Server Tools is done correctly

  1. Attachment Directory for B1 (and has appropriate permissions)
  2. Temp Folder
    1. Ensure Network Service has “write” permissions to this folder
  3. Ensure the B1 Server (where attachment directory is located) and the server hosting the B1WebAPI are located on the same domain or has the ability to write to the B1 Server.

 

 

 

Issue: SqlServerSpatial110.dll -- The specified module could not be found seen in log files

 

Overview

Users receive the following error when using innovations software

The type initializer for 'ExtentPlaceholderCreator' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'SqlServerSpatial110.dll': The specified module could not be found.

 

Resolution

If a user encounters the issue must modify the <app>.config file.

<app> à refers to the executable name of the application.

 

Add the following to the end of the file, just before the closing configuration element “</configuration>”

 

<runtime>

  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

    <dependentAssembly>

       <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" />

       <bindingRedirect oldVersion="1.0.0.0-11.0.0.0" newVersion="10.0.0.0" />

    </dependentAssembly>

  </assemblyBinding>

</runtime>

 

Issue: B1WebAPI returning -105 - Unable to initialize OBServerDLL.dll

Note research online points to incorrect settings for the license server values in the DI API connection

Solution: This error was generated by a permission issue.

During the installation the B1WebAPI application pool uses the NetworkService Identity


In this case there appears to have been a conflict between the domain controller and the local machine. To work around this issue, we set the identity field to "LocalService" and this allowed the application to work properly.

 

 

Issue: Exception GetCompany():-4009 - Failed to connect SLD, make sure SLD server is correct and available

 

This error indicates a B1/Network/Environment Issue. Historically the following resolve issues like this

 

 

 

 

 

 

Saltbox Connection Configuration Setup

 

In Saltbox, Go to the connectors page, find the SAP Business One SQL (B1WebAPI) Connector and install the latest version

 

Go to Project Settings, scroll down to Connection Configurations and Choose the + to add a new connection

 

 

 

The connection should use the SAP Business One SQL (B1WebAPI) Connector, Enter a connection name and a connection description, The the IP Address or DNS Name to your B1WebAPI Service and the port it is configured on. finally the company name, username and password as configured in your B1WebAPI profile (Note this is not the SAP details, but the details as entered in B1WebAPI Company profile).

 

 

 

 

 

 

 

 

Previous

Next


  

Last modified: 03/25/2025/12:48 pm