Debugging in workflow

Kevin Yu kevin.yu at its.monash.edu.au
Sun Jul 21 21:35:28 EDT 2002


Jocelyn,
 
How to buy this book?
 
Regards,
 
Kevin.
 
 
"Dart, Jocelyn" wrote:
>
> By the way folks,
> We have a whole chapter on debugging workflow in the workflow book...
> Watch for a formal announcement soon but I understand Barnes and Noble
> already have the book on their site - the name of the book is
> "Practical Workflow for SAP". (Oh, and they are only showing one of the
> authors - there's actually 4 of us involved).
> Regards,
> Jocelyn Dart
> SAP Australia (SRM, EBP, Workflow)
> Ph: +61 412 390 267
> e-mail: jocelyn.dart at sap.com
>
> -----Original Message-----
>> From: Talbot, Brent [mailto:Brent.Talbot at airnz.co.nz]
> Sent: Thursday, 18 July 2002 6:05 AM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Debugging in workflow
>
> Hi Kevin,
> Debugging workflows can be a bit of a challenge. I am not sure I know all
> the best ways but here some methods I have used:
> Transaction SWUD is a good start. From here you can:
>         Start a task and set breakpoints in the code
>         Create an event. This is useful because you can set breakpoints in
> the check functions.
>         Switch on container monitoring which shows which values are being
> passed between the containers.
>
> If you really need to get into the way the event container is being set up
> then can also look at debugging the code which creates the event. This is
> often an update task so you will need to turn on update debugging. Look for
> the function which creates the event ( It will start with SWE_EVENT_CREATE*
> ).
>
> I got very frustrated with trying to debug a workflow triggered from a
> change document at one point so I created this little program which triggers
> the workflow for an existing change document in foreground. It meant I could
> set break points in the code to see what was happening.
>
> REPORT  ZBPTTST_CHGDOC                .
>
> TABLES: CDHDR, CDPOS.
>
> DATA: T_CDPOS LIKE CDPOS OCCURS 0 WITH HEADER LINE.
>
> PARAMETERS: CHGNR LIKE CDHDR-CHANGENR OBLIGATORY,
>             OBJCL LIKE CDHDR-OBJECTCLAS OBLIGATORY.
> SELECT-OPTIONS OBJID FOR CDHDR-OBJECTID NO INTERVALS NO-EXTENSION.
>
> SELECT SINGLE * FROM  CDHDR
>        WHERE  OBJECTCLAS  = OBJCL
>        AND    OBJECTID    IN OBJID
>        AND    CHANGENR    = CHGNR  .
>
> SELECT        * FROM  CDPOS      INTO TABLE T_CDPOS
>        WHERE  OBJECTCLAS  = CDHDR-OBJECTCLAS
>        AND    OBJECTID    = CDHDR-OBJECTID
>        AND    CHANGENR    = CDHDR-CHANGENR           .
>
> CALL FUNCTION 'SWE_EVENT_CREATE_CHANGEDOCUMNT'
>      EXPORTING
>           CHANGEDOCUMENT_HEADER   = CDHDR
>      TABLES
>           CHANGEDOCUMENT_POSITION = T_CDPOS
>      EXCEPTIONS
>           OTHERS                  = 1.
>
> COMMIT WORK.
>
> Hope this helps
>
> Regards
> Brent
> Ph x67470 (64 9 256 4470)
> Email Brent.Talbot @airnz.co.nz  or  Brent_nz at compuserve.com
> Mob 64 21 684 208
>
> -----Original Message-----
>> From: Kevin Wilson [mailto:kjw1969 at yahoo.com]
> Sent: Thursday, 18 July 2002 07:36
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Debugging in workflow
>
>  Can anyone share some tips on debugging workflows \ workitems and contents
> of their containers? Also, what the best way to debug events and their check
> function modules?
>
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
 


More information about the SAP-WUG mailing list