cancel
Showing results for 
Search instead for 
Did you mean: 

WebDynpro Popup

Former Member
0 Kudos

Hello there,

I'm new in SAP, and I have a problem with my popup.

Each time a user selects a value from a dropdown, a popup must appear, I could do this, but the popup I get is empty

Here is how I create my popup:

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

l_popup = l_window_manager->create_popup_to_confirm(

text = l_text

button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_warning

  • close_button = 'X'

window_title = 'Warning'

window_position = if_wd_window=>co_center ). "#EC *

l_api = wd_this->wd_get_api( ).

Can someone tell me how I can fix it?!

Thank you,

K

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

The way you are opening popup is ok. But i don not understand what do you mean by pop up is empty? does your pop up has UI elements and they do not contain data? In this case, the node with which you have binded the UI elements does not have data.

Former Member
0 Kudos

I have a text and 2 buttons which do not appear when the popup opens.

Former Member
0 Kudos

Have you used the statement l_popup->open( ) after calling create_popup_to_confirm( )? If not, use this statement. I tried it out and it was working fine.

Former Member
0 Kudos

Also, for the text to apear the in the table l_text, you should append a string.

Say, l_text TYPE STRING_TABLE.

APPEND 'TEST' TO l_text.

Now use this l_text in method CREATE_POPUP_TO_CONFIRM for parameter TEXT.

Former Member
0 Kudos

I already have the "_popup->open( )"

Here is how I call my popup

insert `Important!` into table l_text. "#EC *

insert `« Attention : La Priorité très Elevée (Very high) est exclusivement réservée au blocage du système de production ».`

into table l_text. "#EC *

l_cmp_api = wd_comp_controller->wd_get_api( ).

l_window_manager = l_cmp_api->get_window_manager( ).

l_popup = l_window_manager->create_popup_to_confirm(

text = l_text

button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_warning

  • close_button = 'X'

window_title = 'Warning'

window_position = if_wd_window=>co_center

). "#EC *

l_api = wd_this->wd_get_api( ).

*Creating OK button

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_ok

button_text = 'Confirmer la priorité '

action_name = 'Confirmer'

action_view = l_api

is_default_button = abap_false

).

*Creating Cancel Button

l_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_cancel

button_text = 'Annuler'

action_name = 'Annuler'

action_view = l_api

is_default_button = abap_true ).

*

l_popup->set_window_size( width = '40%' height = '5%' ).

l_popup->open( ).

Thank you for your quick answers btw