Skip to Content

error in delete confirmation pop up message

Hi All,

I need to adda pop up to confirm the deletetion and for this I have done the following:

1. I have a button in my main view "Delete".

2. On action of Delete I have got the following code in place:

data lo_window_manager type ref to if_wd_window_manager.
  data lo_api_component  type ref to if_wd_component.
  data lo_window         type ref to if_wd_window.
  data lo_view_controller type ref to if_wd_view_controller.
  data :  lt_text TYPE string_table,
          ls_text TYPE string.

  ls_text = 'You want to delete ..Are you sure?'.
  INSERT ls_text INTO TABLE lt_text.

* Get Window manager
  lo_api_component  = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_api_component->get_window_manager( ).

  lo_window = 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_WARNING
  window_title    = 'Information to Confirm...'
  window_position = if_wd_window=>co_center ).

  lo_view_controller = wd_this->wd_get_api( ).

* creating ok button
  lo_window->subscribe_to_button_event(
             button = if_wd_window=>co_button_yes
             action_name = 'YES'
             action_view = lo_view_controller
             is_default_button = abap_false ).

  lo_window->subscribe_to_button_event(
             button = if_wd_window=>co_button_no
             action_name = 'NO'
             action_view = lo_view_controller
             is_default_button = abap_true ).

* Set the height and width here
  lo_window->set_window_size( width = '40%' height = '5%' ).

  lo_window->open( ).

3. I created a view v_delete and created two actions within that view YES and NO and I have also created a window W_delete and embedded the window to the view v_delete.

4. Within the view v_delete I created two actions one each for YES and NO.

and now when I run the application I am getting the following short dump:

Action &OBJECT_ID& does not exist

can you please tell me what am I doing wrong here.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 13, 2011 at 03:29 AM

    Hi Raja,

    You are displaying popup to confirm window, why you create another view( v_delete ). just create YES and No buttons

    in main view itself. it will work.

    Cheers,

    Kris.

    Add comment
    10|10000 characters needed characters exceeded