cancel
Showing results for 
Search instead for 
Did you mean: 

Login into Sap B1 with an external Program

0 Kudos

Hello,

I am currently working on a Program in C# that is supposed automatically login into SAP and do a few tasks in it and then logout and close it at the end. My Problem is that I don’t know how to do the login into the client. I know how to connect to the UI client but I don’t know how to go from there. Is there a way to do it without the user having to login himself?

Accepted Solutions (0)

Answers (1)

Answers (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Alexander Rusner,

It depends on the task which you want to perform. You can use DI API for this too.

Here is an sample to make a DI API company connection:

oCompany = new SAPbobsCOM.Company();
oCompany.Server = @"mo-dac04f24a.mo.sap.corp,63833";
oCompany.DbServerType = SAPbobsCOM.BoDataServerTypes.dst_MSSQL2008;
oCompany.CompanyDB = "263408";
oCompany.UserName = "manager";
oCompany.Password = "manager";
oCompany.LicenseServer = "mo-5722ce411.mo.sap.corp:30000";
int A = oCompany.Connect();

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0 Kudos

Thank you for the reply,
but my problem is that I need to use the UI because we are using Coresuite and I want to automate an Import function. Because of that there are no Di API functions I can use. So I am asking if it is possible to login into the sap Client, as I already explained I know how to connect to the activated SAP client but I don’t know how to login after that. So is there a way to do that and if so how do I do that?