Skip to Content
avatar image
Former Member

JCO - Anonymous RFC_PING with SAPJCO3

So, this question feels somewhat easy and complex at the same time, let me describe my scenario.

In my application, users can automatically discover SAP systems and in order to test the availability I'm using several methods, one of them is to perform a RFC_PING and possibly a RFC_SYSTEM_INFO. (verification methods are there for a reason, please do not suggest alternatives to this)

After some investigation in several forums, reading papers, etc, I found "JCO_LCHECK" that after you set that in 0, in theory you are saying that Logon check must not be performed, but unfortunately and to my surprise, I can say that is not what I'm experimenting.

My next step was looking inside the SAPJCO3 jar, I wanted to know how SAPJCO3 knows or verifies "JCO_LCHECK". I found that there is only one flag on class RfcOptions that if the property has the prefix "lcheck" sets the flag to true or false accordingly (as it is defined as a boolean) but still, after the execution JCO keeps saying that the provided username and password are not correct

Here are my properties

Properties connectProperties = new Properties();
        connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, this.getHostname());
        connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR, this.getInstanceNumber());
        connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, this.getClient());
        connectProperties.setProperty(DestinationDataProvider.JCO_LCHECK, "0");
        connectProperties.setProperty(DestinationDataProvider.JCO_USER, this.getUsername());
        connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, this.getPassword());
        connectProperties.setProperty(DestinationDataProvider.JCO_LANG, "en");
        connectProperties.setProperty(DestinationDataProvider.JCO_POOL_CAPACITY, "3");
        connectProperties.setProperty(DestinationDataProvider.JCO_PEAK_LIMIT,    "10");

and my username and password are ""

Did anyone saw this actually working? have you guys managed to make it work? I tried already to not provide the user and password properties or set them to null but none of those action prove useful

Thank you,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 23, 2017 at 03:49 AM

    Hello, J Polo, I got some information about your issue, By setting jco.client.lcheck = "0" can only support RFC_PING cannot support RFC_SYSTEM_INFO. So, Could you try to remove your RFC_SYSTEM_INFO invoke just test your RFC_PING to see whether it will work or not. thanks.

    jco.client.lcheck Enables or disables login check at the open time. 0: disable 1: enable

    If you set this to 0, RfcOpenConnection() opens a network connection but does not perform the login procedure. Therefore, no user session is created inside the back-end system. This parameter is intended only for executing the function module RFC_PING.

    You could get detail by referring to the link below.

    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01332.0153/doc/html/dst1255703078075.html

    Add comment
    10|10000 characters needed characters exceeded