cancel
Showing results for 
Search instead for 
Did you mean: 

Handling mapping exceptions

Former Member
0 Kudos

Hello

Does anyone know how to throw exceptions from mappings program? Also the same exceptions should be caught in BPM.I checked that if mapping gets failed i.e. if MappingException is raised then we can have exception branch in BPM which can handle that but I wanted to raise custom exception in mapping program. I tried that with throw new Exception() but that does not work as the Simple or Advance function does not throws Exception or catch exception.

Thanks in advance.

Regards

Rajeev Patkie

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Rajeev,

You can simply raise a runtime exception in a user defined function, e.g.:

<i>public static String raiseExc(String a, Container container) throws Exception {</i>

//write your code here

RuntimeException e = new RuntimeException("mapping error");

if (<any condition>) {

throw e;

} else {

return a;

}

<i>}</i>

Best regards

Joachim

Former Member
0 Kudos

Hi Orb\

I wanna send an E-mail with this runtime exception.. is this possible

venkat

henrique_pinto
Active Contributor
0 Kudos

You can trigger alerts from UDF.

Check this blog: /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function

Regards,

Henrique.

MichalKrawczyk
Active Contributor
0 Kudos

Hi Rajeev,

have you seen this weblog by Sridhar?

"Raising Exceptions in SAP XI Mapping"

/people/sap.user72/blog/2005/02/23/raising-exceptions-in-sap-xi-mapping

Regards,

michal