Skip to Content
avatar image
Former Member

data from table to popup

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é

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Oct 16, 2008 at 11:13 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 16, 2008 at 12:07 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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.

  • avatar image
    Former Member
    Oct 16, 2008 at 11:22 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded