cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Calling Event

Former Member
0 Likes
755

Hi Experts,

I have a simple question.

I'm having a event which is bounded with a inputfield.

I want to call this event in the wddoinit.

When i used code wizard, it prompts me to give WDEVENT.

How can i call a event in the wddoinit.

Thnx,

Suba

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Suba,

I guess you are talking about specifying an action for an event of a UI element. And it is this action (or event handler) that you want to call from WDDOINIT using code wizard.

For example for InputField we have one predefined event onEnter. For this event you can specify an action say GO which will act as the event handler (ONACTIONGO). Event handlers can be viewed in the METHODS tab.

Event Action Event Handler

onEnter GO ONACTIONGO

Use following code to call this event handler explicitly from WDDOINIT:

DATA : zcustom_event TYPE REF TO cl_wd_custom_event.

CREATE OBJECT zcustom_event

EXPORTING

name = 'ON_ACTION'.

wd_this->onactiongo(

wdevent = zcustom_event

).

Regards,

Chitrali

Answers (3)

Answers (3)

Former Member
0 Likes

hi suba ram....

all you want to do is ... calling the coding part of that event, righ. then what you can do is... create a method that has the coding. so you can call this method from wddoitint method as well as from the event.

---regards,

alex b justin

Former Member
0 Likes

Hi Suba,

Create a local variable lr_wd_event type ref to that of the import parameter WDEVENT and pass it to the action handler.

This should do.

Regards,

Sravan Varagani

Former Member
0 Likes

Hi,

You don't invoke the event in the wddoinit method, because you can't get the event object in the wddoint method. Try to other way in the inbound method.

Best regards,

tao

Edited by: wang tao on Apr 16, 2008 6:01 AM