SAP Business One Troubleshooting (Magic xpi 4.6)

« Go Back


Created ByKnowledge Migration User
Approval Process StatusPublished

SAP Business One Troubleshooting (Magic xpi 4.6)


Why can't I connect to SAP Business One?


If you have problems connecting to SAP Business One from Magic xpi, verify that there is a connection to SAP Business One through the DI/API (for example, using VB).

SAPB1 2004 and 2005 are not supported on the Windows 2008 operating system. Therefore, if you try to work with one of these SAPB1 versions, you will not be able to create a connection to SAP Business One.


Why am I getting the "SAPB1 Error: Connection to the License Server Failed" error?


This error comes from SAP Business One and it means that while trying to create a connection to SAP Business One there was a problem connecting to the SAPB1 license server.

This problem can be caused by the following:

  • Wrong connection details: Magic xpi uses the XML interface of the DI to connect to SAP Business One. Therefore, check that there is a connection to SAP Business One using an external tool, such as VB.

  • The SAP License Server is down or there is a network problem – Look for network problems if the License Server is on a remote machine, and check whether the License Server is up and running.

  • When Magic xpi is installed on the same machine as the SAPB1 and the SAPB1 connections are referencing localhost, other users logging in on terminal services will have a problem logging in to the SAPB1 client. The reason is that whenever an SAPB1 connector is accessed in the project, the LSRV field in the SLIC table in SBO-COMMON is updated with localhost instead of the IP address of the server. Consequently, a terminal server user will not be able to log in. The solution is to replace the reference to localhost with the IP of the server.

  • You have reached the number of concurrent users allowed by your license – Magic xpi uses the compatibility license to connect to SAP Business One. Therefore, check that it is not an SAPB1 license issue (too many users are connected).
    Note: Magic xpi opens the connection when you first try to connect to a new company and then reuses the connection (Magic xpi gets a reference to the SAPB1 company object and reuses it).

If everything checked out and you are still getting this error, we suggest contacting SAP Business One.


What are the mandatory parameters?


If you do not know what the mandatory parameters are when you add an object, you should add the object from the SAP Business One client (mandatory fields only). You should then query the object from Magic xpi to see the parameters and their value in the XML.


Why is my Stored Procedure cleared?


When you upgrade the SAP Business One version that is installed on your machine, the Stored Procedure is cleared, and you should create it again. If the trigger does not work, verify that the Stored Procedure exists.


Why can't I add and update objects?


If you have problems when you add or update an object, you can check that the XML that was passed to SAP Business One by looking in the <Magic xpi installation>\Runtime\Temp folder, or in the UserXML. This enables you to identify where the problem is. However, this is relevant only when you are using the XML interface of the connector.


How can I overcome the "Connection to the requested SAP Business One Company database could not be established. Internal error (10): Failed to load object: SAPbobsCOM.Company" error?


This error occurs when a DI API is not installed on the machine. Magic xpi communicates with SAP through the DI API. You should therefore ensure that the DI API is installed on the server where Magic xpi is installed.


Why is Magic xpi crashing when a SAPB1 step runs?


This problem occurs when the wrong DI version is used. To make sure you are using the relevant DI version, you should enter the correct value in the SAPB1 resource's DI API Version parameter.


When SAPB1 is installed on my machine, the Magic xpi Studio fails to open. Why?


Set the jvm_path in the magic.ini file and restart the Magic xpi Studio. This should solve the problem.


When updating Itemprices with the SAPB1 connector, why am I getting the "This entry already exists in the following table (ODBC -2035)" error?


This problem happens when you update an object with multiple rows in SAP; it will try to update the first one. You are getting a primary key constraint in the update because you are trying to update other rows over row 1. This is how the DI of SAP works.

There are a few ways to go about fixing this. The easiest way is to update all of the rows when you want to update any of them. This is done by reading the whole item and prices lists, and then updating it with a condition to insert your new data on a matching row.

Alternately, you can build a special XML to only update one row at a time. This is done by sending empty brackets (<row/>) until the item you want to update, which would tell the DI to skip those lines.


When executing a SAP B1 step, why am I getting the following error: "Error 1006: Internal error (3): failed to call method: GetBusinessObjectFromXML[0] (Illegal XML)"?


The error indicates that you are trying to map values to fields that are read-only, values that are not allowed or values that do not meet the format or picture of the field. To solve this issue, try the following:

  1. In the step's configuration, click the Refresh XSD button, map the fields and check the problem again.

  2. Check if any user-defined fields are defined as read-only or if they have any write property set.

  3. The XML that Magic xpi sends to SAP can be found in the C.UserXML variable. Fetch that XML and check if it is valid.

  4. To check the XML, you can add a Save Message step right after the problematic SAPB1 step and specify the C.UserXML variable in a Blob parameter.

  5. If the problem is with one of the mandatory fields or invalid values, the best way to find the cause for this error is to narrow it down as follows: First enter a new object for the client and do a query on that object in order to see what the fields must be mapped. After that you can try to add new fields one by one until you find the one that causes the problem.

Related Topics