cancel
Showing results for 
Search instead for 
Did you mean: 

Testing SAP RFC destination from Java

0 Kudos

Hello Experts,

I am building a java program which will fetch all the RFC destinations of type 'T' from the RFCDES table and then pings each of the destination using the function module RFC_PING. This is required to trigger my alert mechanism.

I am able to fetch the data from the RFCDES table and when invoking the RFC_PING, i do not find a way of providing the RFC destination to be checked. I can give the RFC destination when testing the function module as follows in the 'RFC target sys: " field.

How do I specify the field "RFC target sys:" when calling from Java ?

Thanks,
Ravi.

Accepted Solutions (0)

Answers (1)

Answers (1)

ronald_schertle
Explorer
0 Kudos

Hi Ravi,

Have a look into transaction code SM59 to find out which endpoint is being used by the value you provide in "RFC target sys".

In JCo you will have to call the execute function on a JCoFunction object, as shown in the examples provided in the JCo package. The execute method takes a destination object that includes the necessary information about the SAP server you want to use.

You can get a destination object by calling JCoDestinationManager.getDestination and passing a destination name. Please keep in mind to either provide *.jcoDestination property files including the connection properties as in the JCo examples, or register an own implementation of a destination provider beforehand.