AW: Help with triggering event

Zinnecker, Albin, MK A.Zinnecker at gewkoelnag.de
Wed May 16 04:42:38 EDT 2001


Hi Menand,
 
reading the code attached to your mail I recognized that you obviously
forgot the COMMIT WORK after the function module ist called. If you =
want to
trigger an event by using SWE_EVENT_CREATE always write COMMIT WORK =
after
the function call.
 
Regards,
 
Albin Zinnecker
 
management|service, MK=20
GEW K=F6ln AG, Parkg=FCrtel 24, 50823 K=F6ln
 
E-Mail a.zinnecker at gewkoelnag.de=20
Telefon +49 221 178 2622
Fax +49 221 178 82622
 
 
> -----Urspr=FCngliche Nachricht-----
> Von:  Odedra, Menand [SMTP:MOdedra at krafteurope.com]
> Gesendet am:  Mittwoch, 16. Mai 2001 09:59
> An:   SAP-WUG at MITVMA.MIT.EDU
> Betreff:      Help with triggering event
>=20
> Hello All
>=20
> I`m attempting to trigger a workflow using a triggering event.
>=20
> I`ve defined the event 'ZCREATE' as an event of my object type
> 'Z_PA22_OBJ'.
> I`ve got a screen that simply raises the event using =
SWE_EVENT_CREATE.
> When
> I go into the code in debug mode I always get an sy-subrc =3D 0.
> However the workflow is not kicked off.
>=20
> I`ve attached the code I`m using to the bottom of this message.
> Any help with this would be much appreciated.
>=20
>=20
> SELECT MAX( PA22_NO ) FROM ZPA22HDR INTO PA22_NO.
> IF SY-SUBRC =3D 0.
>   ZPA22HDR-PA22_NO =3D PA22_NO + 1.
> ELSE.
>   ZPA22HDR-PA22_NO =3D 1.
> ENDIF.
>=20
> CASE OKCODE.
>   WHEN 'DONE'.
>     CALL FUNCTION 'SWE_EVENT_CREATE'
>          EXPORTING
>               OBJTYPE                 =3D 'Z_PA22_OBJ'
>               OBJKEY                  =3D 'PA22_NO'
>               EVENT                   =3D 'ZCREATE'.
> *             CREATOR                 =3D ' '
> *             TAKE_WORKITEM_REQUESTER =3D ' '
> *             START_WITH_DELAY        =3D ' '
> *             START_RECFB_SYNCHRON    =3D ' '
> *             NO_COMMIT_FOR_QUEUE     =3D ' '
> *             DEBUG_FLAG              =3D ' '
> *             NO_LOGGING              =3D ' '
> *             IDENT                   =3D
> *        IMPORTING
> *             EVENT_ID                =3D
> *        TABLES
> *             EVENT_CONTAINER         =3D
> *        EXCEPTIONS
> *             OBJTYPE_NOT_FOUND       =3D 1
> *             OTHERS                  =3D 2
>=20
> IF SY-SUBRC =3D 0.
>   SET SCREEN 0.
>   LEAVE SCREEN.
> ENDIF.
>=20
>=20
> Regards
>=20
> Menand Odedra
> Kraft Foods UK
> Analyst Programmer (Supply Chain)
> email: modedra at krafteurope.com
> Tel: 01242 28 4748
 


More information about the SAP-WUG mailing list