cancel
Showing results for 
Search instead for 
Did you mean: 

Popup and buttons?

former_member202077
Participant
0 Kudos

Hello

I am successfully throwing a popup to the user (my_popup has YES, NO and CANCEL buttons), with the below code, but, i want to subscribe some actions to these 3 buttons, so i got the SAP help link

[http://help.sap.com/saphelp_rc10/helpdata/en/43/bccdcfe326332ee10000000a11466f/content.htm]


* Navigate from <CONTEXT> to <ERROR_MESSAGE> via lead selection
        lo_nd_popup_table = wd_context->get_child_node( name = wd_this->wdctx_my_table ).
* Get element via lead selection
        lo_el_popup_table = lo_nd_popup_table->get_element( ).
* Set table attribute
        lo_nd_popup_table->bind_table( new_items = it_my_itab_table ).
 
        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 = 'POPUP1'
        title = 'Below lines are ifirst category tems!'
        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( ).
* Close the window
        lo_window->close( ).

from the link, pls. let me know but, i do not understand,

1) Where i should put my code for each action? do i need to go to directly to METHODS tab of the view and i hv to append a new method on the list and putting my code there? for example. my_action_yes_method? if so, is it a event handler (or) a method, or Supply function which i shuld select from the drop-down?

2) Seems its asking to put my code in WDDOINIT method, but, how can differentiate my piece of code depending on pressed button/action, in normal prog. i will write like below,


IF user_action = 'YES'.
my code here.
ENDIF.

IF user_action = 'NO'.
my code here.
ENDIF.

Accepted Solutions (1)

Accepted Solutions (1)

Aisurya
Participant
0 Kudos

Hello Dear ,

Just follow my below article , i think WDDOMODIFYVIEW comes into picture.

[Step by Step Guide for using 'SUBSCRIBE_to_button_Event' Method of a pop-up Window in WebDynpro ABAP|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/80f4114d-00a3-2e10-58ae-ea699d11c867]

I think it may help you...

Thanks

Aisurya

Answers (0)