on 05-13-2010 4:17 PM
Hello experts,
I know that WDDOINIT is called automatically when a controller is initialized for the first time. Does this method ever get called again ?
I have added code in an exit button to close the current browser. When I click this button, it again runs the code in this Init method. Note that I have only one controller and one window. There is no further navigation. Why does the Init method get called again is what I am wondering!
Pls. advise. Thx, Liz
Hi liz,
WDDOINIT will trigger only once when the component initialize, and even when we talk about
view context it will only trigger. I wonder why your exit functionality is triggering the WDDOINIT
again, we have tried doin same but linked exit functionality to an action and it dosent seem calling
the WDDOINIT again. We kept break-point in WDDOINIT but it just triggers only once.
Regards and Best wishes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello everyone!
Thanks for your responses. My exit plug is working correctly.
This is more info on my View. It has an adobe form that has many dropdowns and input fields. There are some fields which get automatically populated based on entries made by the users. There are several internal tables getting populated in the WDDOINIT method. I have a 'Submit Button' which when clicked should close the browser, retrieve data in the Context and do processing in SAP.
I have been testing and this is what I have found. I kept a breakpoint in the Init method and its not being called now (So maybe I should start a new thread for this!). But when I click on the submit button, I get a 'Wait' symbol for a very long time and then the Connection timed out error comes up.
I commented the population of some internal tables. Obviously some fields dint work. But when I tested by clicking this button, it worked. The browser got closed and processing in SAP was done too.
I am working with a fairly large data. 2-3 of the internal tables (that I commented) have 2000-3000 records. Is there is restriction on how much data the WDN can handle? I am stuck now because even though all codes are correct, the wdn is not able to handle the data.
Any suggestions ? appreciate all your help! Liz
I don't know exactally why it's happening with you. But you can check how to create the Exit plug and compare your functionality with this.
1) Create a Outbound plug say EXIT_PLUG (plug type - Exit) in your window and pass the Importing parameter for EXIT_PLUG as CLOSE_WINDOW type BOOLEAN. Ensure that you have checked the interface property of the Exit plug.
2) Write this code in your action event to fire the Exit plug:
DATA: lo_view_cntr TYPE REF TO if_wd_view_controller.
DATA: lo_win_cntr TYPE REF TO if_wd_window_controller.
DATA: ls_parameter TYPE wdr_event_parameter.
DATA: lt_parameter TYPE wdr_event_parameter_list.
DATA: lv_value TYPE REF TO data.
FIELD-SYMBOLS <fs> TYPE ANY.
Get the embedding Window Controller instance of the view
lo_view_cntr = wd_this->wd_get_api( ).
lo_win_cntr = lo_view_cntr->get_embedding_window_ctlr( ).
Insert the parameters for the exit plug
ls_parameter-name ='CLOSE_WINDOW'.
CREATE DATA lv_value TYPE c.
ASSIGN lv_value->* TO <fs>.
<fs> = 'X'.
ls_parameter-value = lv_value.
INSERT ls_parameter INTO TABLE lt_parameter.
Fire the exit plug
lo_win_cntr->if_wd_view_controller~fire_plug( EXPORTING
plug_name = 'EXIT_PLUG' parameters = lt_parameter ).
Hope it helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.