Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Message in popup window

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!

Former Member
Former Member replied

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 will work.try this and let me know if its working.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question