Skip to Content
0

Login into Sap B1 with an external Program

Feb 20 at 07:35 AM

38

avatar image

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?

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

1 Answer

ANKIT CHAUHAN
Feb 20 at 08:38 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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?

0