Event Raising Problem

Jody Chassereau drcakes at hotmail.com
Tue Feb 12 07:11:36 EST 2002


I am running a custom 4.6c workflow for transport proposals & am having an
event raise problem that is really puzzling me.  The scenario is: a
transport proposal gets routed and approved and then reaches a 'Wait for
Event' step where the event is 'IMPORTED'.  All this in the workflow works
fine.  I can manually raise the event & it continues as designed.
 
We then have a separate program that runs nightly to process our transports
importing into production.  It is here that we added functionality to raise
the event that the workflow is waiting for.  Here is the code for calling
SWE_EVENT_CREATE:
====================================================================
*     build the object key
      MOVE wa-sysname TO objkey.
      MOVE wa-formnumber TO objkey+10.
 
      WRITE:/ text-014, objkey.
 
      CALL FUNCTION 'SWE_EVENT_CREATE'
           EXPORTING
                objtype           = 'CTPROPOSAL'
                objkey            = objkey
                event             = 'IMPORTED'
           TABLES
                event_container   = event_container
           EXCEPTIONS
                objtype_not_found = 1
                OTHERS            = 2.
 
      IF sy-subrc <> 0.
        WRITE:/ text-016, sy-subrc.
      ENDIF.
==================================================================
 
Now the problem...  apparently when this program runs nightly, the events
are not getting triggered properly.  The workflows outstanding continue to
wait for the event and the event trace turned on shows it was not raised.
The write statements added does show that it comes through this code with
the right values and that the return code is 0 after the call.
 
If I have someone in our Basis group manually run this program, the events
show fine and everything works great.  When this import program runs as
scheduled under a user 'DDIC' (service user with SAP_ALL), no events.  Other
updates we have added such as status changes and action logs show fine.
 
We do have a COMMIT WORK later in the same section after a few other tables
are updated.  Any ideas on what may be missing here?  Does it point to an
authorization issue or a handling of committing the updates? I use this same
call in other programs, but obviously something is different here.  Any
additional import parameters necessary on this call for this?
 
Thanks in advance for any suggestions....
Jody Chassereau
drcakes at hotmail.com
 
 
_________________________________________________________________
Join the world s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
 


More information about the SAP-WUG mailing list