cancel
Showing results for 
Search instead for 
Did you mean: 

Throwing Generic Custom Conditional Exceptions in PI 7.3 Single Stack.

Former Member
0 Kudos

Hi All,

We are currently on PI 7.0 and are raising mapping exceptions based on certain conditions using the ABAP mapping as described by Mikel in the following blog:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2007/04/26/xipi-throwing-generic-exceptions-...

But now we are migrating to PI 7.3 Single Stack and I am wondering if the same functionality can now be achieved via Java only. I do not see CBMA providing the same solution. Please share your suggestions.

Regards,

Rahul

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

      Hi Rahul,   

                      Please check my response in this thread http://scn.sap.com/thread/3349379   

      You can raise exception in java mapping.   

          

      Regards   

      Anupam   

Answers (2)

Answers (2)

former_member184789
Active Contributor
0 Kudos

Hi Rahul,

Within your mapping, you can add UDF's like,

if(XYZ==some particular value)

throw new RuntimeException("Invalid value of XYZ"+XYZ);

else return(XYZ);

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Yes, it is possible to throw java exception using java mapping too.  You can create custom exception and catch those exception and inside catch block use throw statement with error message.  Please see this link for example

http://www.javamex.com/tutorials/exceptions/exceptions_throwing.shtml