cancel
Showing results for 
Search instead for 
Did you mean: 

getting error in create_popup_to_confirm

Former Member
0 Kudos

hi i am creating one confirmaton window ( dialouge box) create_popup_to_confirm , in this i am getting doubt ,how to use the parameters text  as it is of type string_table , i am giving you my code please check t that  am using it correctly or not .

data ls_text type string_table.





  data :component type REF TO if_wd_component ,

        manager TYPE REF TO if_wd_window_manager ,

        window TYPE REF TO if_wd_window ,

        L_API TYPE REF TO IF_WD_VIEW_CONTROLLER .



INSERT 'your message has been sent' into table ls_text .

L_API = WD_THIS->WD_GET_API( ).



  component = wd_comp_controller->wd_get_api( ).

  manager = component->get_window_manager( ).

  window = manager->create_popup_to_confirm(

  text = ls_text

  button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_information

  close_button =   'X'

  Window_title = 'Confirmation Box'

  ).



Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

this question is answered

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You can mark the reply as correct answer which will automatically close the thread.

Regards,

J.Jayanthi

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

You need to declare a workarea of type string and internal table of string_table.

And create action(here ACTION_YES and ACTION_NO).

   data :component type ref to if_wd_component ,

        manager type ref to if_wd_window_manager ,

        window type ref to if_wd_window ,

        l_api type ref to if_wd_view_controller .


data ls_text type string_table.
data lwa_text type string.
lwa_text = 'your message has been sent'.
insert  lwa_text into table ls_text .

l_api = wd_this->wd_get_api( ).



  component = wd_comp_controller->wd_get_api( ).

  manager = component->get_window_manager( ).


  window = manager->create_popup_to_confirm(

  text = ls_text

  button_kind = if_wd_window=>co_buttons_okcancel

message_type = if_wd_window=>co_msg_type_information

  close_button =   'X'

  window_title = 'Confirmation Box'

  ).

window->subscribe_to_button_event(
              button = if_wd_window=>co_button_ok
              action_name = 'ACTION_YES'
              action_view = l_api
              is_default_button = abap_false ).

  window->subscribe_to_button_event(
              button = if_wd_window=>co_button_cancel
              action_name = 'ACTION_NO'
              action_view = l_api
              is_default_button = abap_false ).


  window->open( ).

Former Member
0 Kudos

Yes thanks jayaram  this code is working fine

former_member209920
Active Participant
0 Kudos

What error are you getting ?