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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.