cancel
Showing results for 
Search instead for 
Did you mean: 

Default importing parameters in Event handler

naresh_bammidi
Contributor
0 Kudos

Hi All,

What are all the default importing parameters for the event handler method instead of WDEVENT? I have seen some handler methods which is having ID as an importing parameter.I tried to find out all default parameters,but couldn't succeed.Can any one please tell me the way to find out the default  parameters.

Thanks

Naresh Bammidi

Accepted Solutions (1)

Accepted Solutions (1)

former_member184578
Active Contributor
0 Kudos

Hi,

Those are not default parameters. They are mandatory parameters which will be created automatically. Each event handler method of view is automatically known to parameter WDEVENT of type CL_WD_CUSTOM_EVENT.

Not only ID & WDEVENT are default(mandatory ) parameters. It depends on the Event for which you are creating Event handler.

Lets take ON_CLICK event of ALV. When you create event handler for ON_CLICK event of ALV, automatically R_PARAM parameter will be created.

Here R_PARAM is the mandatory parameter of ON_CLICK event. You can see the same in the Component SALV_WD_TABLE.

Web Dynpro Framework automatically creates the mandatory parameters for the Event.

Hence we cannot say what are all the parameters created by default. It depends on the Event which you are using.

Hope this helps u.,

Regards,

Kiran

Former Member
0 Kudos

Kiran,

Thanks for detail explanation.

The event you mentioned for ALV is the event handled within re-usable component SALV_WD_TABLE.  As documentation saysmandatory parameters are ID,CONTEXT_ELEMENT and WDEVENT for standard UI elements.  Please correct me if I am wrong.

I am not sure about context of the question, whether it is related to the standard UI elements or all events.

Regards, Vinod

P.S: My bad, the same statement hold true for standard UI elements also ( just checked OnSelect Event of RadioButtonGroupByIndex which created with additional importing parameter INDEX).

Message was edited by: Vinod Kumar

former_member184578
Active Contributor
0 Kudos

Hi,

I think the OP is asking about all the parameters which are created by default. And yes it applies to standard UI elements too.

Regards,

Kiran.

Former Member
0 Kudos

Hi,

For Standard UI elements, additional event handler parameters(other than ID, CONTEXT_ELEMENT, WDEVENT) are stored in the table WDY_UI_EVPAR_DEF. 

For Eg, object type RadioButtonGroupByIndex element type hold one entry in the above table for event name OnSelect with Parameter Name INDEX type I

Regards, Vinod

naresh_bammidi
Contributor
0 Kudos

Yes,Parameters are depends on the event of the UI element.I have tried with two different UI elements Button and Date Navigator.For the Button event is ON_ACTION and for date navigator the event is ON_DAY_SELECT.In case of Date navigator one more parameter is there that is DAY.But to get to Know all the parameters i make use of Parameter from UI Event option from Actions .Which gives all the possible parameters of particular event handler method.

Thanks for your contribution and @vinod_kumar

Thanks

Naresh Bammidi

Former Member
0 Kudos

Naresh,

As mentioned in my earlier post, if you pass DEFINITION_NAME = 'DATE_NAVIGATOR' to the table mentioned above, you will get the additional parameters for event handlers associated with element type.

Regards, Vinod

naresh_bammidi
Contributor
0 Kudos

Vinod,

As you said i have been passed the UI element name to the table.I could find the parameter DAY but no where i found paremeters ID and CONTEXT_ELEMENT.

Thanks

Naresh

Former Member
0 Kudos

Naresh,

As mentioned earlier General Information About Methods and Properties of UI Elements (SAP Library - Web Dynpro ABAP) ID, CONTEXT_ELEMENT,WDEVENT are standard parameters.  The above table will show the additional parameters.

Regards, Vinod

Answers (1)

Answers (1)

Former Member
0 Kudos

Default importing parameters are ID & CONTEXT_ELEMENT alongwith instance of class CL_WD_CUSTOM_EVENT (which will be created automatically when checkbox Transfer UI Event parameters is selected while creating an action).  See General Information About Methods and Properties of UI Elements (SAP Library - Web Dynpro ABAP) for reference.

Custom parameters can be added in the parameter table of application defined class instance, which can be accessed by GET_DATA method.  See Parameter Mapping (SAP Library - Web Dynpro ABAP) for more information.

Regards, Vinod