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