You are on page 1of 5

4/6/2014 SAP Business Workflow - ABAP Development - SCN Wiki

http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 1/5
Getting Started Newsletters Store
Search the Community


Welcome, Guest Login Register
Products Services & Support About SCN Downloads
Industries Training & Education Partnership Developer Center
Lines of Business University Alliances Events & Webinars Innovation
Added by Guest, last edited by R. J. van Looy on May 25, 2009
ABAP Development / ABAP Development and Programming
SAP Business Workflow
#What are advantages of SAPBusiness Workf lows?
#What are the layers in Workf low Architecture?
#How Process, Business Logic and People are linked in Workf lows?
#What is a Business Object?
#What is an Agent and what are dif f erent types of Agent?
#What are the capabilities of Workf low Builder?
#What are Events?
#What are the various methos of creating Events?
#How can an Event be linked with a Workf low ?
#What are containers, Binding and Binding Editor?
#What are important Transactions and Reports?
#Where can I f ind more details about workf lows?
#Exception in binding of Task and the Method?
#Basic Function Modules in Workf lows?
What are advantages of SAP Business Workflows?
A business process can consist of several steps. Historically, the
tasks have been coordinated manually or by some inf ormal means
of communication (sticky note, e-mail, shouting, and so on).
The common problem in these approaches is :
Inef f iciency
Each lacks a way to trace where a task is
Who executed(or is executing it),
How much time it requires.
In contrast, the workf low ensures that the right work is sent to the right person at the right time in the right sequence with the right inf ormation.
Workf low is a tool f or automization of business processes
Not tied up to any particular application
Operates unif ormly across applications
Coordinate all participating tasks
Provide users with active support
Deadline Management is possible
Workf lows are very usef ul f or business processes that:
Contain a sequence of activities.
Reoccur in the same or similar f orms.
Involve several people or groups of people.
Require considerable coordination.
back to top
What are the layers in Workflow Architecture?
There are 3 layers in the Workf low Architecture:
Business Object
Business Process
Organization Model
back to top
How Process, Business Logic and People are linked in Workflows?
The business processes are def ined in Workf low builder. Each and every small work process is called as an activity in the workf low builder. Each activity consists of a single step task, which can be a
standard task or a workf low template.
Associated Business Logic is built in Business Objects. i.e. ABAPcode will be in Business Object. Business Objects consist of attributes, methods and events. Methods consist of ABAPcode. Each and
every standard task is associated with a Business Object and a method.
People / Group of people responsible f or taking actions are def ined in organization structure. Person responsible f or taking an action is called actual agent. It is def ined in the workf low activity.
back to top
What is a Business Object?
Business object (BO) is basically collection of Attributes, Methods and Events f or a particular business entity. Example of BO: Sale Order, Vendor, Customer, Material etc.
BOs wrap around backend tables, application code, change document and other technical inf ormation and expose them as Attributes, Methods and Events. Usually methods of BOs ref er to BAPIs.
4/6/2014 SAP Business Workflow - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 2/5
The f ollowing diagram explains BO much better:
back to top
What is an Agent and what are different types of Agent?
An agent is a person or a group of persons who can take an action during workf low runtime. Action can be approval of some business document, creation of some document or sending email.
There are basically three types of Agents:
Actual Agent: One who actually takes the action. This is provided in the workf low Activity.
Possible Agent: All possible persons/entities that can execute a task during runtime. Def ines either in Org Structure or task.
Excluded Agents: Persons who are excluded f rom taking action on a task. These are assigned in the workf low def inition at the workf low activity.
System checks Actual Agent def ined in workf low runtime with the Possible Agents def ined in the task and the Excluded Agents. Actual Agent should be a subset of Possible Agents minus the Excluded
Agents, else Agent resolution f ails.
back to top
What are the capabilities of Workflow Builder?
back to top
What are Events?
Events are actions that occur in the system and that acts as trigger point f or any workf low. Eg. Sales order creation. is an event.
Eg; Consider a scenario where any sales order af ter creation subject to approval f rom superior. So here a workf low comes into play. The workf low needs to start whenever a Sales order is created. The
business object BUS2032 is associated to sales order creation. It has event CREATED. So the trigger point or " START EVENTS " in the workf low is the BUS2032 's event CREATED.
Then bind the event to the workf low so the data f lows f rom event to the Workf low. e.g.: Sales order is created. So f or the workf low to proceed it'll need sales order details. With binding the respective
values is mapped ito the workf low container.
Then activate the linkage once you are through the workf low creation. This is important as af ter this only the workf low will listen f or the event, in the sense that af ter this only the workf low is triggered on
the event. This is critical also as each active link adds to system load considerably and too many workf lows in the test environment can bring the system down. So caref ul. Deactivate once test is over and
workf low is no longer used.
back to top
What are the various methos of creating Events?
The various metods of creating Events are:-
- Function module - event creation by calling f unction module
SWE_EVENT_CREATE or SAP_WAPI_CREATE_EVENT.
- Change documents
- Event creation when change documents are written.
- General status management
- Logistics Inf ormation System (LIS)
- Event creation upon status changes.
- Business Transaction Events
- Message Control
back to top
How can an Event be linked with a Workflow ?
Consider the start of any workf low. The START EVENTS tab is taken through the header. The Business Object is specif ied and binding is generated to the workf low to receive the values and then the link is
activated.See the pic below f or the Sales Order creation as start event f or a workf low.
4/6/2014 SAP Business Workflow - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 3/5
back to top
What are containers, Binding and Binding Editor?
Containers are nothing but the Variables in the Workf low that hold the values in the workf low. They can be simple variables or structures or even objects of any class. So they are best treated as the
variables. Binding as explained above is passing the values f rom events, methods and other externals sources to the container. When an event is binded to the workf low then the data automatically f lows
f rom the Event to the Container in the workf low. Binding editor is there as automatic binding may not always pick up the right or desired binding or precisely the mapping generated may not be appropriate or
as required due to technical reasons which any techie can guess. So editor gives an option to the developer to edit or generate manually.
back to top
What are important Transactions and Reports?
The area menu 'SWLD' lists all the transactions associated with Business workf lows.
SWDD - Main Workf low Builder.
PFTC - General task maintenance.
SWO1- Business Object Builder.
SBWP- The Business Workplace SWDM - Business Workf low Explorer
SWELS - Switch Event Trace On/Of f
SWETYPV - Display/Maint. Event Type Linkages
SWUS - Test Workf low
SWUI - Start Workf low
SWI6 - Workf low f or Objects
SW14 - Workf lows f or Objects Types
SWDB - Workf low Builder - Create Workf low
SWLV - Maintain Views
TASK/TASK GROUPS
PFTC_INS - Create
PFTC_CHG - Change
PFTC_DIS - Display
PFTC_COP- Copy
PFTC_DEL - Delete
Tcodes Related To Events
Events Creation
BSVW - Status management
NACE- Message Control
AWUW - Logistics Inf ormation System (LIS)
Event Linkages
SWB_COND - Workf low Start Conditions
Work item analysis
4/6/2014 SAP Business Workflow - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 4/5
SWI2_FREQ - Work Items Per Task
SWI2_DEAD - Work Items With Monitored Deadlines
SWI2_DURA - Work Items By Processing Duration
Task analysis
SWI11 - Tasks in Workf lows
SWI13 - Task prof ile
List of Important Transaction Codes
For more SAPBusiness Workf low Transactions,check the link :- http://help.sap.com/saphelp_40b/helpdata/en/9b/572614f 6ca11d1952e0000e82dec10/content.htm
back to top
Where can I find more details about workflows?
SAPHelp - Business Workf lows
SDN Forums
SDN Blogs f or Workf lows
SAPBusiness Workf low FAQ
back to top
Exception in binding of Task and the Method?
It is observed that when we bind a Task with any BO Method then all the f ields def ined f or binding are wiped out af ter we save the binding i.e. if we want to see the f ields taking part in binding of the TASK
& METHOD or while binding the work f low and the TASK it is observed that the container elements and task container elements disappear even though binding is established. This happens because of
inconsistent buf f er synchronization.
To overcome this issue f ollow the steps in SWDD.
Menu->Extras->Transport->Synchronize runtime buf f er, or go to TCODESWU_OBUF of buf f er synchronization.
back to top
Basic Function Modules in Workflows?
SWW_WI_POPUP_FOR_COMPLETION " shows the compeleted status of a workf low
SWW_ADDR_KEY_CREATE_FROM_USER " display the address of the user or recipient
SWW_WI_DELETE " delete work item
SWW_WI_CREATE_VIA_EVENT " create work item as result of event
SWW_WI_DEADLINE_CHANGE " change of deadline attribute of work item
SWW_WI_COMP_EVENT_RECEIVE " complete workitem using events
SWW_WI_REJECT " reject work item
SWW_WI_EVENT_RECEIVE " retrive event f or a workf low
SWW_WI_DISABLE " lock workitem against execution
SWW_WI_ENABLE " remove lock against execution of workitem
sap workflow business object agent event binding other container
4/6/2014 SAP Business Workflow - ABAP Development - SCN Wiki
http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 5/5
37 Child Pages
Accessing Single Entry from Multi-line Element
Approval Decision on Approve or Reject with Reasons or Comments
Binding Definition in Workflow
BOM in workflows!What and how?
Converting Smartform to PDF in Workflows
Deadline Monitoring
Delegation and Redefining methods of business object BUS1001
Differences between a Work item and an email
Display Users details in Rules
Document Template in Workflow
Event Creator & Wait Step Use
Exception handling in Workflows
Extended Workflow Notification
Function Module to evaluate what are the function modules suitable for a given generated Work Item.
How to find an Event for any transaction for triggering of a workflow
How to find which organization unit you are currently being assigned to
How to Handle User Decesion in Workflow
How to make FORM in workflow?
How to send an external mail from workflow
Marking the material for deletion using SAP Business Workflow - triggering the redefined methods of a Business Object
Need to delete entries from table SWFREVTLOG
Organizational Plan in Workflows
Program Exits In Workflow
Real Estate Contract Workflow
SAP Workflow EVENTS
SDN Blogs for Workflows
Secondary Methods, Before and After Methods
Send an External mail through SAP Business Workflow and Recievers address in CC
Simple Report to display Task or Workflow Container Definition
Tasks in Workflows
testing
Triggering the workflow by releasing a purchase requisition and automatically creating a Purchase Order
Troubleshooting Workflow Terminating Events
Version Management In Workflows
Workflow for Customer Blocking and UnBlocking
Workflow Scenario
Workitem intimation in the email
2 Comments
Prabhakar Dharmala
niran orkkatteri kariyadan
Excellent !!
Follow SCN
Contact Us SAP Help Portal
Privacy Terms of Use Legal Disclosure Copyright

You might also like