cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch exception thrown from a function module?

Former Member
0 Kudos

Hi all,

When we are calling a function module from JSPDynpage setting some import parameters, If in some case an exception is thrown in the function module. How can we catch the same exception in the JSPDynpage program?

Thanks & Regards,

Ravi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ravi

Try this

try

{

Object retMsgs = output.get(bapiretrunmsgobject);

if(result != null )

IrecordSet rmsg = (IrecordSet) result

}

catch(Exception ex)

{

printException(ex, "Error getting function result");

}

Lemme know for any further questions.

Regards

Praveen

Former Member
0 Kudos

Hi Ravi

Can't you just do the following: (or is it not what you want?)

try

{

// execute functionmodule

}

catch(Exception e)

{

// It probably already says what kind of exception it throws so maybe you should catch //that explicitly - Javadocs could probably help you there

System.out.println(e.getMessage());

}

Br

Göran