cancel
Showing results for 
Search instead for 
Did you mean: 

ALV table in POPUP via ALV table

Former Member
0 Kudos

Hello Friends,

I have a requirement where i double click on one line item in an ALV table, considering the parameters in the selected line item, it should provide me the details in a POPUP which again should be an ALV view. Please suggest.

Thanks,

Suri

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Suri.

You should use a LinkToAction in one column of your ALV. When a user clicks it you can popup the window. Double Click is not provided in the ALV.

To get more info just search this forum on 'ALV LinkToAction' and 'popup'

Cheers,

Sascha

Former Member
0 Kudos

To extend Sasha's answer, heres a very brief method.

You can use LinktoAction or just select a Row in the Main table.

If u select a Row, u can get the Element Attributes through the Nodes Lead Selection.

Declare 2 usages of the ALV Component, ALV_main and ALV_popup.

Create a View normally for the pop up ALV where you need the deails .

Embed the Pop up view inside a Window

In the Event Handler for Interface Event On_LeadSelect for the Main ALV, Instantiate the Pop up ALV Component, ALV_PopUp, and call the modal Window

For filtering on the Record selected, you can use the Lead selection of the Main ALV Node, to get the attributes slected by the User.

The modal window for the pop up can be called using the Get_Window_Manager method of IF_WD_COMPONENT.

Former Member
0 Kudos

Thanks Anand and Sascha,

Anand - I would really appreciate if you can point me to any standard demo example or if there is any sample code available.

Thanks,

Suri

Former Member
0 Kudos

I dont think there is any example of Calling ALV from ALV...

But its normal as calling any other component in a pop up from ALV.

Only thing is u need to different component usages of the same ALV Component

SALV_WD_TABLE.

Heres a sample code.......this is just sample

1) Declare a method in the MAIN VIEW as event handler for On_Lead_Select interface event of the ALV main Table

2) Select a row in main ALV table tos ee details. Retrive the selected row in the event handler declared in 1) and get the Atrribute by which the details is to be filtered and shown

data Node_AlvMain type ref to IF_WD_CONTEXT_NODE.

Node_AlvMain = wd_Context->GET_CHILD_NODE( 'AlvMain' )

Node_AlvMain->GET_ATTRIBUTE

Exporting

Name = 'Attr1'

Importing

Value = Value_for_Filter .

3) Instantiate the POP Up ALV

data l_pop_alv type ref to if_wd_component_usage.

l_pop_alv = wd_this->get_CpUse_Alv_Popup( ).

if l_pop_alv->hasActiveComponent( ) is initial.

l_pop_alv->create_Component( ).

endif.

4) Get the Pop Up Alv Model thru its interface controller

ref_ifc_ctr_alv_popup = wd_this->Get_Cpifc_Alv_Popup( ).

m_popup_model = ref_ifc_ctr_alv_popup->GET_MODEL( ).

CREATE THE POP UP VIEW AND EMBED IT INSIDE A WINDOW

5) Filter the pop up details data in m_popup_model from the filter obtained in 2) above

5) Call the Window that embeds the Pop up ALV view

data ref_comp_ctr type ref to if_wd_controller

data ref_win_man type ref to if_wd_window_manager

data ref_win type ref to if_wd_window

ref_comp_ctr ?= wd_this->wd_get_api( ).

ref_comp = ref_comp_ctr->get_component( ).

ref_win_man = ref_comp->GET_WINDOW_MANAGER( ).

ref_win = ref_win_man->CREATE_WINDOW(

window name = 'NAME OF WINDOW WHICH EMBEDS THE ALV POPUP VIEW

View = cureent view controller)

ref_win->open( ).