Help with triggering event

Odedra, Menand MOdedra at krafteurope.com
Wed May 16 03:58:48 EDT 2001


Hello All
 
I`m attempting to trigger a workflow using a triggering event.
 
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 = 0.
However the workflow is not kicked off.
 
I`ve attached the code I`m using to the bottom of this message.
Any help with this would be much appreciated.
 
 
SELECT MAX( PA22_NO ) FROM ZPA22HDR INTO PA22_NO.
IF SY-SUBRC = 0.
  ZPA22HDR-PA22_NO = PA22_NO + 1.
ELSE.
  ZPA22HDR-PA22_NO = 1.
ENDIF.
 
CASE OKCODE.
  WHEN 'DONE'.
    CALL FUNCTION 'SWE_EVENT_CREATE'
         EXPORTING
              OBJTYPE                 = 'Z_PA22_OBJ'
              OBJKEY                  = 'PA22_NO'
              EVENT                   = 'ZCREATE'.
*             CREATOR                 = ' '
*             TAKE_WORKITEM_REQUESTER = ' '
*             START_WITH_DELAY        = ' '
*             START_RECFB_SYNCHRON    = ' '
*             NO_COMMIT_FOR_QUEUE     = ' '
*             DEBUG_FLAG              = ' '
*             NO_LOGGING              = ' '
*             IDENT                   =
*        IMPORTING
*             EVENT_ID                =
*        TABLES
*             EVENT_CONTAINER         =
*        EXCEPTIONS
*             OBJTYPE_NOT_FOUND       = 1
*             OTHERS                  = 2
 
IF SY-SUBRC = 0.
  SET SCREEN 0.
  LEAVE SCREEN.
ENDIF.
 
 
Regards
 
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