cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Curr type and Jco Table as Jco import parameter

former_member625844
Participant
0 Kudos

I have a RFC named ZFMM05 with two import parameters PRHEAD and PRITEM and a export parameter O_NUM. PRHEAD is a structure with a field PRVALUE of CURR type. PRITEM is table type.

I use below code to call the JCoFunction.

 function=destination.getRepository().getFunction("ZFMM05");
if (function==null) throw new RuntimeException("STFC_CONNECTION not found"); 
JCoStructure PRhead = function.getImportParameterList().getStructure("PRHEAD");
PRhead.setValue("PRVALUE",500);
JCoTable PRItem=function.getImportParameterList().getTable("PRITEM");
PRItem.appendRow();
PRItem.setValue("MATNR", "S0010010");
function.execute(destination);
result=function.getExportParameterList().getString("O_NUM");
System.out.println("Result is"+result);

There is no error but the result is empty. Is this because the way I use CURR and table parameter is wrong? Can someone give me some suggestion? Thx.

Sandra_Rossi
Active Contributor
0 Kudos

Another possibility is that your JCO is correct but ZFMM05 returns the value 0. Did you test directly ZFMM05 at ABAP side with these values?

Did you debug ZFMM05 to make sure what values are received from JCo?

Accepted Solutions (0)

Answers (0)