cancel
Showing results for 
Search instead for 
Did you mean: 

Error in conditional map using User Defined Function

Former Member
0 Kudos

All,

In my mapping I basically have a user defined function that returns the filename of my inbound file from the adapter-specific message attributes (file adapter). I know this is coded properly because if I simply assign this function to my destination field I can see the filename in the payload XML.

However if I conditionally check that returned value using if,then,else I get an error message stating:

"During the application mapping com/sap/xi/tf/_MaterialData2ZcustProdMastMulti_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformation"

Essentially in my if I'm checking if the value returned by my user defined function is equal to the constant "SOMECONSTANT" then I'm setting my destination field to some other constant value. Otherwise it's equal to a different constant value.

Any thoughts?

Accepted Solutions (1)

Accepted Solutions (1)

claus_wallacher
Active Participant
0 Kudos

Hi Shaun,

I assume you use the if statement from the graphical mapping tool for your scenario. Then you need as input for the if-clause some boolean value. When you compare the output of your user defined function with some constant make sure you use the text function <b>equalS</b>. With this function you should not have any problem in your comparison.

Regards,

Claus

Former Member
0 Kudos

Claus,

Thanks for the help. I actually had figured the problem out on my own. Sorry for not updating the thread sooner. What happened was this (as I suspected it wasn't related to my user defined function). For the newbies out there (of which I'm one) the problem was I was comparing strings in the graphical mapping tool using the Boolean "EQUALS" rather than the Text "EQUALSS".

Can you give yourself points for solving

Answers (0)