Workflow Programming Exit -> Don't know how to get an exception triggered by a business object method.

Khanna, Manish manish.khanna at amd.com
Thu Jun 22 22:01:50 EDT 2006


Hi Michel,

We have followed a different approach which is an extension to what Paul
suggested.

Anticipating the need of 'user-friendly' logs we created all workflows
in a manner that they log all important activities in a custom table.

This table holds information of important activities - 
 * when a work item was received by the user, 
 * when an action was taken and what action was taken. 
 * Additionally it fetches data from standard tables to show user info,
forwarding and delegation info and so on.

We made sure that every workflow that we created contained steps to log
approvers and action taken.

Hope this helps.

Cheers,
Manish


-----Original Message-----
From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf
Of Paul.Bakker at osr.treasury.qld.gov.au
Sent: Friday, June 23, 2006 5:01 AM
To: SAP Workflow Users' Group
Subject: Re: Workflow Programming Exit -> Don't know how to get an
exception triggered by a business object method.

Michel,

That's an interesting problem. I have recently also been asked to
provide a
'user--friendly' version of the workflow log, but I was thinking of a
different approach.

Why not just read the existing workflow log data and format/filter it to
make it look user friendly. Then you don't need to (presumably) store
additonal data in custom tables, or program user exits on workflow
execution.

Has anyone else had this kind of request? How did you resolve it? The
client told me that the workflow log is 'too technical' and 'too
detailed'.
They just want to know who did the approval and when.

I'm trying to convince them that we should stick to standard SAP - less
cost for them, and less work for me :-)

cheers,
Paul



|---------+------------------------------->
|         |           "Munzert, Michel"   |
|         |           <Michel.Munzert at ids-|
|         |           scheer.com>         |
|         |           Sent by:            |
|         |           sap-wug-bounces at mit.|
|         |           edu                 |
|         |                               |
|         |                               |
|         |           23/06/2006 01:17    |
|         |           Please respond to   |
|         |           "SAP Workflow Users'|
|         |           Group"              |
|         |                               |
|---------+------------------------------->
 
>-----------------------------------------------------------------------
-------------------------------------------------|
  |
|
  |       To:       <sap-wug at mit.edu>
|
  |       cc:
|
  |       Subject:  Workflow Programming Exit -> Don't know how to get
an exception   triggered by a business object       |
  |        method.
|
 
>-----------------------------------------------------------------------
-------------------------------------------------|




Hello,

[initial situation]
I'm using a programming exit to write an additional user-friendly log.
Therefore I have written an ABAP-class with the interface
IF_SWF_IFS_WORKITEM_EXIT. This class has a method (event_raised) where I
can implement my coding for the user-friendly logging. There I have two
parameters:
IM_EVENT_NAME    Importing    Type    SWW_EVTTYP
IM_WORKITEM_CONTEXT    Importing    Type Ref To
IF_WAPI_WORKITEM_CONTEXT


Through the parameter IM_WORKITEM_CONTEXT I have access to the most of
basic data of the workitem.... The second parameter describes the moment
when the programming exit will be passed through. In my case the moment
"AFT_EXEC" is important!

[problem]
The method of an business object is raising an exception (exit_return
9001
space space space space). Now, I want to know whether an exception was
raised or not. If so, I need the exception parameters to write my log.

I tried already a lot including many function modules who are able to
read
the workitem data (e.g. SWW_WI_RETURN_READ, SWL_WI_READ,
SWL_WI_HEADER_READ, SWL_WI_RESULTS_READ). At the moment after execution
I'm
not able to get the exception through this function modules. After I
left
debugging mode and the workitem is completed I can look up the exception
in
table swwwiret. But unfortunately that's to late ;-) .

Does anybody know to to get this running?

Greetings
Michel Munzert
Developer/Consultant

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug




************************************************************************
************************************************************************
******

Only an individual or entity who is intended to be a recipient of this
e-mail may access or use the information contained in this e-mail or any
of its attachments.  Opinions contained in this e-mail or any of its
attachments do not necessarily reflect the opinions of Queensland
Treasury.

The contents of this e-mail and any attachments are confidential and may
be legally privileged and the subject of copyright.  If you have
received this e-mail in error, please notify Queensland Treasury
immediately and erase all copies of the e-mail and the attachments.
Queensland Treasury uses virus scanning software.  However, it is not
liable for viruses present in this e-mail or in any attachment.  

************************************************************************
************************************************************************
******

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug







More information about the SAP-WUG mailing list