|Home • Trainings • Quiz • Tips • Tutorials • Functional • Cert Q's • Interview Q's • Jobs • Testimonials • Advertise • Contact Us|
Concept of Re-evaluate agents for active work items in SAP Workflow
By Srinivas Reddy Oota, HCL Technologies
In real world we may frequently experience a situation
where in we have to wait for approval from our manager and in some cases we may
not get approval in time. In these cases from SAP perspective we have options of
escalating via email in the form of deadline monitoring or forwarding the same
approval request to someone else. In this blog I choose the concept of
re-evaluate agents for an active work item which will re-initiate the active
work item once the dead line is reached. Below is a simple example, might not be
a real time scenario.
An employee will raise a travel request from a custom
SAP screen. The travel request will go to his line manager for approval. If the
travel is on the same day of request raised, the approval work item will wait
one hour for line manager approval if not approved; the same work item will go
to the platform manager and the work item will disappear from line manager's
For demo purpose I have created a simple screen from
where user will raise travel request. The custom screen is linked to an event in
a global class which will start workflow. Agent determination is done from a
functional method in the global class. Which will be called from a rule function
module. Dead line determination is
also done from a functional method in the global class.
Note: My idea is only to explain the concept of
re-evaluate agents for active work items with a simple example. The below
example might not be a real-time business scenario.
It is assumed that reader of the article has knowledge
in the following areas:
The development has a custom database table created in
SE11 which will store approver id's.
Create a global class ZCL_WORKFLOW_DEMO in SE24 assign
the interface IF_WORKFLOW
Define the new structure and table Types in the types
Declaration of types as shown below
Create the attributes in the attributes tab as shown
LPOR method implementation
Create the below methods.
Signature of Constructor method
Code inside constructor method:
Signature of GET_APPROVER method
Logic inside GET_APPROVER method.
The method has a very simple logic, if the import
parameter DEADLINE_FLAG is initial, line manager will be returned else if the
import parameter DEADLINE_FLAG is populated with 'X' platform manager will be
returned. This method will be called from the rule function module which is
assigned in the user decision step.
Signature of TRIGGER_WF method
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM
©2006-2007 SAPTechnical.COM. All rights reserved.
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG.
Graphic Design by Round the Bend Wizards