Skip to Content
avatar image
Former Member

How to pass data of a multipane in a popup to a view

I`m new in wd4 abap.

I try to do a view with a botton. this botton open a popup with a multipane. this multipane has the days of the current month and a check box to select the day. I fill this with a suplly function.

I have de same context in the controller, in the view and the view of the popup.

I try to select all the day with a botton in the view.

I write this in the action select_all

DATA lo_nd_dia3 TYPE REF TO if_wd_context_node.

DATA lo_el_dia3 TYPE REF TO if_wd_context_element.

DATA lt_dia3 TYPE STANDARD TABLE OF wd_this->element_dia3.

DATA ls_dia3 TYPE wd_this->element_dia3.

lo_nd_dia3 = wd_context->get_child_node( name = wd_this->wdctx_dia3 ).

lo_nd_dia3->get_static_attributes_table( IMPORTING table = lt_dia3 ).

LOOP AT lt_dia3 INTO ls_dia3.

IF ls_dia3-enable = 'X'.

ls_dia3-selected = 'X'.

  • lo_nd_dia3->set_static_attributes( ls_dia3 ).

MODIFY lt_dia3 FROM ls_dia3.

ENDIF.

ENDLOOP.

lo_nd_dia3->bind_table(

new_items = lt_dia3

set_initial_elements = abap_true ).

but when I press the buttton Ok of popup, in the view dont retorn the table in the action ok_popup.

DATA lo_nd_dia3 TYPE REF TO if_wd_context_node.

DATA lo_el_dia3 TYPE REF TO if_wd_context_element.

DATA lt_dia3 TYPE STANDARD TABLE OF wd_this->element_dia3.

DATA ls_dia3 TYPE wd_this->element_dia3.

  • navigate from <CONTEXT> to <DIA2> via lead selection

lo_nd_dia3 = wd_context->get_child_node( name = wd_this->wdctx_dia3 ).

lo_nd_dia3->get_static_attributes_table( IMPORTING table = lt_dia3 ).

Thanks in advance and excuse for my English

Yolanda

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Jun 19, 2009 at 09:55 AM

    yes, they have the same contex.

    Now I try to create a context in then window of the popup, and modify the views, assigning this other context.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Please brief out your steps how u have constructed, I have assumed the following steps you have followed.

      1. Created a Context in the Comp Controller for the table ( Cardinlity 0: n ).

      2. Created a separate View for the multipane and mapped the same context from the Comp Controller and embedded in a separate Window for the POP up .

      3. Created a main view with button and called the POP up window as pop up,

      4 . Now as the POP up View having Multipane UI element it has to generate the Number of elements based upon the rows in the Table Context created in the First step.

      5.Now after the POP up closed then try to read the Comp controller Context, then u will be getting entire table ,

      Let me know whether u have followed the same steps

      Regards

      Vikranth

  • avatar image
    Former Member
    Jun 19, 2009 at 09:43 AM

    Hi,

    Have u done the Binding from Component Controller to the View Context, irrespective of the UI elements , the Context contains the same data between Comp Controller Context and View Context if binded .

    Regards

    Vikranth

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 19, 2009 at 10:27 AM

    yes, i do all this steeps

    1 - In the controler i defined a node with atributes.

    2 - after I create a view,with a botton to open a popup, this view has in the context mapped then nodo create in the step 1

    3 - i create the 2on view for the popup and mapped to the node create in the steep 1

    4 - create a window with a embeded view , step 3.

    5 when push the botton "select all" the table has the correct values and bind the table.

    6 when push the botton "ok" , return at the view create in the steep 1, and when read the context it`s empty.

    regards

    Yolanda

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi

      I want to confirm the Select all and the ok button are in the same view of the pop view or the calling view

      Regards

      Vikranth

  • avatar image
    Former Member
    Jun 19, 2009 at 11:48 AM

    hi,

    the button "select all" and "ok" are in the popup.

    the button ok are declareted in the first view

    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.

    data: lr_view_controller type ref to if_wd_view_controller.

    lr_view_controller = wd_this->wd_get_api( ).

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

    message_display_mode = if_wd_window=>co_msg_display_mode_selected

    button_kind = if_wd_window=>CO_BUTTONS_OKCANCEL

    message_type = if_wd_window=>co_msg_type_none

    default_button = if_wd_window=>co_button_ok

    ).

    lo_window->subscribe_to_button_event(

    button = if_wd_window=>co_button_ok

    action_name = 'OK_POPUP'

    action_view = lr_view_controller ).

    and the button select all are declarated with a UI element type button in the popup

    the code are in the beginning of the message

    Regards

    Yolanda

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      i think ur Select all clearing the values , try close the POP up using OK button without clicking the Select ALL and see the context values.

      Regards

      Vikranth

  • avatar image
    Former Member
    Jul 06, 2009 at 01:05 PM

    thanks for your help.

    At the end, creating a context for the window that containing the data for the multipane and then mapping it to the views.

    Now it works well

    thanks again

    Edited by: Yolanda Meca Gonzalez on Jul 6, 2009 3:06 PM

    Add comment
    10|10000 characters needed characters exceeded