Skip to Content
avatar image
Former Member

Catch error message in webdynpro

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Feb 21, 2011 at 03:09 PM

    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

    Add comment
    10|10000 characters needed characters exceeded