cancel
Showing results for 
Search instead for 
Did you mean: 

JCO.Server could not find server function ....

Former Member
0 Kudos

Hi!

I created an EJB with Biz Method processFunction and deployed it successfully to a Portal J2EE Engine 7.00 SP18.

I can see it in the NWA with JNDI Name RandstadDerUrlGeneration

I also created SM59 TCP/IP connection and a "sister" in JCo RFC Provider.

So access from ABAP to J2EE in general seems to work.

But when I try to call function RandstadDerUrlGeneration from ABAP Report I always get the Error

JCO.Server could not find server function 'RandstadDerUrlGeneration'.

This error cvan also be seen indefaultTrace.trc of J2EE Engine.

Sample ABAP report code:

&----


*& Report /RAND/CA_PORTAL_RFC

*&

&----


*&

*&

&----


report /RAND/CA_PORTAL_RFC line-size 132 no standard page heading.

parameters: P_RFCDES like RFCDES-RFCDEST default 'SALV_WD_EXPORT_PDF'.

parameters: P_QUEST type /RAND/CA_URLEXT default 'This is my question for Portal'.

parameters: P_RFCNAM type /RAND/CA_URLEXT default 'RandstadDerUrlGeneration'.

data: L_ANSWER type STRING.

start-of-selection.

skip 5.

write:/ '***** Start of program', SY-CPROG,

/ '***** Try to call EJB:', P_RFCNAM(30), ' via RFC Destination:', P_RFCDES(20).

uline.

skip 2.

call function P_RFCNAM

destination P_RFCDES

exporting

QUESTION = P_QUEST

importing

ANSWER = L_ANSWER

  • Do not handle exceptions to see what has really happened ...

  • exceptions

  • SYSTEM_FAILURE = 1

  • COMMUNICATION_FAILURE = 2

  • others = 3

.

if SY-SUBRC <> 0.

write:/ 'Error during RFC Call. RC=', SY-SUBRC. ", SY-MSGID, SY-MSGNO, SY-MSGTY, SY-MSGV1, SY-MSGV2, SY-MSGV3, SY-MSGV4.

else.

write:/ 'The answer from EJB is: ', L_ANSWER.

endif.

skip 2.

uline.

write:/ '***** End of program', SY-CPROG.

Any ideas what's going wrong here?

Thanx for any hints in advance!

Regards,

Volker

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Question answered by myself. If just changed the JNDI name of EJB to upper-case like Z_ANYTHING_YOU_LIKE and created a like-named empty RFC-enabled function module in ABAP stack - et voila: it worked!!!!

Unfortunately this is obviously UNDOCUMENTED in help.sap.com!

Regards,

Volker