Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Connecting PHP directly to SAP Business One

I want to connect PHP to SAP Business One 9.1 so that it can read and write data. I know how to connect PHP with SAP B1 database but it is not recommended i.e. why I want to connect PHP to SAP B1 however it won’t be a direct connection.

Below is my code, however it returns “0”.

Server="192.168.1.321";
$mycomp->LicenseServer = "192.168.1.321:30000";
$mycomp->DbUserName = "username";
$mycomp->DbPassword = "****";
$mycomp->UserName = "manager";
$mycomp->Password = "****";
?>


1 Answer
SAP Expert

I would suggest you using DI Server instead of DI API as DI API is more recommended for .NET platform however you are using PHP so it may run into compatibility issue.

Also 0 means you are connected successfully.

Note that DI Server (Data Interface Server) is a Component Object Model service running on a server which allow multiple clients to read and write SAP B1 database using SOAP messages.

SAP B1 DI Server allows you to develop SOAP based solutions that can be used to read, write, update, and remove data objects.

Below are the key differences about use of DI Server and DI API:

  • You can improve performance and scalability by implementing a connection pooling mechanism that can handle multiple client connections together.
  • Use of SOAP messages

For more details about use of SAP B1 DI server, you can refer this link:

SAP DOC

SAP Thread


Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.