cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Workflow Tables

Former Member
12,715

I had some questions about workflow logs and agent determination tables:

What is the typical setup in SAP systems for the tracking of work item approval history and for the agent determination routing? The way I see it is to use the standard approval log table (SWWWIHEAD) and to have a custom table for agent determination.

Would you ever have a custom workflow log table? Is that even possible?

Inversely, is there a standard way to route agent determination without a custom table in the system?

What are the advantages / disadvantages of standard vs. custom for workflow table?

Any help would be appreciated, thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

We have various approval stages within our organization based on various criteria. At a high level I need enough information to tell workflow whether or not an approval stage is valid and where to route it if that is the case. I need the approver names and time stamps most of all from the workflow logs. Does that answer your question?

Former Member
0 Likes

Hello,

That sounds very complicated, normally the routing would be built into the workflow itself.

Sometimes agent assignment depends on the agent assignment of previous steps but if it's within the same workflow then you would usually store that information in a container element. But I guess you know what the requirements are.

It's best to not directly use workflow tables as they can change. Safer to use fms like SAP_WAPI_GET_WORKITEM_DETAILS.

regards

Rick Bakker

Hanabi Technology

Answers (4)

Answers (4)

surjith_kumar
Active Contributor

Hi,

Dont Create a Custom Table, Make use of the std. workflow Tables & Function Modules and achieve your Requirement.

Function Module

SWP_WORKFLOW_LOG_READ

SWP_WORKFLOW_NODE_LOG_READ

SWP_WORKFLOW_STEP_LOG_READ

Tables

SWWLOGHIST - History of a work item

SWWWIHEAD - Header Table for all Work Item Types

SWW_WI2OBJ - Workflow Runtime: Relation of Work Item to Object

SWW_CONT - Container Contents for Work Item Data Container

Regards,

Surjith

Former Member
0 Likes

For checking Log you should use standard Function Module.

SWL_GET_PROCESS_STEPLIST

Regarding your requirement you need to check the Workflow Template individually and analyse. Please note that you can use SAP_WAPI_READ_CONTAINER to know whether the request has been approved or rejected from a Decsion task which will have a unique value stored in Task container element WI_RESULT.

Thanks

Arghadip

Former Member
0 Likes

Between SWWLOGHIST and SWWWIHEAD which table specifically would a developer need to work with (just one or is it really both)? I ask because I have offshore resources that need instruction as to where they would pull the detailed approval history for a parked GL document for another RICEFW object being worked on right now (approvals, rejections, approver user IDs, time stamps, etc) that needs to pull this type of data from workflow specifically.

As always you've always been very helpful for my workflow questions, thanks.

Former Member
0 Likes

Hello,

I've used custom tables for agent assignment before, but never seen a need to use the workflow tables fr that. If you need info about another object then you should access that directly. What exactly do you need from the workflow tables?

regards

Rick Bakker

Hanabi Technology

Former Member
0 Likes

Hello,

Have a look at table SWWLOGHIST as well.

When agent assignment gets complicated, custom tables are often used. But, of course, avoid if you can.

regards

Rick Bakker

Hanabi Technology