on 11-23-2009 8:18 PM
Hi all
I am working on a workflow which is already live in production system. Some days back there was some error for 1 particular case. I need to check this and see why it failed (the workflow did something that was not expected) . My question is this happened 2 weeku2019s back. How do I see the workflow log for THAT particular case?
Is there anyway I can see what happened at that instant? The workflow gets triggered in specific conditions and it would be difficult for us to simulate that in dev, or Qa systems.
Do you have the key field for this Workflow instance. Like the key field of business Object that is used in this Workflow. You can check from transaction code SWI6.
If the wflow is still in error just execute transaction code of SWI2_DIAG and identify the workflow instances.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for ur answer.
The workflow is not really in error. It was executed completely. It just did something which was not expected based on the conditions .
I can get the business object key . The problem is in prod system i do not have access to SWI6 . I think i can request that access ?
any other way to find that ?
Hi,
For most of the documents you can view the workflow log from the document transaction itself.
E.g; If its a purchase order, open it in ME23n tcode. On the left hand corner you have a icon. Click on that. In that goto workflow --> Workflow Overview. Select the instance that you want to analyze. Then go to Workflow log with technical details.
This way you can diagnose your workflow. Or you can do it through even log trace (SWEL) if you know the BO, event, date or SWI1/SWIA if you have the workitem ID.
And as you mentioned that the workflow went into error, you can also view it through SWI2_DIAG.
Regards,
Raj
If you dont have the authorization for swi6...
Then check the table SWWIHEAD...here you can give your workflow id and date range and you can check
Even you can filter this by the creator of the workflow...after getting the entry take the workitem id number
And view the log in SWI1
Hope it helps you.........
Hi,
This could be a simpler solution.
try using the FM SWP_WORKFLOW_LOG_READ.
Pass the workflow instance ID.
Develop a report program using this function module.
Call this report program in a custom method.
Use this custom method in a task in your workflow.
This will get you the workflow in runtime as a report to the user.
Check the code below.
&----
*& Report ZWFLOG
*&
&----
*&
*&
&----
REPORT ZWFLOG.
DATA : WF_LOG LIKE SWP_LOGTAB OCCURS 0 WITH HEADER LINE.
DATA : WA_WF TYPE SWP_LOGTAB.
CALL FUNCTION 'SWP_WORKFLOW_LOG_READ'
EXPORTING
TOP_LEVEL_WF = '000000059015'
WF_ID =
LANGUAGE = SY-LANGU
NESTING_LEVEL = '1'
WITH_NODES = 'X'
WITH_MESSAGES = 'X'
EXPAND_SUBFLOWS = ' '
ARCHIVE_MODE = ' '
ARCHIVE_DATA =
WITH_BLOCKENDS =
IMPORTING
FLOWITEM =
TABLES
WF_LOG = WF_LOG
EXCEPTIONS
WORKFLOW_DOES_NOT_EXIST = 1
OTHERS = 2
.
IF SY-SUBRC 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
LOOP AT WF_LOG INTO WA_WF.
WRITE : /.
WRITE : (12) WA_WF-WI_ID,
(72) WA_WF-WI_TEXT,
(9) WA_WF-WI_AAGENT,
(12) WA_WF-WI_CD,
(12) WA_WF-WI_CT,
(10) WA_WF-WI_STAT.
ENDLOOP.
Regards,
Raj
Thank you all for ur anwers.
I got the work item id from from table SWW_WI2OBJ and then checked tc - swia. Also checked tc swi1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.