cancel
Showing results for 
Search instead for 
Did you mean: 

Catch error message in webdynpro

Former Member
0 Kudos

Hi experts,

I call in Web dynpro method the method of another object. This object raises following message.

MESSAGE e008 WITH parameter

RAISING object_type_not_configured.

This leads to runtime error in web dynpro.

Could you please provide me with code example how to catch this error in web dynpro method and display raised message in standard way without crashing of application?

Best Regards

Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Catching this excption is not really Web Dynpro specific. You would catch it the same way in WD as you would in any normal ABAP code. This is a non-class based exception. Therefore you would declare the exception type in the method call and then check for SY-SUBRC. Look at the MESSAGE entry in the keyword help. Read the section for Addition 2 - RAISING excpetion.

As far as issuing an error message after checking for the SY-SUBRC, you would use the normal WD Message Manager. The SY fields for messages (SY-MSGID, SY-MSGTY, SY-MSGNO, SY-MSGV1-SY-MSGV4) will contain all the details of the triggering error message that you can in turn use within the WD Message Manager error.

http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0d/2ca9423961c96ae10000000a155106/frameset.htm