cancel
Showing results for 
Search instead for 
Did you mean: 

Using RFC Look Up in Java Mapping

Former Member
0 Kudos

Hi All,

I need to do an RFC Look Up in a Java Mapping program. The response structure of the Function Module to be called consists of only one node called RESULT. In order to read the value exported by the function module in this export parameter RESULT, I am using the following code:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

DocumentBuilder builder = null;

factory.setNamespaceAware(false);

factory.setValidating(false);

Document docResponse = null;

InputStream in1 = result.getContent();

docResponse = builder.parse(in1);

String output = docResponse.getDocumentElement().getFirstChild().getNodeValue();

The function module works correctly and returns the expected result when tested in SE37. However, on running the above code, the statement docResponse.getDocumentElement().getFirstChild().getNodeValue(); always returns the value NULL and not the expected value that is actually returned by the RFC.

Kindly let me know where could I be going wrong.

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member187339
Active Contributor
0 Kudos

Hi Sreehari,

Your DOM code looks correct, it might be something with the overall code of java mapping. Just have a look at this blog /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes

and compare you code with it. See whether you can fine tune your coding to get the rigth response.

Regards

Suraj