01 Java Connector RFC Provider
01 Java Connector RFC Provider
Siddhartha Bhattacharya
JCO RFC Provider : Overview
Contents:
Contents
Features
SAP R/3
Program ID
The Program ID must be defined as a destination in SAP R/3 using transaction SM59.
When the Available RFC Destination is started it registers itself with the SAP R/3 system.
JCO RFC Provider : Program ID registration
SMGW Transaction
J2EE Program
registered.
If the program is successfully registered the connection can be viewed in transaction smgw
JCO RFC Provider : SAP R/3
SM59 Transaction
SAP R/3
Program ID
This destination can be used to invoke functions remotely from SAP R/3 function modules.
The RFC Destination name will be used by ABAP code to make remote calls.
JCO RFC Provider : SAP R/3
This destination can be used to invoke functions remotely from SAP R/3 function modules.
JCO RFC Provider : Topic Summary
Steps involved
1. On startup the JCo RFC Provider Service connects to
the Web AS repository.
2. On startup the JCo RFC Provider Service registers
itself at the Gateway with a defined name.
3. The Web AS calls a function for the registered RFC
destination.
4. The Gateway forwards the call to the JCo RFC
Provider Service.
Steps involved
5. The JCo RFC Provider Service looks in the JNDI for the
EJB, which is registered under the function name.
The name of the function must be identical with the
JNDI name of the bean, that is, it is necessary to have a
JNDI name.
6. The JCo RFC Provider Service calls the
processFunction(JCO.Function) method of the EJB
found.
7. The results of that call are passed to the Gateway.
8. The Gateway passes the results back to the Web AS.
Assume the Stateless Session Bean is already created. Import the project in
your workspace and add the following code in the ‘processFunction’ business
method
(String)importList.getValue("UNAME"));
function.setExportParameterList(export);
The JNDI Name of the stateless session bean should be the same as the
calling function module in SAP R/3. Switch to the j2ee-engine.xml tab and
make sure the JNDI name is defined correctly.
The JCO and Logging libraries should be included in the Project Build Path of
the EJB Project.
The JCO and Logging libraries should be included as a weak reference in the
EAR Project. Open application-j2ee-engine.xml file from the EAR project.
Switch to the General tab and add the com.sap.mw.jco and
com.sap.tc.Logging References.
This destination can be used to invoke functions remotely from SAP R/3 function modules.
JCO RFC Provider : Testing the program
This destination can be used to invoke functions remotely from SAP R/3 function modules.
JCO RFC Provider : Topic Summary