on 07-10-2006 1:32 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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...
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.