cancel
Showing results for 
Search instead for 
Did you mean: 

data from table to popup

Former Member
0 Kudos

hello experts,

i defined a popup window like this:

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 = 'POP_AENDERN_DATENSET'

  • 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( ).

I have a table and when i click on an edit button it opens this popup. My Problem is that i need data from

the selected line in the table to edit it in the popup and write it back to the table.

I don´t have a clue how to realize this. The Data is only saved in context and not in a table.

Do you have a hint how to forward the data i need to the popup ??

Thanks and best regards

René

Accepted Solutions (1)

Accepted Solutions (1)

rainer_liebisch
Contributor
0 Kudos

Hello Rene,

store the needed data in a context node and map it via componentcontroller to the context of the view in your popup window.

That's the way data can be spread to all views of your component.

Regards,

Rainer

Answers (2)

Answers (2)

uday_gubbala2
Active Contributor
0 Kudos

Hi Rene,

I guess that your main problem now is in understanding how to share data in between your main view and your popup window. Rainer has already clearly explained the solution for the same but you can go through this [example|http://saptechnical.com/Tutorials/WebDynproABAP/Modalbox/page1.htm] for a better picture. It explains how to navigate and transfer data from main window to the modal pop up and again back from the popup to the main window through step-by-step screen snapshots. Hope it helps make you comfortable with the concept.

Regards,

Uday

Former Member
0 Kudos

okay thanks for your answers.

I got the data now where it should be ;).

But how can i now edit the table line. Does the lead_selection still know where it is ?

best regards

René

Edited by: René Hölterling on Oct 16, 2008 3:57 PM

Former Member
0 Kudos

Use this method to get the index of lead selection.

GET_LEAD_SELECTION_INDEX

Once you have the index you can modify ur internal table which is bound to the table control.

0 Kudos

HI,

I think u r having the initial lead selection as 'yes' in your Node. If that was the case, if u read that node using code wizard then automatically the line which u was selected will be there in ur static attributes. If u r having that node as Global then it will get the values in Pop-up view also...from that static attributes bind it to the corresponding fields of the Pop-Up View.

Regards,

Ganesh.