cancel
Showing results for 
Search instead for 
Did you mean: 

Passing inputs not possible using JRA

Former Member
0 Kudos

I am running SP14.

I am unable pass input values to my remotely-callable function module using JRA. However, I can invoke a different RFM successfully and its retrieve exports--IF it doesn't require inputs. So it seems that only passing inputs is not possible.

I have tried passing a simple field, as well as passing a structure. Neither way works for me.

<u>1. Here is how I tried to pass a simple field:</u>

MappedRecord input =

recordFactory.createMappedRecord

("Z_GET_EMPLOYEE");

input.put("USERID", userid);

MappedRecord output = (MappedRecord) ix.execute(null, request);

The error I recieve on this is

<b>The RFM is invoked, but only a blank parameter is passed.</b>

<u>2. Here is how I tried to pass a field in a structure:</u>

MappedRecord request =

recordFactory.createMappedRecord

("Z_GET_EMPLOYEE");

MappedRecord importstruct =

(MappedRecord) request.get("RFCINPUT");

importstruct.put("USERID", userid);

MappedRecord output = (MappedRecord) ix.execute(null, request);

The error I recieve on this is

<b>Field RFCINPUT not a member of Z_GET_EMPLOYEE</b>

Any thoughts would be very much appreciated.

Kevin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Here is another piece of the puzzle.

I found some coding examples and tried a few more things.

Using the same JRA technique that I have been using,<b> I can run an existing sap-delivered rfm (STFC_STRUCTURE) successfully and pass in input parameters successfully</b> using its structure (IMPORTSTRUCT)!

However, I added IMPORTSTRUCT to my new RFM, and I get the same error as before.

Why can't I pass in parameters to my RFM?

Kevin

Former Member
0 Kudos

I have option 2 (passing in parameters via a structure) working now. The code example that I provided in the initial post works fine. I simply had to restart the J2EE engine in order for my application to "see" the new imports/exports of my remote function module.

I still can't get option 1 to work, however. So I'm using option 2.

Kevin

Former Member
0 Kudos

I have the same problem. I found that restarting JavaEE engine is not necessary. Just clear Metadata cache. Here is helpful post how to do it: http://scn.sap.com/community/business-one/system-administration/blog/2013/08/08/sap-netweaver-java-c...