on 05-06-2009 3:37 PM
Hello experts!
I have a problem with showing messages in a popup. I build two views embedded in one window.
The first view is my main view and the second view is shown as a popup window.
I open the popup with
lr_window = lr_window_manager->create_window(
window_name = 'W_POPUP_BPKIND'
title = 'test'
button_kind = '3'
close_in_any_case = abap_false
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
).
On my popup window i have some mandatory fields. One of this mandatory fields is a date field.
If i enter a wrong date for example 99.11.1999 and press my okay button, the error message of the wrong date
appears in my main view in the message area, but i need the message in my popup window.
How is it possible to show the message in the popup window and not in the main view?
Do you have any ideas?
Thanks and best regards!
Hi Huetze,
in the main view 'action' check if the entered date is correct or not.if the date is worng write the following code in the else part to get the popup..
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller,
message type string.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
concatenate 'The following date dosent exits' <date> into text separated by ' '.
append text to l_text.
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_information
window_title = 'Information'
window_position = if_wd_window=>co_center ).
l_popup->open( ).
No need to create second view for popup.it will work.try this and let me know if its working.
Thanks,
anusha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi pass the pop up name in the VIEW parameter of the message manager report_t100_message.
THANKS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To restrict the error message to pop up view only, just pass the pop up view name while calling the message manager. Refer the following code
CALL METHOD lo_message_manager->report_t100_message
EXPORTING
msgid = 'ZMSG'
msgno = '108'
msgty = 'E'
view = 'ZPOPUP_ERROR'. "pass the pop view name here
Also refer this thread: https://forums.sdn.sap.com/click.jspa?searchID=25780873&messageID=6324112
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
have you tired using a MessageArea in the PopUp View?
http://help.sap.com/saphelp_nw04s/helpdata/en/04/b08841349e1909e10000000a155106/frameset.htm
if you insert that UI Element it should work, but I'm not sure right now.
I think you would need to destroy the pop up after you closed the window, to make sure your messages will be displayed again. Otherwise they might be shown in the closed pop up in the back ground...
kind regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try embed your pop up view in a separate window.
Regards,
Abdul.
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 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.