AW: Event Raising Problem

Seiz, Gert gert.seiz at sap.com
Tue Feb 12 07:21:52 EST 2002


Hy Jody,
you forgot the commit work statement at the end of the program
Regards Gert
 
-----Urspr=FCngliche Nachricht-----
Von: Jody Chassereau [mailto:drcakes at hotmail.com]
Gesendet: Dienstag, 12. Februar 2002 13:12
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Event Raising Problem
 
 
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:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
*     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           =3D 'CTPROPOSAL'
                objkey            =3D objkey
                event             =3D 'IMPORTED'
           TABLES
                event_container   =3D event_container
           EXCEPTIONS
                objtype_not_found =3D 1
                OTHERS            =3D 2.
 
      IF sy-subrc <> 0.
        WRITE:/ text-016, sy-subrc.
      ENDIF.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
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