cancel
Showing results for 
Search instead for 
Did you mean: 

How do I capture the exports of a function module

Former Member
0 Kudos

How do I pull the Exports from a function module. Am I suppose to use the Scalar example in the JCA guide? If no would someone please post how to pull export from the export tab in se37.

String scalar = (String) exportParams.get("SCALAR_NAME");

When I attempt the scalar example to pull an export field it gives me a null.

I can pull a table from a function module with no problems.

Stephen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Schwarz,

Add following code to make it work.

JCO.MetaData fmeta = new JCO.MetaData("STFC_CONNECTION");

fmeta.addInfo("REQUTEXT", JCO.TYPE_CHAR, 255, 0, 0, JCO.IMPORT_PARAMETER, null);

fmeta.addInfo("ECHOTEXT", JCO.TYPE_CHAR, 255, 0, 0, JCO.EXPORT_PARAMETER, null);

fmeta.addInfo("RESPTEXT", JCO.TYPE_CHAR, 255, 0, 0, JCO.EXPORT_PARAMETER, null);

repository.addFunctionInterfaceToCache(fmeta);

Where REQUTEXT is the import parameter and ECHOTEXT and RESPTEXT are the export parameters in function module.

Try this and let me know..

Regards,

Bhavik

Former Member
0 Kudos

Try this:

String scalar = exportParams.getField("SCALAR_NAME").getValue().toString();