Skip to Content

Mandatory Error Message of the view in Popup window

Dear All,

I am able to display the custom error messages in the pop up window by creating a view & window for the popup.

My requirement is to display the "Fill in all required fields" error messages in the popup window and when they click on that message then it should take to that field of different view.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 21, 2016 at 09:29 AM

    Hi Mustafa,

    CHK_MANDATORY_ATTR_ON_VIEW method of class  CL_WD_DYNAMIC_TOOL will help to handle error message for multiple mandatory fields on a single  checks all the mandatory fields on the screens.

    Property State value should be required  but it will make it as * m ark but it won’t work as a mandatory filed ,we have to code explicitly to handle the error message for emptiness.

    Method CHECK_MANDATORY_ATTR_ON_VIEW of class CL_WD_DYNAMIC_TOOL to perform Mandatory check for input field UI elements with property STATE as 'required'.

    you can write in hook method WDDOBEFOREACTION or on some event handler when you want to check the emptiness.

    Below piece of code may be help you 

    data: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,

    lo_view_controller TYPE REF TO if_wd_view_controller,

    lo_message_manager type ref to if_wd_message_manager.

    lo_view_controller ?= wd_this->wd_get_api( ).

    lo_message_manager = lo_view_controller->get_message_manager( ).



    view_controller = lo_view_controller

    display_messages = abap_true


    messages = lt_msg ).

    if you want to move to main view after the POP Up action , you can use below code.

    window  type ref to if_wd_window.

    wd_this->window->set_close_in_any_case( abap_true ).

    If above solution dose not fit your requirement please explain your issue clearly , so some one can try to answer .



    Add comment
    10|10000 characters needed characters exceeded

    • Then maybe you can try eventing, with a custom param of type error message, and rethrow the error message once popup is closed, but this time in the main view controller?

      I don't want to sound smartass but if I had that requirement i would really argue with the business to drop it.

  • Apr 21, 2016 at 09:14 AM


    I am not sure a cross-window navigation is a good architecture.

    Pop ups in general are better to be avoided, and messages should refer to the window you're workig on.

    On the REPORT_ATTRIBUTE_ERROR_MESSAGE you have a parameter to specify the VIEW, but I don't know if it works properly, and even then a typical popup would prevent you from accessing the background screen, you'd have to go modal.

    Then why would you keep a popup open if the fields to work on are in the other view.

    If you want a 'popup' like behaviour of the message area, I think it's available in the recent netweaver versions even for WDA.

    Add comment
    10|10000 characters needed characters exceeded