Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ASP.Net and SAPbobsCOM newby


can some one help me with and SAPbobsCOM.

I need a example to conect to sap


Former Member
Former Member replied

hi gerd

iam new to sap b1 i tried your code to connect through its saying that you are not connected to company when i try to fetch data through businness object

i suspect the ByVal licenceServer As String which i provided might be wrong so can you help me by briefing what should i give over there

i also added the required references iam using vs2005

my code is as follows

testcompanyconnect.Company obj = new testcompanyconnect.Company();

obj.getCompany("", "test", SAPbobsCOM.BoDataServerTypes.dst_MSSQL, "sa", "sa",SAPbobsCOM.BoSuppLangs.ln_English, "manager", "manager", "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056", false);


SAPbobsCOM.Documents doc = (SAPbobsCOM.Documents)obj.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);

doc.DocNum = 1;


string STR = "C:

doc.SaveXML(ref STR);

in simple what should i give in the place of licenceServer parameter

Public Function getCompany(ByVal server As String, ByVal companyDB As String, ByVal serverType As SAPbobsCOM.BoDataServerTypes, _

ByVal dbUser As String, ByVal dbPasswd As String, ByVal companyLanguage As SAPbobsCOM.BoSuppLangs, _

ByVal userName As String, ByVal userPasswd As String, ByVal licenceServer As String, _

ByVal trusted As Boolean) As SAPbobsCOM.Company

Thanks in advance

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question