ERP Integrator V2 - Online Help
ERP Integrator V2
Questions / Feedback?

SendReply Method

Used to respond to a remote function call received from the sap server.

Syntax

[VB.NET]
Public Sub SendReply()
[C#]
public void SendReply();

Remarks

When the SAP system calls your installed function, the FunctionCall event will fire with the name of the function being called. To process this function call, the first thing you must do is retrieve the ReceiveParams. Using UpdateReceiveParams. After you execute whatever work your function does, you can return data to the SAP system using SendReply. Add all the ReplyParams you wish to send back to the SAP system, and update the tables if necessary. Then call SendReply. This all must happen inside of the FunctionCall event. For instance:

First, set up the connection, install the function, and begin listening for calls from the SAP system.

  SapServer1.AcceptConnections("Hello.App", "localhost", "sapgw00");
  SapServer1.InstallFunction("Z_HELLO", "Simple greeting app.");
  SapServer1.Listening = true;
Then, implement the function you installed inside the FunctionCall event.
void SapServer1_OnFunctionCall(object sender, SapserverFuncionCallEventArgs e) {
  if (e.FunctionName.Equals("Z_HELLO")) {
    SapServer1.ReceiveParams.Add(new nsoftware.InERP.SapParam("FIRSTNAME", "",ptCharacters));
    SapServer1.ReceiveParams.Add(new nsoftware.InERP.SapParam("LASTNAME", "", ptCharacters));
    SapServer1.UpdateReceiveParams();
        
    String greeting = "Hello " + SapServer1.ReceiveParams.ElementAt(0).Value + " " +
                       SapServer1.ReceiveParams.ElementAt(1).Value + ", I hope that you are well.";
    SapServer1.ReplyParams.Add(new nsoftware.InERP.SapParam("GREETING", greeting, ptCharacters));
    SapServer1.SendReply();
  }
}

Note: This method can only be used inside the FunctionCall event.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 2.0.6240.0