cancel
Showing results for 
Search instead for 
Did you mean: 

JCA Problems with strutures

Former Member
0 Kudos

objInteraction = objConnection.createInteractionEx();

objInteractionSpec = objInteraction.getInteractionSpec();

objInteractionSpec.setPropertyValue("Name",RFC_NAME);

objFunctionsMetaData = objConnection.getFunctionsMetaData();

objFunction = objFunctionsMetaData.getFunction(RFC_NAME);

objStructureFactory = objInteraction.retrieveStructureFactory();

objRecordFactory = objInteraction.getRecordFactory();

I am trying to access structure with the following with the following code.

IRecord structure = (IRecord) objStructureFactory.getStructure(objFunction.getParameter("XXX").getStructure());

But the structure object is throwing Null pointer exception

Same is the case for Tables also.

IRecordSet table= (IRecordSet) structureFactory.getStructure(

objFunction.getParameter("BAPIADTEL").getStructure());

table.insertRow();

table.setString("TE", "8567890");

table.setString("TE", "12121");

objInputParam.put("YYY", table);

In the above code the table is throwing Null pointers exception.

Kindly advice the correct process.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I have come along this post so many times that now that I have solved it myself I will have to reply to it.


MappedRecord output = (MappedRecord) ix.execute(ixspec, input);
//Now we want to read the output.
//If we deal with a structure, we get an IRecord Object
IRecord addressStructure = (IRecord) output.get("ADDRESS");
//Otherwise we would get an IRecordSet Object (Field)

I hope it will help all those searching as well.

BR

Sigi