Skip to Content

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

ASP.Net and SAPbobsCOM newby

Hi

can some one help me with

asp.net and SAPbobsCOM.

I need a example to conect to sap

benito

replied

hi gerd

iam new to sap b1 i tried your code to connect through asp.net 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("192.168.3.119", "test", SAPbobsCOM.BoDataServerTypes.dst_MSSQL, "sa", "sa",SAPbobsCOM.BoSuppLangs.ln_English, "manager", "manager", "0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056", false);

Response.Write("cONNECTED");

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

doc.DocNum = 1;

doc.GetByKey(1);

string STR = "C:
ASD.XML";

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