cancel
Showing results for 
Search instead for 
Did you mean: 

Exception Handling in Assistance Class Web Dynpro ABAP

Former Member
0 Kudos

Hi all experts,

My question is, in my WD Component, I want to use Assistance Class for querying database, for example, wd_assist->get_info( ). In get_info( ) method, if the query returns no result, how should I handle this? Should I return the sy-subrc as a parameter back to controller and check it or is there any better way?

Thanks so much for your help

Have a nice day, experts

Accepted Solutions (1)

Accepted Solutions (1)

former_member129652
Active Participant
0 Kudos

Hi Ngyyen Van Thao,

   I prefer to handle it like a BAPI.  I use a return structure which has the following fields: MSG_TYPE, MSG_ID, MSG_NUM, and MSG.

   In my web dynpro, I check the return structure and call the proper method to handle the situation, for example, generating an error message, or redirecting the user to an error page.

Answers (0)