cancel
Showing results for 
Search instead for 
Did you mean: 

How to purposely fail a mapping

former_member540174
Participant
0 Kudos

Hi Experts,

I have been given a weird requirement IMO.  I've been asked in the mapping to in certain situations to "Fail the mapping".  I have told the functional person it would be better to put logic in the sender but sometimes that is not possible.

My requirements is if quantity exists the contract and priority must exist or FAIL.

Any good ways to "fail" the mapping and leave a trail to us know that it is a purposeful failure to save the oncall analyst from research that isn't necessary.

Best Regards,

Diane

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

Check this:

[Throwing Smart Exceptions in XI Graphical Mapping | javascript:;]

You can also check my reply in the threads pasted below:

http://scn.sap.com/thread/3510508

Edited - added few more links

Thanks

Amit Srivastava

Answers (4)

Answers (4)

suwandi_cahyadi
Contributor
0 Kudos

Hi,

Usually when given this requirement, I will put the validation checking at the top most of the target message, so that when the condition is not met there will be no message created.

Then in the Receiver Determination I will put the same validation in the condition so that the message will not be in error state if seen from the monitoring tools (SXMB_MONI / RWB).

Thank you,

Suwandi C.

former_member540174
Participant
0 Kudos

Thank you everyone.  Taking the links and digesting them and will see what we decide to do given our enviornment.

Thank you!

Ryan-Crosby
Active Contributor
0 Kudos

Hi Diane,

A simple UDF with whichever input parameters you need to check with a format like this:


if(some_condition)

throw new StreamTransformationException(some_message);

Regards,

Ryan Crosby

Harish
Active Contributor
0 Kudos

Hi Diane,

refer the below blogs

regards,

Harish