cancel
Showing results for 
Search instead for 
Did you mean: 

Error with JCO calls to PI

Former Member
0 Kudos

Hi gurus,

We have a problem with an scenary Java Program -> PI 7.0 -> SAP R3 4.6

Connection between systems are Java Program using JCO libraries to do RFC calls to PI. PI calls to R3 system are RFC and works fine.

When Java Program calls to PI system we get the following error:

Problem retrieving JCO.Function object: ZXXX_WBV_VALUE_CHECK

Function ZXXX_WBV_VALUE_CHECK has been imported in PI Repository and

configuration steps has been done in diretory. Configuration was tested

calling from a R3 system and works fine.

Sender RFC channel has been configurated with verifySender unchecked,

Program ID is set to LN_RFC_ADAPTER and RFC Metadata Repository

Parameters are correct.

mRepository.getFunctionTemplate(functionName) returns NULL in every

call.

This is a part of Java code

publicvoidrun() {

logger.info("RUN");

JCO.Client mConnection;

String][ p = {

{ "ashost", "IP host" },

{ "gwhost", "GW host" },

{ "sysnr", "00" },

{ "gwserv", "sapgw00" },

{ "tpname", "LN_RFC_ADAPTER" },

{ "user" , "USER" },

{ "passwd", "PASS"},

{ "client", "XXX"},

{ "lang", "EN"},

};

mConnection = JCO.createClient(p);

try{

mConnection.connect();

logger.info("Connection is Valid: " +

mConnection.isValid());

JCO.Repository mRepository = newJCO.Repository

("POOL", mConnection);

//Creating function template

String functionName = "ZXXX_WBV_VALUE_CHECK";

IFunctionTemplate

fTemplate = mRepository.getFunctionTemplate(functionName);

This is the Java Log.

27.05 11:12:27,838 INFO (JCOSample.java:56) - RUN

27.05 11:12:33,322 INFO (JCOSample.java:84) - Connection is Valid:

true

27.05 11:12:33,416 INFO (JCOSample.java:98) - Problem retrieving

JCO.Function object: ZXXX_WBV_VALUE_CHECK

27.05 11:12:33,432 INFO (JCOSample.java:24) - Finally

Any Idea?

Thank you for your attention.

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>JCO.Repository mRepository = newJCO.Repository

("POOL", mConnection);

but in your case PIt is not a repository for the RFC function - as the RFC does not exist on PI

you can call PI from jco but as for repository you should point to ERP

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi,

thank for your answer. Our problem is that Java program has only acess to PI not to ERP. Is possible doing calls to PI with JCO libraries without acess to an ERP? I though that RFC Metadata Repository parameters of the communication channel were to do it.

Reggards.

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

>>>Is possible doing calls to PI with JCO libraries without acess to an ERP?

I don't think so - as you need to know how this RFC looks like

>>>I though that RFC Metadata Repository parameters of the communication channel were to do it.

those are responsible to change RFC to XML-RFC in PI but not in the sender application...

solution:

the only way to do it without ERP would be to create an RFC (just the signature - without the code)

in PI as a customer modification (unless it's a Z/Y one) - this way it will work for sure

with PI as a repository

Regards,

Michal Krawczyk

Former Member
0 Kudos

Thanks for your explanation.

It will be send to my customer and they will take a decision.

Best regards.