cancel
Showing results for 
Search instead for 
Did you mean: 

Throwing Custom Exception in SXMB_MONI( Error Node)

Former Member
0 Kudos

Hello all,

The requirement is to Throw an Custom Error Exception in the SXMB_MONI, which we are able to do and generate the custom error message to stop the message in moni . I have created the UDF to call API's Classes such as BaseRuntimeException or RuntimeException.

Above API's -Able to populate the Custom Message in the TRACE Node of the Request Message mapping Step.

Not Able to Populate the error Message in the ERROR Node of the Request Message mapping Step,so I want to know is that any API's can be used to populate the custom message in error Node or Can i raise the OSS notes ? .

Any OSS notes helps me to do that?

Thanks,

Kamal

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Throwing Custom mapping exception...

Throwing Smart Exceptions in XI Graphical Mapping ... [I always used this to throw error & stop mapping]

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

XI/PI: Throwing Generic Exceptions from any type of Mapping

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

-Siva Maranani

sarath_kandadai2
Explorer
0 Kudos

Hi,

There is no API to provide this functionality. The reason is the XI message processing is through pipeline as you know. And this is nothing but SAP specific services. So you can not alter them as they are. For the request that you are asking, you will have to edit the pipeline step that populates the SAP:ERROR node. For this, we need to identify which service does this and then if it is possible to write a user exit, etc...So in this case, I would suggest you go with raising an OSS note.

However, can you please tell us why is this required? I can understand to send a message/mail if you get an error or something like that. But I am not able to figure out in what scenarios would you require this kind of error display.

Thanks and Regards,

Sarath.

prasannakrishna_mynam
Contributor
0 Kudos

Hello Kamal,

Any error while mapping results the StreamTransformationException, enclose you statements in try..catch block and throw the StreamTransformationException in catch block.

Eg:

try{

if(i==0)

throw new RuntimeException(" ");

}catch(Exception e){

thow new StreamTransformationException("Your Excep",e);

}

Regards,

Prasanna

Former Member
0 Kudos

HI,

Thanks for your quick reply, whether this code will able to populate the Customer message in the ERROR NODE of the Request message mapping step...? , Your code also throwing error message inthe TRACE Node Not in the Error node.

Thanks,

Kamal

prasannakrishna_mynam
Contributor
0 Kudos

Hi kamal,

In Error node it will display the message that you have mentioned in Runtime Exception. It worked for my case, check in case you have given any message while thorwing RuntimeException.

Rehards,

Prasanna

Former Member
0 Kudos

Hi Kishna,

As you said , i have made the changes in the Code also

throw new RuntimeException("Not Maintained"+message);

.

But i can able to see the error in the Trace Node of Soap Header-RMM, r u sure that you message is shown in the ERROR node of Soap Header-RMM.

Thanks,

Kamal

Former Member
0 Kudos

Hi,

Have you checked inside "Request Messages Mapping" pipeline?

Regards

Ivan