cancel
Showing results for 
Search instead for 
Did you mean: 

How to use RFC in 7.10?

Former Member
0 Kudos

Hi,

I'm a little bit confused by the help on NW 7.10 SP7. I normally use RFC connections from web Dynpro but this time I have to use RFC from an EJB. As before I tried "SAP Enterprise Connector" which seems to be depricated.

I followed the example how to use Destination Service. It imports "cam.sap.mw.jco.JCO". After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?

Is the destination service itself also depricated?

So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?

What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?

Maybe someone can bring some light in all this

Thx,

Frank

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Frank

>After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?

Not exactly. The deprecation means that the JCo API version is 2.X while JCo 3.0 is already available. However, this does not mean that you cannot use the "com.sap.mw.jco.JCO". I know lots of projects running even on 7.11 and 7.20 that still use the JCo 2.X.

>Is the destination service itself also depricated?

No, no, no.

>So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?

Java Resource Adapter is just a new JEE container for JCo API. Still it's also has some problems. So I'd not recommend you to use it.

>What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?

Use JCo 2.X + Destination Service. Ignore the API deprecation.

BR, Siarhei

Former Member
0 Kudos

Hi,

I found out that its very easy to use JCo 3 with destination service:


jcoDest = JCoDestinationManager.getDestination("rfcDestination");

where "rfcDestination" is a destination configured in NWA

So I will use plain JCo 3 (back to basics) for my RFC as Enterprise Connector is not working any longer and adaptive RFC seems to be 7.11 only...

The JCo 3 tutorial I found in the [SAP NetWeaver Mobile 7.1|http://help.sap.com/saphelp_nwmobile71/helpdata/de/46/fb807cc7b46c30e10000000a1553f7/frameset.htm](?) help, but from what I tested so far its working in 7.10 CE.

Frank

Answers (0)