cancel
Showing results for 
Search instead for 
Did you mean: 

Ignore warning message in the pop up screen and to open next screen

UmaArjunan
Active Participant
0 Kudos

WD experts,

I want to create a warning message in the pop-up window screen .

I have used the below coding to get the warning message :

    CALL METHOD lv_message_manager->report_warning
      EXPORTING
        message_text =  'Warning message'

     RECEIVING
        message_id   = lv_mess.

This code written in the WDDOBEFOREACTION of the view present in the pop-up window. 

When i hit the OK button in the pop-up screen , the values are validated and the warning message is displayed in the pop-up window itself.

I m closing the pop-up window in the WDDOBEFOREACTION when there are no messages.

   IF lv_message_manager->is_empty( ) EQ abap_true.
    lv_api         = wd_this->wd_get_api( ).
    lv_window_ctlr = lv_api->get_embedding_window_ctlr( ).
    lv_popup       = lv_window_ctlr->get_window( ).
    lv_popup->close( 'lv_popup' ).
  ENDIF.

Actually  my requirement is user has to see the warning message in the screen once ok is pressed, when ok is button is pressed for the second time, it should suppress the warning message, close the pop-up window and display the next screen.

For the first time, ok button is pressed, i can see the warning message.

For the second time the same ok button is pressed i am getting a dump

Controller for View, Window, Interface, and Configuration Cannot Be Created . please suggest .

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

My understanding from your question is that below code gets called in WDDOBEFOREACTION when user clicks on 'Ok' Button.

Probably next time when user clicks on Ok button system does not find any reference in variable lv_window_ctlr, lv_popup i.e. they are initial.

Try this:

IF lv_message_manager->is_empty( ) EQ abap_true.
    lv_api         = wd_this->wd_get_api( ).

    lv_window_ctlr = lv_api->get_embedding_window_ctlr( ).
    if  lv_window_ctlr is not initial.

      lv_popup       = lv_window_ctlr->get_window( ).
      if lv_popup is not initial.   

         lv_popup->close( 'lv_popup' ).

     endif.
   endif.

ENDIF.

Explain in detail, if this does not help.

Regards,

Rohit

UmaArjunan
Active Participant
0 Kudos

i tried the solution. but it dint work for me.

Is it possible to hit the ok button second time after getting the warning message  ? If possible what are the steps to be followed .. Please suggest

Former Member
0 Kudos

Hi ,

If it is RABAX error do this procedure.

Execute the application and go to ST22 t-code and click on today button it will show u the list of dumps.

check the error row and double click on source code and you'll come to know where your getting the error in your code.

And you'll come to exactly what's the error your getting

Regards

Madhukiran.

UmaArjunan
Active Participant
0 Kudos

Hi Kiran,

I m getting an exception . Looks like standard one but uncaught -

it is CX_WDR_RT_EXCEPTION. tried all approaches. but didnt not work.

Former Member
0 Kudos

Hi,

Could you debug the code on OK and share which statement exactly gives dump?

UmaArjunan
Active Participant
0 Kudos

I tried to de-bug. But the debugger did not stop when the OK button is hit for the second time. throws standard uncaught exception CX_WDR_RT_EXCEPTION .

If its warning message, the warning mesage should be seen in the pop-up screen. When the user seees the warning message , he can ignore and can proceed by clicking the same ok button.

The same buttion is used for input validations