cancel
Showing results for 
Search instead for 
Did you mean: 

How to catch standard functions err messages from WDA

former_member182374
Active Contributor
0 Kudos

Hello Experts,

I'm trying to run a custom function from my Web Dynpro ABAP component.

The custom function runs (among other things) the standard function 'ME_REL_CHECK_MANY'.

If there is some error in 'ME_REL_CHECK_MANY' a message is written and no exception is raised (so my WDA has dump).

How can I prevent it? (since there is no exception try and catch won't help...).

Regards,

Omri

Accepted Solutions (1)

Accepted Solutions (1)

Aliaksandr
Active Participant
0 Kudos

Hi Omri,

Could you add exception part in method calling (see example below)? I think it must help you.

call function 'ME_REL_CHECK_MANY'

   exporting

     i_frgot       = l_frgot

     i_frgco       = l_frgco

   tables

     t_frggr       = lt_frggr

     t_t16fv       = lt_t16fv

   exceptions

     error_message = 1

     others        = 2.

Kind regards, Aliaksandr.

former_member182374
Active Contributor
0 Kudos

Thanks Aliaksandr Zhdanovich, this solves the problem.

Omri

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Omri Cohen,

You can make use of interface if_wd_message_manager for transfering your message to webdynpro applicaltion.

DATA lr_message_manager TYPE REF TO if_wd_message_manager.

DATA lr_api_controller TYPE REF TO if_wd_controller.

lr_api_controller ?= wd_this->wd_get_api( ).

lr_message_manager = lr_api_controller->get_message_manager( ).

lr_message_manager->report_t100_message(

msgid =<MSGID>

msgno =<MSGNO>

msgty ='E'M).

ELSE.

Thanks & Regards

Praveen Gupta

former_member182374
Active Contributor
0 Kudos

Hi Praveen Gupta,

I don't understand your answer.

A standard BAPI uses message and doesn't raise exception how can I catch it from WD?

Can you explain?

Regards,

Omri