Professional Documents
Culture Documents
What is Workflow?
Workflow is an automation tool wherein we can map the existing business process and automate it
end to end.
Benefits:
1) User initiating the process need not bother about next level approvers involved in the
process. Workflow will take care of finding the right approver and sending the
workitem/Mail for his action/information
2) Deadline monitoring is a workflow feature which helps to attach a timeline for approver to
take action. Cases where no action is taken after deadline expiry can be handled by
escalating the workitem superior or notify someone that deadline has expired. This aids for
better & faster business progress
3) Workflow ensures that the right work is brought in the right sequence at the right time to
the right people
4) SAP Business Workflow can also be used to respond to errors and exceptions - it can start
when predefined events occur(SWUY Tcode)
Automatic Workflow Customizing:
Tcode: SWU3
Purpose: Before jumpstarting with Workflow development we need to ensure that workflow
customizing settings are in place. These settings are prerequisite for proper triggering & execution of
workflow.
Mostly this customizing activity is done by Basis team. Reason being that SAP user id used for
this activity should have SAP_ALL & SAP_NEW authorization.
From above mail we can understand that for workflow WS92000001 triggering event
TRIGGERWF of business object ZBUS2012 is not maintained. Troubleshooting for this case
will be to enable the Linkage Activated checkbox in SWE2 Tcode. This checkbox enabling
means that workflow is correctly linked to the event & will look as below,
Tasks in task groups related to above scenarios like Test Workflows etc are made as General
Task.
Once Perform Automatic Customizing button is clicked, SAP system will maintain the
customizing activities automatically.
If a particular activity has been executed successfully the icon colour changes from RED to
GREEN. Later user can go to each activity & reset the default value to a different value. For
e.g. 3 minutes is default value for the background job for missed deadlines as below,
Based on our requirement we can manually change this value. Note that its MANDATORY
to ensure that Maintain Runtime Environment activity & Maintain Definition Environment
are GREEN in colour for proper functioning of Workflows.
To perform automatic customizing for Maintain Additional Settings and Services, single click
on it and then click on perform automatic customizing button. Excluding manual activities
Maintain Web Server & Maintain Standard Domain for Internet Mail other activities will
be maintained automatically. In case of Classify Tasks as General all 7 sub-activities under
this activity will be maintained automatically.
This will start a verification workflow which will finally send a mail to our inbox (SBWP
Tcode) to inform whether customizations are correct or not.
Workflow Builder
Tcode: SWDD
Area1:
Workflow template no will be displayed against Workflow field. Workflow template id starts with
prefix WS. It is followed by 8 digits which is madeof 2 parts. First part consists of 3 digit number
maintained in SWU3 Tcode under Maintain Prefix number Activity. Remaining 5 digits are running no
automatically generated by SAP. For e.g. Workflow template no for prefix no 920 can look like
WS92000001.
Version refers to the current active workflow version. Only 1 WF (Workflow)version can be active at
1 point of time. To generate a new WF version click Generate Version from menu as below,
From the version dropdown seen below we can select the version which we want.
Status: Refers to current status of the Workflow. When a new WF is created, status will be New,Not
Saved. Once WF is saved the status changes to Revised, Saved. After activation the status becomes
Active, Saved.
Import & Export Workflows:
When a workflow is exported, an XML file that contains all the content according to BPML
Specification 0.4 is written. BPML (Business Process Modelling Language) is a meta language with
which the structure of a workflow can be described. To export a workflow as an XML file, choose
Workflow -> Import/Export -> Export to XML File from the WF Builder menu.
There are many disadvantages of this export/import option since the entire workflow is not
exported/imported.
When exporting a workflow, the following parts cannot be exported according to BPML 0.4:
Triggering events
WHILE loops
The task ID is exported as a SAP-specific extension. To receive an executable workflow after the
import of the XML file to an SAP system, the task must be contained in this SAP system.
If a workflow contains such step types, these are replaced by empty steps during the import and the
user receives a message that these steps have to be post-processed.
Complex conditions
To receive an executable workflow after the import of the XML file to an SAP system, the exporting
structures and object types must be contained in this SAP system.
Rules and elements of the organization management that are used as responsible agents
To receive an executable workflow after the import of the XML file to an SAP system, the rules and
elements of organization management that are referenced must be contained in this SAP system.
Once exported user will prompted to specify the location where the XML file has to be downloaded.
An XML file with name as test will look as below,
For importing the file choose Workflow -> Import/Export -> Import from XML File from the WF
Builder menu.
Area2: Any Workflow will have 2 steps Workflow Started and Workflow Completed by default. It
marks the Start and end point of a workflow. All business logic should be defined in the Undefined
Double-Click for new step region. There are several WF step types available. To insert a new step
right click on Undefined Double-Click for new step icon. A popup appears as below,
Upon selecting Create another popup listing possible WF step types appears,
Workflow Container:
All the variables which are used in workflow are created here as workflow container elements. The
lifetime of a variable is throughout the complete WF instance.
Double click on
A popup appears as below,
Enter name of the variable(also called as Workflow container element), a short name & description.
There are 3 ways to declare a WF container element. We can directly enter the datatype (for
e.g.INT1) or enter structure (SWHACTOR)/data element (AENAM) or domain name (USNAM) in ABAP
Dictionary Data Type. In ABAP Dictionary Reference, a table name (for e.g. PA0001) can be entered
in Structure field and field name can be entered in field (PERNR). We can also maintain the variable
of type business object/class name by mentioning the BO name/class name in Object Type.
In properties tab Import, Export fields are maintained. If the variable is getting its value from outside
workflow say for e.g. from BO (Business object SWO1 Tcode) or Standard/custom (for e.g.
WebDynpro ABAP or Java) application Import should be enabled. If the variable value has to be sent
outside workflow say for e.g. to BO method then export checkbox has to be enabled. If the variable
is going to be used only within workflow then both checkboxes can be left unchecked. Mandatory as
the name suggests should be enabled for mandatory variables. Enabling Multiline checkbox allows
us to pass more than 1 value (similar to internal table in reports).
Initial values for variables can be maintained in Initial Value tab. Once initial values are maintained
GREEN colour icon appears as below,
Or press Ctrl+F2, information, warning & error messages are displayed in this area.
Above popup shows an information message that No start events are maintained for Workflow.
Business Workplace:
Tcode: SBWP
Mails & Workitems sent to users from Workflow can be accessed in Business Workflow. Its a user
specific SAP inbox.
To navigate to Workflow Log (SWI1 Tcode) single click on the workitem and click on
Workflow log highlighted above.