on 04-21-2016 8:01 AM
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.
Regards,
Mustafa
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 views.it 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( ).
cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
EXPORTING
view_controller = lo_view_controller
display_messages = abap_true
IMPORTING
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 .
Thanks
Nidhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.