on 03-06-2014 7:31 AM
Hi Experts..
I am trying to raise an event which is defined in a Class(which is not my assistance class) in my WD comp.
I clicked on Pattern and selected option Raise event, I gave the class name and selected the event which should raise.
But I am getting an error.
CL_<VIEW NAME>_CTR does not have an event.
Thanks,
Pradeep.
Hi Haridas, In order to raise an class event in webDynpro ABAP, call the class method which imports the events ( type SIBFEVENT ) listed in the class event tab. Eg call method zcl_demo=>RAISE_EVENT EXPORTING i_event = 'DEMO_EVT'. Thanks, Chaitanya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pradeep,
It is not possible to raise the event of a class inside webdynpro method directly.
Instead, you need to have a method RAISE_EVENT in a class and the method should contain the logic to raise an event of its own class. Now, call the method RAISE_EVENT( ), and it fires the event.
Example:
Class: ycl_test_events.
Event : DATA_CHANGED
Public Method: raise_event( )
Method raise_event.
raise event data_changed.
endmethod.
Now, call the method in Webdynpro methods
data lo_test_events type ref to ycl_test_events.
create object lo_test_events.
lo_test_events->raise_event( ).
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.