cancel
Showing results for 
Search instead for 
Did you mean: 

Why previously displayed message is coming again?

former_member202077
Participant
0 Kudos

Hello

I am on view_1, here user selecting a option, if its incorrect, then am throwing a message(say, its INCORRECT PICK) in a popup with the below code,

 
 
* Navigate from <CONTEXT> to <ERROR_MESSAGE> via lead selection
    lo_nd_popup_message = wd_context->get_child_node( name = wd_this->wdctx_popup ).
* Get element via lead selection
    lo_el_popup_message = lo_nd_popup_message->get_element( ).
* Get single attribute
    lo_el_popup_message->set_attribute(
    EXPORTING
    name = `MESSAGE`
    value = lv_message ).

    lo_api_component = wd_comp_controller->wd_get_api( ).
    lo_window_manager = lo_api_component->get_window_manager( ).
    lo_window = lo_window_manager->create_window(
    window_name = 'POPUPW'
    title = 'Invalid Selection'
    message_display_mode = if_wd_window=>co_msg_display_mode_selected
    close_button = abap_true
    button_kind = if_wd_window=>co_buttons_ok
    message_type = if_wd_window=>co_msg_type_none
    default_button = if_wd_window=>co_button_ok
    ).
    lo_window->open( ).
    lo_window->close( ).
    EXIT.

Then, the user clicks OK button, and selects correct option, then user will navigated to view_2 and user will enter data, clciks submits button, then i am throwing a successful submission message on view_3, fine. But, along with successful message, user is getting the previously displayed message (INCORRECT PICK) as well!!

How can fix it? Why still the previous message INCORRECT PICK is persisting there? why system is retaining it?

Thank you

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Do you use the messge area to throw messages in?

If this is the case, please try to reset the message queue by using

the message manager clear_messages method.

if you are using a special node say "Messages", check if you go over

the elements of your node. You should make this node's cardinality 1:1

and select one attribute at the time.

I hope this helps

regards

yuval peery

former_member199125
Active Contributor
0 Kudos

which version are you using?

Its better to use message area UI element, it will hold only one message always at a time.

Regards

Srinivas

former_member202077
Participant
0 Kudos

Thank you.

You mean, NW ver.? if so, we are on NW 2007

Former Member
0 Kudos

Hi,

Post your code for successful message also. Problem may be there too. So let us have a look at it.

Regards,

Fareez