pull and update data to SAP business one using PHP

1.9k views Asked by At

I want to integrate my php system with SAP business one to pull and update data such as customers, accounts, payments,..

I came through this following link but not sure where to download the api: http://scn.sap.com/docs/DOC-7722?rid=/webcontent/uuid/df2bb865-0b01-0010-778f-cdf63a6c192a

I have also came through this (see correct answer) which suggests 3 ways of implementing this, but not sure how it works. http://scn.sap.com/thread/855060

I am totally new to SAP, so please help me with suggestions on the best way to achieve this. Note: I dont have access to an SAP instance at the moment. Just doing initial explorations and getting ideas on the ways to achieve this.

1

There are 1 answers

0
ooxi On

To access the DI API installer, take a look at yor SAP Business One server (containing MSSQL, the license manager and the System Landscape Directory Tomcap application). It should export a SMB share named B1_SHR containing the DI API installer (usually located at C:\Program Files (x86)\SAP\SAP Business One Server\B1_SHR).

With the DI API installed, just create an instance of 632F4591-AA62-4219-8FB6-22BCF5F60090 (DI API 9.0 & 9.1; use 632F4591-AA62-4219-8FB6-22BCF5F60088 for DI-API 8.8) and use dynamic COM invocation to set properties like Server on the Company object before calling Connect.

Nevertheless I would recommend against using the DI API: it's horrible slow, needs a local installation on a Windows machine and a nightmare to debug. Just add an MSSQL server user with read-only access to the relevant tables in your company database (OCRD for business partners, OACT for general ledger accounts, ORDR for sales order documents) and query directly from PHP.

As soon as you run into a problem with the DI API, your SAP Business One partner will tell you to use the database anyway.