on 05-09-2006 1:38 PM
Hi
I'm trying to connect to a SAP server using the SAPLogon Control. I'm entirely new to SAP and .NET can anybody help me in this regard. If you have a sample code, it would be of tremendous help.
My applicatio should have embedded .NET scripts to update the SAP servers
Can anybody help me???
Hi,
Use this...
private Connection GetRFCConnection(string username, string password
, string language, string strSystem, string strSystemID, string client)
{
SAPLogonCtrl.SAPLogonControlClass log_c = new SAPLogonCtrl.SAPLogonControlClass();
log_c.Language = language;
log_c.Password = password;
log_c.User = username;
log_c.System = strSystemID;
log_c.Client = client;
object obj_conn = log_c.NewConnection();
SAPLogonCtrl.Connection conn = obj_conn as SAPLogonCtrl.Connection;
conn.Logon (null,true);
return conn;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.