cancel
Showing results for 
Search instead for 
Did you mean: 

Catch RFC Exception message text

ashish_shah
Contributor
0 Kudos

Hi Experts,

I am calling a RFC from WebDynpro using adaptive RFC Model.

This RFC returns some Exception message along with the exception key from SAP R/3.

Like this :


 MESSAGE e000(ztxx01) WITH 'this is exception message'
     RAISING table_not_available.

Now when i am trying to fetch this data in WebDynpro using the following statement:


msgmgr.reportException(ex.getLocalizedMessage(), false);
msgmgr.reportException(ex.getMessage(), false);

I can only see TABLE_NOT_AVAILABLE .

How can i fetch the exception message thrown by RFC?

Regards,

Ashish Shah

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Ashish,

When you import bapi, a node for return messages also created, do mapping to your view and access that node to print return messages.

Regards

Praveen

Former Member
0 Kudos

hi Ashish,

in the rfc collect the error messages in Export parameter as Return strucure BAPIRET2,

it comes as a out put structure in webdynpro. so that u can print the error messages looping through stucture.

Venkat

Former Member
0 Kudos

Hi Ashish

you can't get the RFC-Messages directly (as i know).

You have to rebuild your

ABAP-Program that the errors will be redirected as a table.

There it gives a structure named 0_return (i don't know exactly) this is the standard table for outgoing error-messages.

Marco