Skip to Content
0
Former Member
Jul 31, 2006 at 05:41 AM

ABAP OO Event Problem

59 Views

Hi,

I read the blog posted by Jocelyn Dart-<b><i>Raising ABAP OO Events for Workflow</i></b>...

<b>/people/jocelyn.dart/blog/2006/07/27/raising-abap-oo-events-for-workflow

When I tried the same using my own Class, I am getting some problem.

Well, I created my Class with two Attributes

1) <i>M_POR</i>(Persistent Object Reference Attribute)

2) <i>PERNR</i>(Employee Number)

And I created a Constructor with one parameter.

And I also coded the remaining standard methods as per that blog - <b><i>USING ABAP OO Methods in Workflow Tasks</i></b>.

Finally I activated my CLASS and each individual method.

I created one small report that raises ABAP OO Event as mentioned in the blog with the below mentioned code.

<i>report yworkflowtrigger_ooabap.

data : ls_ywftest1_key type p_pernr,

lv_objtype type sibftypeid,

lv_event type sibfevent,

lv_objkey type sibfinstid,

lr_event_parameters type ref to if_swf_ifs_parameter_container,

lv_param_name type swfdname,

lv_visit_date type datum.

lv_objtype = 'YWFTEST1'.

lv_event = 'STARTEVENT'.

  • Set up the LPOR Instance id

ls_ywftest1_key = '00000024'.

move ls_ywftest1_key to lv_objkey.

try.

call method cl_swf_evt_event=>raise

exporting

im_objcateg = cl_swf_evt_event=>mc_objcateg_cl

im_objtype = lv_objtype

im_event = lv_event

im_objkey = lv_objkey

  • IM_EVENT_CONTAINER =

.

catch cx_swf_evt_invalid_objtype .

catch cx_swf_evt_invalid_event .

endtry.</i>

I switched on my event trace and tried raising the Event. But event is not raised even after execution of this code. I checked the SY-SUBRC value at the ENDTRY, But this seems perfect(SY-SUBRC = 0).

Why is my event not getting triggered even after the execution of above code?

Is there anything which I have missed.

We are on <b>ECC 5.0</b>

Regards,

<i><b>Raja Sekhar</b></i>