cancel
Showing results for 
Search instead for 
Did you mean: 

Parameters with Operation Mapping / Java Mapping

mg_76
Explorer
0 Kudos

Hi experts,

I need to use two parameters in operation mapping and I need to use them in my Java mapping.

I already inserted in my IFlow and in the Operation Mapping the two parameters:

I insert in my Java code the following rows:

String paramA=this.inputParameters.getString("paramA");

String paramB=this.inputParameters.getString("paramB");

But when I test the mapping goes in error and the parameters are equals to null

My mapping exeteds "DefaultStreamTransformation" class

I'm searching something to help me to fix that, and I found the following thread but it didn't help me much:

Someone can give me some explanation about this problem?

Thanks in advance for any help

Accepted Solutions (1)

Accepted Solutions (1)

vadimklimov
Active Contributor

Hi Marco,

Code snippet for retrieving mapping parameters within Java mapping program can be found at Parameterized Java Mappings - Managing Services in the Enterprise Services Repository - SAP Library. Using it as a reference shall help to get familiar with used APIs when working with parameterized mapping.

Looking into your code, I suggest checking following:

  • Java mapping class shall extend AbstractTransformation (com.sap.aii.mapping.api.AbstractTransformation), not DefaultStreamTransformation;
  • Mapping parameter is accessed by calling TransformationInput.getInputParameters().getString(<parameter name>).

Regards,

Vadim

mg_76
Explorer
0 Kudos

Hi Vadim,

thanks for the useful link to the Help Portal and also for the precious advice.

Answers (0)