cancel
Showing results for 
Search instead for 
Did you mean: 

POPup problem

Former Member
0 Kudos

Hi experts,

Please go through below code, Which popus up the window but when i click on YES button it throws an error like

" Controller for View, Window, Interface, and Configuration Cannot Be Created"

lr_component = wd_comp_controller->wd_get_api( ).

lr_window_manager = lr_component->get_window_manager( ).

lr_window = lr_window_manager->create_popup_to_confirm(

text = str_table

button_kind = 4

message_type = 5

close_button = 'X'

window_title = 'Screen Exit>>'

WINDOW_LEFT_POSITION = 10

WINDOW_TOP_POSITION = 10

  • WINDOW_POSITION

  • WINDOW_WIDTH

  • WINDOW_HEIGHT

).

l_api = wd_this->wd_get_api( ).

lr_window->subscribe_to_button_event( button = lr_window->co_button_yes

action_name = 'YESHANDLER'

action_view = l_api ).

lr_window->open( ).

where YESHANDLER is an event defined in same View's event.

any inputs?

Thanks in advance,

Accepted Solutions (1)

Accepted Solutions (1)

mohammed_anzys
Contributor
0 Kudos

Hi

There are some corrections to be made in your code. action_name should be provided...not event name....It will check only in the actions .....not in the events...

/Anzy

mohammed_anzys
Contributor
0 Kudos

Ok

Message was edited by:

Mohammed Anzy S

Answers (2)

Answers (2)

Former Member
0 Kudos

Still problem persists

mohammed_anzys
Contributor
0 Kudos

hi

Give message type as if_wd_window=>co_msg_type_question ( value 2 ) not 5.

Thanks

Anzy

mohammed_anzys
Contributor
0 Kudos

sorry that was by mistake

mohammed_anzys
Contributor
0 Kudos

Hi prasad,

This code works perfectly fine without any problem

DATA:

lo_cmp_api TYPE REF TO if_wd_component,

lo_window_manager TYPE REF TO if_wd_window_manager,

lo_popup TYPE REF TO if_wd_window,

lt_text TYPE string_table,

lv_message TYPE string,

lv_message_title TYPE string,

lo_api TYPE REF TO if_wd_view_controller.

lo_cmp_api = wd_comp_controller->wd_get_api( ).

lo_window_manager = lo_cmp_api->get_window_manager( ).

lo_popup = lo_window_manager->create_popup_to_confirm(

text = lt_text

button_kind = if_wd_window=>co_buttons_yesno

message_type = if_wd_window=>co_msg_type_question

window_title = lv_message_title

window_position = if_wd_window=>co_center ).

lo_api = wd_this->wd_get_api( ).

lo_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_yes

action_name = 'TEST_YES'

action_view = lo_api

is_default_button = abap_true ).

lo_popup->subscribe_to_button_event(

button = if_wd_window=>co_button_no

action_name = 'TEST_NO'

action_view = lo_api

is_default_button = abap_false ).

lo_popup->open( ).

Thanks

Anzy

Former Member
0 Kudos

Sorry it was my mistake in writing.

Its actually an Action defined in WDApp.