sapdev logo background
sapdev logo sapdev logo
Comments

SAP Workflow




Workflow Transactions
SWDD - workflow builder
SWLD - SAP workflow easy access to all workflow related transactions
See more Worflow transaction

Workflow Tables
SWWWIHEAD
SW*
HRUSD2 - User Substitution table

Workflow Function Modules
SWE*WI*
SAP_WAPI*

Check for existing Workflow
• Via SAP Help
• Via SWDD -> workflow -> other workflow/version -> F4 Help on task -> structure search or text search
• Via SPRO -> Netweaver ->Application server -> business management -> SAP business workflow -> perform task-specific customization notification

Assign possible agents to workflow (not transportable)
-Via SWDD
Basic details button (hat)-> Agent assignment button

-Via SPRO (see path above)
Click on 'assign agents' link then select item -> click attributes -> general task -> Update index
Or use create agent assignment button and assign a user, role, job�etc

Activate linkage (transportable)
-Via SWDD
Within step -> start events tab -> click on the linkage icons

-Via SPRO (see path above)
On listener item click square shaped image to activate linkage

Assign possible agents to a Step/task
Within step->control tab->click agent for task icon->choose agent via attributes or create agent assignment icon

Can also be done within task screen via; Additional data->Agent assignment->Maintain

When assigning possible agents you can choose different task types:
• General task -Can be seen by all users, no further restriction possible
• General forwarding allowed (default) -Can be restricted by user, role, job etc and can also be forwarded between users
• General forwarding not allowed -Can be restricted by user, role, job etc but can't be forwarded between users
• Forwarding not allowed -Not really sure how this is different from option 3???

Other options available within this dialog are:
• Locked for instantiation -Stops wf from running, may want to stop it for some reason
• Locked against execution -Allows wf to run but when user tries to execute items they do not processed assigned functionality, simply move from inbox to outbox.

Assign agent to Step/task
Also within control tab capture actual agent via desired method such as expression, hard coded, rule� etc i.e. user who executed transaction, users manager, owner of document etc

-Others methods of setting agent
• Task default tab - Can also be set via default agent in task associated with step ( done within the default rules tab)
• Workflow rule - Can also be done via a rule. Create rule based on 'Agent determination - function called' option
• ABAP function - Set agent via ABAP function. To create this select step within SWDD and go to Extras->Ad hoc functions->Enable Ad hoc agent assignment. This runs a wizard which creates everything for one by creating container element (agent_001) and insert expression into step. You can then populate this via an attribute in the business object which is bound to new container element.

These Ad hoc agents can be tested within the usual test screen, Ad hoc agent tab

Workflow task
This contains a lot of control functionality including a link to and object / method. Each task can only have 1 link to this but this contains abap processing which will get performed when this step is executed. This could include the display of a material, PO�etc

-Agent assign
When assigning agents you can choose a different task

Workflow basic data (header/global)
-Start conditions
These are setup in the 'start events' tab of wf basic details and control when the workflow is started.
• Object category: BO or CL
• Object type: Example BUS1001006 which is used for SAP material maintenance
• Object event: Example CREATED which is triggered when a material is created

Click binding button to setup binding
Click active button to set as active
Can also setup conditions within the conditions button (i.e. only execute when material group is AC�)

Check if workflow has been triggered
SWDD->Extras->Work flows of this definition->execute report

Turn workflow on in required functional area
The SAP functional analyst also needs to use transaction SPRO to turn on and setup workflow for the specific function i.e. PO release, holiday request

Substitution
Setting up substitution allows a user to access another users inbox. If the 'active substation' checkbox is ticked then items are forwarded to seconded user rather than them having to access inbox separately. Done via transaction SBWP

Deadlines
Simple - simple message / reminder
Requested start - Not available until
Requested end - Minimum time on task
Latest start - must be started by
Latest end - must be completed by

Modelled deadline - process additional actions such as escalating to manager

Workflow events
-Event Parameters
Each event contains 2 parameters the Initiator (i.e. user id) and the Object Key. These are passed to the work flow container via binding. These values can then be passed to each step/task container for processing.
See Worflow event trace for how to trace if a wf event has been triggered.






comments powered by Disqus