cancel
Showing results for 
Search instead for 
Did you mean: 

Clearring the Message Area

Former Member
0 Kudos

I have a Web Dynpro component that uses the SALV_WD_TABLE component to display a grid.

The user may enter a new record into the grid and decide not to Save the record. So the user

presses the Back button to retrun to a Main Screen.

If the record which the user had started to enter contains a validation error, a message is generated by

the framework and displayed, which would normally prevent the navigation to the Main Screen from

occurring. So I configured the Back action as validation independent so that the user can navigate to

the Main Screen. The problem arises if the user decides to return to my grid to re-enter some records.

The validation error that had been displayed remains in the message area.

I have gotten a handle to the message manager in the event handler method of the inbound plug

of the grid's view. And I have cleared the messages, but the validation error remains displayed in the

message area.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi

Change the Lifetime of view into when visible instead of framework controlled under views property . It shud help

regards,

amit

Answers (1)

Answers (1)

Former Member
0 Kudos

What method have u used to clear the messages?

Try this:


  DATA: l_current_controller TYPE REF TO if_wd_controller,
        l_message_manager    TYPE REF TO if_wd_message_manager.

  l_current_controller ?= wd_this->wd_get_api( ).

  CALL METHOD l_current_controller->get_message_manager
    RECEIVING
      message_manager = l_message_manager.

  l_message_manager->clear_messages( ).

I guess the place where u have written this code is correct as well.