on 11-14-2013 3:22 AM
Hello
I put a button on my_view of my_wdc, its associated action is my_action_of_button_clicked_hence_open_popup.
In this my_action_of_button_clicked_hence_open_popup am calling a popup (say, my_popup_for_user_input_and_text_view) by using code
wd_this->w_window = lo_window_manager->create_window.
Say, my_popup_for_user_input_and_text_view has 2 input field FIRST NAME and LAST NAME
On my_popup_for_user_input_and_text_view i have assigned an action to standard SAP's OK button, say, its name is my_action_on_popup_on_OK_button_for_z_tbl_update
As we know all these 2 actions are part of my_view
Now, i need to handle the errors, say, for example, user entered FIRST NAME but forgot to enter LAST NAME and clicked the OK button, immediately my_popup_for_user_input_and_text_view will be closed
I want to show the error message on my_popup_for_user_input_and_text_view itself, so, what i did is,
1) i saved the WDEVENT of my_action_of_button_clicked_hence_open_popup. as view's attribute
2) am capturing the user's fault in my_action_on_popup_on_OK_button_for_z_tbl_update
3) if LAST NAME is missing then, am re-opening / re-launching the my_popup_for_user_input_and_text_view by calling the
my_action_of_button_clicked_hence_open_popup action-method by passing saved attribute WDEVENT in the beginning
Pls. let me know is my approach is safe?
Any better approach?
Thank you
Hi MSR,
I think , opening popup again if there is validation erros is not suggested.
You can achieve the same as below
Say button CLICK is on view1 and tow input fields - first name & last name on view 2.
Solution 1:
Solution 2
Note:
Set CLOSE_IN_ANY_CASE parameter of method IF_WD_WINDOW_MANAGER~CREATE_WINDOW to ABAP_FALSE as it will not close the window if any errors on view
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.