cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger Exception From Message Mapping

Former Member
0 Kudos

Hi,

New Day New Requirement

I have a requirement to display custom message (in SXMB_MONI -> Trace) when a particular Message Mapping is executed.

I looked at these blogs:

/people/michal.krawczyk2/blog/2007/04/26/xipi-throwing-generic-exceptions-from-any-type-of-mapping

/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping

My main concern that this approach will stop the message execution. However I want that the mapping (and rest of pipeline steps) is exceuted even after raising the exception

I am working on SAP PI 7.1 with Ehp1.

How to achieve this requirement? Please assist.

Thanks

Pankaj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pankaj,

Using AbstractTrace in the udf you can display messages you want in trace in sxmb_moni without failing the interface.



public String mappTrace(String var1, Container container) throws StreamTransformationException{

AbstractTrace trace = container.getTrace();

//  this message will be displayed in the trace sequence in sxmb_moni
trace.addWarning("Message you want to display in sxmb_moni");

// there is one more option of addInfo("msg") but its not working for me. you can try this as well
trace.addInfo("Type you message hereMessage");


return var1;

}

just call this udf in mapping. You can display the required message in the sxmb_moni without failing the interface.

Regards,

Aravind

Answers (0)