cancel
Showing results for 
Search instead for 
Did you mean: 

Pass parameters to application - handledefault is not being called

Former Member
0 Kudos

Hi ABAP Webdynpro Gurus,

I want to pass parameters to my ABAP Webdynpro application. The steps i have taken to make it happen are as below.

1) I have one Window in my application and i have defined 4 parameters for the HANDLEDEFAULT method which is method for the default inbound plug DEFAULT that is marked as interface startup plug.

2) I have defined a node (CONTENT) in Windows context with four attributes to hold incoming application parameters.

3) I have implemented HANDLEDEFAULT as below to update the Windows context with app params.

********************

data lr_node type ref to if_wd_context_node.

data ls_content type if_zw_disp_form=>element_content.

  • get parameter values

ls_content-im_form_scnr = im_form_scnr.

ls_content-im_form_scnr_vers = im_form_scnr_vers.

ls_content-im_step_guid = im_step_guid.

ls_content-im_wi_id = im_wi_id.

  • get reference to context node

lr_node = wd_context->get_child_node( 'CONTENT' ).

  • bind element data

lr_node->bind_element( new_item = ls_content ).

*********************

4) The only view i have for my application is MAIN. I am using Windows controller as one of the controllers for this view.

5) I have defined four parameters for application with default values for them.

Everything seems to be in order to me, but when i start my application, HANDLEDEFAULT method of Window in my application is not being called (I tried setting a breakpoint, it does not stop therE).

Since the HANDLEDEFAULT method is not called, Windows context is not update, and i am unable to use these parameters inside my application.

Any ideas what could i be missing?

Appreciate your help,

Saurabh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for your response. As you said, WDDOINIT is called before HANDLEDEFAULT which i didn't know and hence ran into problems.

Saurabh

Former Member
0 Kudos

Hi Saurabh,

HandleDefault Method will definitely Called, try Using External Breakpoint.

and Also Note the Sequence in which Methods will Called.

1. WDDOINIT of Window

2. WDDOINIT of View

3. HANDLEDEFAULT of Window

If you are trying to use the parameters in WDDOINIT of View

then you will not able to use it as it is getting called later.