cancel
Showing results for 
Search instead for 
Did you mean: 

Windows service & SAP connectivity.

Former Member
0 Kudos

I created a Windows service and i have specified the RFC destination parameters in the constructor as given below-

string parameters = "-aService1 -gintdev -xSAPGW00";

SAPIDocReceiver objS=new SAPIDocReceiver(parameters);

When i test the connection from sm59 it gives the below message

program Service1 not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY.

I kindly request you to give me inputs.

Regards,

Thiru

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I checked the parameters, it seems to be correct.

I have created the service with the code below.

namespace Service1

{

public class Service1 : System.ServiceProcess.ServiceBase

{

private System.Diagnostics.EventLog eventLog1;

/// <summary>

/// Required designer variable.

/// </summary>

private System.ComponentModel.Container components = null;

public Service1()

{

// This call is required by the Windows.Forms Component Designer.

InitializeComponent();

if(!System.Diagnostics.EventLog.SourceExists("TestingWindowsService","chn-is133"))

System.Diagnostics.EventLog.CreateEventSource("TestingWindowsService","chn-is133");

eventLog1.Source="TestingWindowsService";

eventLog1.Log="chn-is133";

string parameters = "-aService1 -gintdev -xSAPGW00";

SAPIDocReceiver objS=new SAPIDocReceiver(parameters);

SAPServerHost objServer=new SAPServerHost();

objServer.Start();

}

Apart from that I have have given SAPFunctionsOCX and SAPConnector reference.

It still gives me the same error.

program Service1 not registered / CPI-C error CM_ALLOCATE_FAILURE_RETRY.

Regards,

Thiru

Former Member
0 Kudos

Hello

Please first make sure that the fields "Program ID", "Gateway-Host" and "Gateway Service" in SM59 are set to "Service1", "intdev" and "sapgw00" respectively.

You can use SMGW->GoTo->Logged on Clients to check if the IDOCServer is properly connected.

Regards,

Guangwei