Open arunksinfo opened 2 years ago
Hi - I've used the GenericServerHandler
quite a bit, but all calls have been synchronous. Looking at the RFC SDK doc, implementing a tRFC server is quite a bit more involved as you need to maintain state for executing transactions, etc... Are you able to change how you call the function in the SAP system and make the call synchronous?
Hello @tom-j-irvine,
Now, we are trying to InstallGenericServerHandler
, but the calls are not receiving at the Action delegates. Can you please provide some sample to use GenericServerHandler
?
Sorry, it is really clear what you need help with. Your originally handler code looks okay, though you need to provide two different sets of connection information. When calling InstallGenericServerFunctionHandler
, you are provide client connection information (App host, user, etc..) - this is to fetch function metadata, etc. Then, when creating the server, you are providing information for the gateway host, etc. It might work with all of that together in one set of connection info, but if you look at the readme, it is using two different sets of info.
Then, it would be assumed you have an RFC destination setup with the same Program ID. Then, when calling a function from SAP, you would do something like this:
CALL FUNCTION 'YOUR_FUNCTION_NAME'
DESTINATION 'YOUR_RFC_DEST'
...parameters, etc...
This function needs to be defined in the SAP system (this is where your server will get the metadata about the function).
Finally, you may need to look at the RFC Gateway security in your system (in SMGW) to make sure it allows outbound RFC calls to your program id/host, etc...
@tom-j-irvine ,
Whether is it possible to enhance the SapNwRfc
library to work for Asynchronous RFC (tRFC) ?
@ssamsundar - First, I am not one of the developers. To date, I have used the RFC server functionality of the library and helped a little bit with testing, etc. So, to the possibility of adding the functionality, I'll have to defer to the developers for their input. The only thing I can add is that the implementation of a tRFC server would be quite a bit more complex as it needs to maintain state of transactions (likely in some sort of database).
Hello,
We've used the GenericServerHandler to receive messages via RFC. Server Launch is able to establish the connection between service and SAP. When we try to send any data to service, it shows "No transaction handler is instanlled. Unable to process tRFC/qRFC request"
Can you please provide details on how to register generic handler listener.
Here's the code