10/2/2017 Edit Post SAP Blogs WordPress
Dear Reader,
This is PART II of 4 blog series that has been drafted keeping Workflow (WF) beginners in mind to
give a better picture & right start about SAP Business Workflows.
Part I [Link]
passionate-starters--part-i-spice-up
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
[Link] 1/12
10/2/2017 Edit Post SAP Blogs WordPress
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 ac ve workow version. Only 1 WF (Workow)version can be ac ve
at 1 point of me. 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.
[Link] 2/12
10/2/2017 Edit Post SAP Blogs WordPress
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 workow is exported, an XML le that contains all the content according to BPML
Specica on 0.4 is wri en. BPML (Business Process Modelling Language) is a meta language
with which the structure of a workflow can be described. To export a workow as an XML le,
choose Workow -> Import/Export -> Export to XML File from the WF Builder menu.
[Link] 3/12
10/2/2017 Edit Post SAP Blogs WordPress
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
Tasks that are referred to in steps
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.
Wait steps and event creators
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
Complex data types (for example, structures, object type references)
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.
Modelled deadline monitoring
Activities with more than one outcome
Rules and elements of the organization management that are used as responsible agents
[Link] 4/12
10/2/2017 Edit Post SAP Blogs WordPress
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 Workow will have 2 steps Workow Started and Workow Completed
by default. It marks the Start and end point of a workow. All business logic should be
dened in the Undened Double-Click for new step region. There are several WF step
types available. To insert a new step right click on Undened Double-Click for new step
icon. A popup appears as below,
Upon selecting Create another popup listing possible WF step types appears,
[Link] 5/12
10/2/2017 Edit Post SAP Blogs WordPress
Select the required step to insert it in workflow.
Area 3:
This region contains a resizable GREEN colour rectangle which is used to highlight
particular step(s) in workflow.
Area 4:
Insertable Step Types:
It contains the list of possible WF steps types that can be inserted.
[Link] 6/12
10/2/2017 Edit Post SAP Blogs WordPress
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,
[Link] 7/12
10/2/2017 Edit Post SAP Blogs WordPress
Enter name of the variable(also called as Workow container element), a short name &
descrip on. 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 Dic onary Data Type. In ABAP Dic onary Reference, a table name
(for e.g. PA0001) can be entered in Structure eld and eld name can be entered in eld (PERNR).
We can also maintain the variable of type business object/class name by men oning the BO
name/class name in Object Type.
[Link] 8/12
10/2/2017 Edit Post SAP Blogs WordPress
In proper es tab Import, Export elds are maintained. If the variable is ge ng its value from
outside workow say for e.g. from BO (Business object SWO1 Tcode) or Standard/custom
(for e.g. WebDynpro ABAP or Java) applica on Import should be enabled. If the variable value
has to be sent outside workow say for e.g. to BO method then export checkbox has to be enabled.
If the variable is going to be used only within workow then both checkboxes can be le unchecked.
Mandatory as the name suggests should be enabled for mandatory variables. Enabling Mul line
checkbox allows us to pass more than 1 value (similar to internal table in reports).
Ini al values for variables can be maintained in Ini al Value tab. Once ini al values are maintained
GREEN colour icon appears as below,
[Link] 9/12
10/2/2017 Edit Post SAP Blogs WordPress
My workflows and Tasks:
It displays the list of last processed workflows.
Area 5:
Once we click CHECK icon
Or press Ctrl+F2, information, warning & error messages are displayed in this area.
[Link] 10/12
10/2/2017 Edit Post SAP Blogs WordPress
Above popup shows an information message that No start events are maintained for Workflow.
Business Workplace:
Tcode: SBWP
Mails & Workitems sent to users from Workow can be accessed in Business Workow.
Its a user specic SAP inbox.
Users will receive mails & workitems in Inbox.
[Link] 11/12
10/2/2017 Edit Post SAP Blogs WordPress
Difference between Mail and Workitem:
When same mail is sent to more than 1 user, each user will get a separate copy of the mail.
In case of workitem the same copy is sent to all users
Each user can open the mails whenever required. Its not possible to attach deadline for
a mail to be opened before a particular time. Workitems can be sent with deadline
Mails are used to notify users. Workitem carry work on which users have to take some action
for e.g. Approve leave request, Release a Purchase order. Once leave request is approved an
email can be sent to employee notifying that his request has been approved
Users can reserve the workitem by single clicking on the workitem and choosing reserve icon.
This will remove the workitem from inbox of other users and workitem will be available only for
the person who reserved it. Users can single click on the workitem and choose replace icon.
This will make the workitem available to all users to whom it was sent. Since individual copies
are sent in case of Mails Reserve/Replace is not possible
Workitems are foreground steps meaning that user interac on (for e.g. approve the
request by clicking Approve bu on) is mandatory. Workow generally waits for the
current workitem step to be completed before moving to the next step(Note: This
behaviour can be altered via Fork step). Since mails are no ca on steps Workow
sends them in background and proceeds to the next step.
To navigate to Workow Log (SWI1 Tcode) single click on the workitem and click on
Workow log highlighted above.
Thanks for reading. Please share your valuable comments.
[Link] 12/12