cancel
Showing results for 
Search instead for 
Did you mean: 

Error message not displayed in a pop up

Former Member
0 Kudos

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
  lo_el_bp_data->get_attribute(
    EXPORTING
      name =  `BP_NUMBER`
    IMPORTING
      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
      RECEIVING
        message_manager = lo_message_manager.

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

  ENDIF.

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

u have 2 views and 2 windows...from main view you are calling other view in a popupright..

now...WDOBEFOREACTION of the popup based view , have you written the code here...

Have you writenn any logic in MODIFYVIEW.....

Former Member
0 Kudos

Hi,

I have written in the WDBEFORENAVIGATION of the pop up Window.

The reason is that I have the value entered in the pop up

Regards

former_member199125
Active Contributor
0 Kudos
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.

strange..

wddobeforeaction will trigger then event handler wil trigger then wddoafteraction will trigger.

Did you put a break point in wddobeforeaction?

Regards

Srinivas