Hi Harsha,
Sure, code is bellow.
What I am trying to do is passing the item number from the parameter which includes this detail.
And then add a text error message to each item number from the parameter structure.
METHOD display_errors_pop_up .
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,
ls_text TYPE string_table.
l_cmp_api = wd_this->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
INSERT ` Scope contains errors and cannot be requested.` INTO TABLE l_text.
LOOP AT im_item_no-item_int INTO ls_text.
APPEND l_text TO ls_text.
ENDLOOP.
l_popup = l_window_manager->create_popup_to_confirm(
text = ls_text
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_question
window_title = 'Item errors'
window_position = if_wd_window=>co_center ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
action_name = 'ACT_OK'
action_view = im_view_api
is_default_button = abap_true ).
l_popup->open( ).
ENDMETHOD.