on 10-23-2012 6:32 AM
hi,
My requirement is to use a popup for confirmation for the saving the data in the table with the button OK and Cancel and i want to use just one view for manual entry in the input fields. Is there any way out to use only one view and develop an web dynpro application.
Help me..
Regards
ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi gagan,
thanks for your prompt reply,
i have done accordingly but on clicking on the buttons its not triggering the action SAVE to the database table.
Code written for pop up is:
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( ).
data: lt_string type table of string,
ls_string like line of lt_string.
ls_string = 'Do You Want To SAVE?'.
insert ls_string into table lt_string.
CALL METHOD lo_window_manager->create_popup_to_confirm
EXPORTING
text = lt_string
button_kind = 3
RECEIVING
RESULT = lo_window.
and the code for the action on the buttons of popup is:
data:
lo_api type ref to if_wd_view_controller,
lo_window_ctlr type ref to if_wd_window_controller,
lo_popup type ref to if_wd_window.
lo_api = wd_this->wd_get_api( ).
lo_window_ctlr = lo_api->get_embedding_window_ctlr( ).
if lo_window_ctlr is bound.
lo_popup = lo_window_ctlr->get_window( ).
if lo_popup is bound.
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'SAVE_INPUT'
action_view = lo_api ).
lo_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'EXIT'
action_view = lo_api ).
endif.
endif.
and when i used the debugger it doesn't enter into the "if lo_popup is bound" ie the values are not going in the database.
Hi Ankit,
In the example component WDR_TEST_POPUP_TO_CONFIRM, take a look at View MAIN method onactiondisplay_popup to see how that application handles the call to method create_popup_to_confirm and how it handles calls to method subscribe_to_button_event.
The method onactiondisplay_popup receives an object from the call to create_popup_to_confirm and stores it in view attribute wd_this->popup. It is this object that is used in the button event subscriptions. If you use this same approach I think you'll find a solution.
I believe the problem you are having is that the popup you create with create_popup_to_confirm and the window you read with lo_window_ctlr->get_window are not the same object.
Cheers,
Amy
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.