cancel
Showing results for 
Search instead for 
Did you mean: 

How can i catch custom Exception throws by function module?

Former Member
0 Kudos

My WebDynpro application calls function module to insert/update/search records.

From ABAP function modules few Exception has been thrown and i want to catch those individual exception(s) in my Java WebDynpro code. Please help...

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

HI,

The variables in Exception tab is not available to WebDynpro.

If u want to import them to WebDynpro, create export parameter

in RFC and populate the exception details to this variable from

RFC code.

This export parameter will be available to WebDynpro application

Regards

Fahad Hamsa

Former Member
0 Kudos

It's fine !!!

but i have the functional modules already exist with Exceptions..

Let say for 1 Function module 3 Exception already written amd i want to catch them in my Java WebDynpro Code... How can i do this? Please suggest

Former Member
0 Kudos

Hi

Exception tab will not be available when we import RFC. We can access only import and export parameters of a FM. So try the approach I mentioned earlier.

Create 3 export variables and get the exception values for them using the code.

Regards

Fahad Hamsa

Former Member
0 Kudos

You get the thrown exception with


} catch (WDDynamicRFCExecuteException e) {
 String exceptionName = e.getMessage();

Regards

Rene