cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass input parameter (parameterized mapping) to java mapping program

Former Member
0 Kudos

Hello

I have a question about the parameterized mapping with Java (PI 7.1).

In the operation mapping (using Java-class) I defined a inputer parameter (string). I think I am supposed to retrieved the value using:

arg0.getInputParameters().getString("myInputParameterName");

where arg0 is the TransformationInput object.

However I am not able to get the value, I got runtime exception saying the inputer parameter doesn't exit.

Then I figured out maybe I need to bind the OM input parameter to Java mapping parameter, just like in case of message mapping, you need to bind OM parameter to MM parameter. However there is no way to define input parameter for the java mapping program.

Anybody has done java mapping with parameterized mapping?

Anybody can give any hint for this?

Thanks

Jayson

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Issue solved.

I need to bind the input parameter to the java mapping program.

stefan_grube
Active Contributor
0 Kudos

When you are in operation mapping in edit mode and click on "Parameters" button, you can define parameters. Doesn't this work for you?

You have to provide values in Intergration Directory as well.

Former Member
0 Kudos

Hi Stefan,

yes, I defined the input parameter in OM. My issue is that I can't get the value in hte java program.

BTW, I tested it with the test tool available in the Test tab in the OM and provided value in the Parameters tab. When I run the OM mapping test, I got exception.

any more ideas?

Thanks.

BTW, Anand, you are talking about adapter-specific parameter, not input parameter what my question concerns.

Former Member
0 Kudos
InputParameters params = container.getInputParameters();
 
DynamicConfiguration conf = (DynamicConfiguration) params.getValue(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
 
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "Directory");

http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm

Edited by: Anand on Dec 10, 2008 4:13 PM