cancel
Showing results for 
Search instead for 
Did you mean: 

JCO.Server Error while trying to execute a RFC program from SAP

Former Member
0 Kudos

Hi,

We are connecting to an external registered server program from SAP via Web Methods.

The external server program is registered with the SAP Gateway. We have created a TCP/IP RFC destination and are able to connect to the destination successfully via SM59.

An RFC function is created in SAP and is called using the syntax CALL FUNCTION "/NGN/BAPI_STRE_SEARCH_PROCESS" DESTINATION 'PRDB2B'. We have also handled the COMM_FALIURE and SYSTEM_FALIURE exceptions in the function call.

We are monitoring the gateway via SMGW and see a connection log to the RFC destination as below

Number - 10

LUname - dev01

TPName - sapgw00

User - KRAORANE

Status - CONNECTED

Symbolic - PRDB2B

Conversation - 86520353

Prot - REG

SAP return code - 0

CPIC rtn code - 0

The external program returns results as expected.

However sometimes the RFC fails and returns the message “JCO.Server could not create server function /NGN/BAPI_STRE_SEARCH_PROCESS”.

We are not able to figure what exactly is causing this error. Any help will be highly appreciated.

-Kiran

Accepted Solutions (1)

Accepted Solutions (1)

athavanraja
Active Contributor
0 Kudos

check out these threads

Regards

Raja

Former Member
0 Kudos

Hey,

I have already gone through these threads. Not of much help.

Kiran

former_member191062
Active Contributor
0 Kudos

Hello,

are you seure you only have one Registered Server program witht the given program ID. I have seen cases when there were two Servers registered with the same program ID, but the given function was only available on one of them. When the call "had luck" the call worked, when not than it cased create function error. Please make sure this.

The easiest way: shut down your known server, and test the RFC destination from Tr. SM59. It may not work.

Regards,

Dezso

Former Member
0 Kudos

Hey Dezso,

How do I check if there are two servers registered with the same program ID, but the given function is only available on one of them.

This is what I see in transaction RSGWLST

Gateway host name - Service - Server host name - Program ID

dev01 - sapgw00 - dev02 - PRDB2B

dev01 - sapgw00 - gdns33284 - PRDB2B

dev01.fomsa.ngn.net - sapgw00 - dev02 - PRDB2B

dev01.fomsa.ngn.net - sapgw00 - gdns33284 - PRDB2B

dev01.fomsa.ngn.net is the SAP server and dev02 is the webmethodsserver.

-Kiran

former_member191062
Active Contributor
0 Kudos

Hi,

the easiest way to check as I described above:

Shut down your external Server Program. And test the RFC connection from SM59. It should not work. If it works you have more than one program listening on that id.

Regards,

Dezso

Former Member
0 Kudos

Hi,

The RFC connection is a TCP/IP connection and its activation type is set to the external server program ID.

The external server program ID is a listener on the Webmethods (middleware) server.

Are you asking me to shutdown the listener and then test the RFC connection? If yes I think the RFC connection would definitely fail.

-Kiran

former_member191062
Active Contributor
0 Kudos

Hi Kiran,

yes exactly that is what we want to see. It has to fail. If it does not fails, it means you have an other program with the same program id.

If I am not mistaken the webmethods server has a file:

error.log in the server/logs directory. Can you please copy a part of it into here?

Regards,

Dezso

Former Member
0 Kudos

Hey Dezso,

The RFC connection is successful even after the listener is stopped in webmethods.

What do I do next?

I asked the webmethods guy for the log file. He informed me that there is no error.log file in webmethods. The only log available in webmethods is when SAP call reaches webmethods or fails in webmethods.

In our case webmethods does not have any log entry.

Kiran

former_member191062
Active Contributor
0 Kudos

Hello,

this seems exactly like I expected. You have an other program registred with the same program ID. You need to look after this. It may be a test / development instance of your webmethods server, but it also maybe something else. Maybe you can ask some of your administrators, wether they know that what they have configured.

Alternative solution: You choose a different program ID for your webmethods server, and you try to create a new separate RFC destionation for it.

Regards,

Dezso

Former Member
0 Kudos

Hey,

We have already implemented the alternate solution. Thanks for your help. We will investigate more in to the mulitple programs issue with the basis team.

-Kiran

Answers (0)