cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Exception manually in Graphical Mapping

Former Member
0 Kudos

Hi Experts,

I would like to generate manually an exception in a graphical XI mapping.

Context:

In Field1, if Value1 > Value2, force mapping to leave and generate an exception.

Feel free to contact me if you need further informations.

Regards Landry,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

you can use an UDF to generated an exception try this code.


if(Value1> Value2) 
   throw new RuntimeException("Value1 is greater Value 2");

Answers (3)

Answers (3)

Shabarish_Nair
Active Contributor
0 Kudos

http://help.sap.com/saphelp_nw04/helpdata/EN/c8/98e7d5c1620642973565ea3dd319d1/content.htm

use regular try catch in a UDF and then populate the exceptions using the mapping trace object.

Former Member
0 Kudos

Thanks to you!

Solution provided really helps me!

Former Member
0 Kudos

Hi,

I do not remember any RaiseException function delivered by SAP, so you will have to raise it from a UDF function, using regular throw clauses in the UDF's JAVA code ...

if (...) throws new AnyKindOfKnownOrCustomException(...);

Rgds

Chris