Skip to Content
0

Help! How to connect PHP with SAP Business One [SBO]

Mar 31, 2017 at 08:36 PM

48

avatar image
Former Member

Hello, I'm trying to connect php with SAP using the COM("SAPbobsCOM.company") but I just get an error -10 which I have searched in the web but I have not founded it, following, I leave my code:

<?php

echo "SAP SBO PHP TEST<br>";

$vCmp=new COM("SAPbobsCOM.company") or die ("No connection");

$vCmp->Server = "IPAddress:Port";

$vCmp->LicenseServer = "https://IPAddress:Port";

$vCmp->DbServerType = 9; //9 for dst_HANADB

$vCmp->DbUserName = "SYSTEM";

$vCmp->DbPassword = "*******";

$vCmp->CompanyDB = "DatabaseName"; //HANA DB used

$vCmp->Username = "Username";

$vCmp->Password = "*******";

$vCmp->Language = 3; //3 for English

$vCmp->UseTrusted = false;

$lRetCode = $vCmp->Connect;

if($lRetCode != 0){

echo "Error: ".$lRetCode;

}else{

echo "Connected successfully";

}

//I will be very grateful if you can help me to solve this problem

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers