Skip to Content
Former Member
Jan 05, 2012 at 12:37 PM

Error message not displayed in a pop up


Hi ,

I have a pop up screen in my web dynpro with a input field and two buttons.

i have a error message written in the WDDOBEFOREACTION method of my pop up window. But the message is not displayed on the window. But If the same is written in the event handler of the button click it is triggered.

Please help me to display the message with the code in WDDOBEFOREACTION method .

The code is as below

 lo_nd_bp_data = wd_context->get_child_node( name = wd_this->wdctx_bp_data ).

* get element via lead selection
  lo_el_bp_data = lo_nd_bp_data->get_element( ).

* get single attribute
      name =  `BP_NUMBER`
      value = lv_bp_number ).

  CHECK lv_bp_number IS NOT INITIAL.

  IF zcl_rms_webdynpro_texts=>check_for_victim_bp( i_bp_number = lv_bp_number ) = abap_true.

* get message manager
    DATA lo_api_controller     TYPE REF TO if_wd_controller.
    DATA lo_message_manager    TYPE REF TO if_wd_message_manager.
    DATA: lv_p1 LIKE syst-msgv1.

    lo_api_controller ?= wd_this->wd_get_api( ).

    CALL METHOD lo_api_controller->get_message_manager
        message_manager = lo_message_manager.

    lv_p1 = lv_bp_number.
* report message
    CALL METHOD lo_message_manager->report_t100_message
        msgid                     = ZMSG_CLS
        msgno                     = '222'
        msgty                     = 'E'
        p1                        = lv_p1
        cancel_navigation         = abap_true
        enable_message_navigation = abap_true.


Edited by: SAP LEARNER on Jan 5, 2012 1:37 PM