cancel
Showing results for 
Search instead for 
Did you mean: 

SAPIDocReceiver class

Former Member
0 Kudos

Hi,

I am using the SAPIDocReceiver class and I am trying to set the SAPIDocReceiver, and the SAPGatewayService. I am unable to do it.

What I have done is given below:

SAPIDocReceiver objSAPIDocReceiver=new SAPIDocReceiver();

objSAPIDocReceiver.ProgramID="Service1";

objSAPIDocReceiver.SAPGatewayHost="development";

objSAPIDocReceiver.SAPGatewayService="SAPGW00";

Can someone tell me how i can set the Gateway Host and the Gateway receiver?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

The properties SAPGatewayHost and SAPGatewayService are read-only. However, you can use the other overloaded constructors to create the object and pass the required parameters to the constructor:

string parameters = "-aService1 -gdevelopment -xsapgw00";

SAPIDocReceiver objSAPIDocReceiver =

new SAPIDocReceiver(parameters);

Hope it helps,

Guangwei

Former Member
0 Kudos

Dear all,

I'm trying to receive IDocs from my .NET application, but I'm not having success. This is the code I'm using:

stringConexion = "-aService1 -gdevelopment -xsapgw00"

sapiDocReceiver2 = New SAP.Connector.SAPIDocReceiver(stringConexion)

Here I have the following doubts:

-What is the ProgramID (identified by -aService1 in the connection string)?

What is the GateWayHost (identified by -aDevelopment in the connection string)? Is it my sap server (so I have to put either the IP address or the server name)?

The thing is that I'm not having any error when executing the code, but I'm no receiving any result. Could yo please show me an example of how to receive an IDoc? and How to process it in order to show it in my .NET application?

Best regards

JC

Former Member
0 Kudos

gatewayhost is the computer name or host name of you SAP server

GatewayService is the 'SAPGWXX' XX is the system number, you can find it in your SAP GUI login tools. click 'change item'.