on 12-23-2009 8:40 AM
Hi ,
I have an ALV and link to action on a particular filed for every row of an ALV .
When click on link to action , then i need to display a same POPUP for every row.
Now , my problem is
when I am clicking on Link to action I am getting Short dump saying that
' Instance of the view POPUP_TASK_UPDATE already exists in component.
What may be the reason is ?
cheers,
srak.
hi
avoid any of these :
1 in a component which already One view say VIEW , u r creating the other view with same name
2 for ur view in component with the name layout u try to add the component usage with the
same name, what are the names of your views in the application .
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lekha,
Thanks for your responce.
The POPUP is not an ALV.
Here is the Code for On Click Event ( Link to Action ) :::
DATA lo_nd_task TYPE REF TO if_wd_context_node.
DATA lo_el_task TYPE REF TO if_wd_context_element.
DATA ls_task TYPE wd_this->element_task.
navigate from <CONTEXT> to <TASK> via lead selection
lo_nd_task = wd_context->get_child_node( name = wd_this->wdctx_task ).
get element via lead selection
lo_el_task = lo_nd_task->get_element( ).
CALL METHOD lo_nd_task->get_static_attributes
EXPORTING
index = r_param->index
IMPORTING
static_attributes = ls_task.
**----
DATA lo_nd_task_disp_info TYPE REF TO if_wd_context_node.
DATA lo_el_task_disp_info TYPE REF TO if_wd_context_element.
DATA ls_task_disp_info TYPE wd_this->element_task_disp_info.
navigate from <CONTEXT> to <TASK_DISP_INFO> via lead selection
lo_nd_task_disp_info = wd_context->get_child_node( name = wd_this->wdctx_task_disp_info ).
get element via lead selection
lo_el_task_disp_info = lo_nd_task_disp_info->get_element( ).
CLEAR ls_task_disp_info.
MOVE-CORRESPONDING ls_task TO ls_task_disp_info.
CALL METHOD lo_nd_task_disp_info->set_static_attributes
EXPORTING
index = USE_LEAD_SELECTION
static_attributes = ls_task_disp_info
.
*----
DATA lo_api TYPE REF TO if_wd_view_controller.
DATA lo_window_ctlr TYPE REF TO if_wd_window_controller.
DATA lo_popup TYPE REF TO if_wd_window.
lo_api = wd_this->wd_get_api( ).
lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).
lo_popup = lo_window_ctlr->get_window( ).
IF lo_popup IS BOUND.
lo_popup->close( ).
ENDIF.
*----
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.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'POPUP_TASK_UPDATE'
title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
).
lo_window->open( ).
Cheers,
sravan.
One last question, view that you are trying to display is in the same component...
If yes, is it in the same window where the ALV views are also there..
If yes, then this will go for a dump..as stated..
Do one thing..Create one more window inside this embed the view that you want to show it in popup...
Ans show this popup as Modal window by passing the window name..
Is this clear.
Regards,
Lekha.
Hi Sravan,
Firstly check for any existing popup and if exist close that popup.
DATA lo_api TYPE REF TO if_wd_view_controller.
DATA lo_window_ctlr TYPE REF TO if_wd_window_controller.
DATA lo_popup TYPE REF TO if_wd_window.
lo_api = wd_this->wd_get_api( ).
lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).
lo_popup = lo_window_ctlr->get_window( ).
IF lo_popup IS BOUND.
lo_popup->close( ).
ENDIF.
Write that code before creating popup.
Hope this will resolve the defect.
Nawal Kishor Mittal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.