Skip to Content
Author's profile photo Thorsten Nordholm Søbirk

Deconstructing SAP WAS: JCo RFC Provider under the hood


From my experience with XI, I had long known that the JCo RFC Provider service (which is configured using Visual Administrator) plays a major part in communications from the ABAP to the Java stack. As you can see below (taken from an XI system), in this service you can configure a number of RFC connections to the ABAP stack. More formally, the service registers a number of Program IDs in the WAS gateway. In the ABAP stack, you then define RFC destinations referencing the same Program IDs. The net effect of this is that when an RFC is executed in the ABAP stack with this destination, the call is transfered (via RFC and JCo) to the JCo RFC Provider service.

The AI_RUNTIME… entry in the JCo RFC Provider

The corresponding RFC destination in SM59

XI standard code which uses the destination when calling XI’s mapping runtime

Under the hood

So far, so good. But how does the JCo RFC Provider know which code to execute in the Java server? After all, there is no configuration to tell it for instance that when function SMPP_CALL_JAVA_RUNTIME3 is called, the request should be forwarded to a class called What happens is this:

The JCo RFC Provider looks at the function metadata and determines the name of the function being called. It then looks up this name in the Java Naming and Directory Interface (JNDI) and expects to find an session bean registered with this name under the rfcaccess context. The bean must implement the method:

void execute(JCO.Function function).

This method is called by the JCo RFC Provider, passing in the JCO.Function it received from the ABAP server.

The JNDI Registry entry for rfcaccessejb/SMPP_CALL_JAVA_RUNTIME3

In most cases it’s as simple as that. However, the service also maintains a map of function names to JNDI names so that a function may be named differently in ABAP and in JNDI. More on that in a later blog…

Assigned tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Daniel Simeonov
      Daniel Simeonov
      Hi Thorsten,
         The blog is very good. An interesting topic is also how to configure authentication from the R/3 system calling the J2EE server - by default the "Guest" user is logged on when the session bean is called.
      Best regards, Daniel.
      Author's profile photo Thorsten Nordholm Søbirk
      Thorsten Nordholm Søbirk
      Blog Post Author
      Thanks Daniel!

      Good point about authentication - I'll be sure to include that when I write my follow-on blog to fill in the final pieces.

      Best regards,

      Author's profile photo Former Member
      Former Member
      I've problems with this RFC, an is a way to understand what's going on behind the scene
      Author's profile photo Former Member
      Former Member
      That is really a great clarification.

      What happens when 20 requests are coming into IE at the same time and trying to use look up for some value using JCO?

      First 10 will get processed first,the next 10 requests have to wait for the connections to be avaialable or free?


      Author's profile photo Thorsten Nordholm Søbirk
      Thorsten Nordholm Søbirk
      Blog Post Author
      Hi Venkat,

      I must admit I don't know how the system handles a situation where no connections are available.

      - Thorsten