cancel
Showing results for 
Search instead for 
Did you mean: 

Catch mapping error message in BPM Exception branch

Former Member
0 Kudos

Hi dudes,

Does anyone know how to catch the mapping runtime error message into a BPM exception branch? I know how to create an exception branch and how to trigger it, but I wonder whether it's possible to pass the mapping error message as shown in SXI_MONITOR (i.e. 'Cannot create target element XXXXX. Values missing in queue context').

Otherwise, everytime my BPM fails I will have to take the payload and run the mapping test in order to find out the reason of the error.

Many thanks in advance!

Paco

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Try to catch in BPM the trasformation error. You can refer to this document:

http://help.sap.com/saphelp_nw04/helpdata/en/33/4a773f12f14a18e10000000a114084/content.htm

This is an old forum issue:

Former Member
0 Kudos

Thanks,

My problem is not about handling exception in BPM, but getting the mapping error description and then passing it to the exception branch.

I can see in the workflow log that this info is contained into the Exception container EXCEPTIONS[2] / T100MSG:

Message Class: SAI_MAPPING

Message Number: 217

Message Type: E

Message Variable: com/sap/xi/tf/_<MM name>

Message Variable: com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti

Message Variable: on: Cannot create target element /ns1:<path/field>.Message Variable: Values~

The text in bold is the one I am interested in to be get and mapped into the exception branch.

Former Member
0 Kudos

Hello,

Not sure you can do that in a graphical mapping, but I do it in my own JAVA mapping using RFC lookup (I know it "writes" things in the system whereas SAP does not recommend it, but as it writes only non application data - alerts only - we chose this approach) to handle mapping errors in the StreamTransformationException branch and post it somewhere

Rgds

Chris

Former Member
0 Kudos

Hi Francisco,

Try to pass that message into a export parameter in the mapping and use it in the BPM.

Refer this blog:

/people/biswajit.das2/blog/2011/02/18/how-to-pass-export-parameter-value-from-udf-to-bpm

Regards,

Aravind

aashish_sinha
Active Contributor
0 Kudos

Hi,

You need to create an alert for it. Use AlrtCatDef transaction and create alert. You can raise an alert in BPM. You just need to use the Alert name to throw alert. In alert category, you can define the message you want.

Regards

Aashish Sinha