the sap business workflow - abap development - scn wiki

Upload: prashant-adhikari

Post on 28-Feb-2018

251 views

Category:

Documents


1 download

TRANSCRIPT

  • 7/25/2019 The SAP Business Workflow - ABAP Development - SCN Wiki

    1/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 SAP Business Workflow s?

    #What are the layers in Workflow A rchitecture?

    #How Process, Business Logic and People are linked in Workflows?

    #What is a Business Object?

    #What is an Agent and what are diff erent types of Agent?

    #What are the capabilities of Workf low Builder?

    #What are Events?

    #What are the various methos of cr eating Events?

    #How can an Event be linked w ith a Workflow ?

    #What are containers, Binding and Binding Editor?

    #What are important Transactions and Reports?

    #Where can I find more details about workflow s?

    #Exception in binding of Task and the Method?

    #Basic Function Modules in Workflows?

    Whatare advantages of SAP Business Workflows?

    A business process can consist of several steps. Historically, the

    tasks have been coordinated manually or by s ome informal means

    of communication (stickynote, e-mail, shouting, and so on).

    The common problem in these approaches is :

    Inefficiency

    Each lacks a w ay to trace w here a task is

    Who executed(or is executing it),

    How much time it requires.

    In contrast, the workflow ensures that the right w ork is sent to the right person at the right time in the right sequence w ith the right information.

    Workflow is a tool for automization of business processes

    Not tied up to any particular application

    Operates uniformly across applications

    Coordinate all participating tasks

    Provide users w ith active support

    Deadline Management is possible

    Workflows are very usef ul for business processes that:

    Contain a sequence of ac tivities.

    Reoccur in the same or s imilar forms.

    Involve several people or groups of people.

    Require c onsiderable coordination.

    back to top

    What are the layers in Workflow Architecture?

    There are 3 layers in the Workflow A rchitecture:

    Business Object

    Business Process

    Organization Model

    back to top

    How Process, Business Logic and People are linked in Workflows?

    The business processes are defined in Workflow builder. Each and every small w ork process is called as an activity in the workflow builder. Each activity consists of a single step task, w hich can be a

    standard task or a workflow template.

    Assoc iated Business Logic is built in Business Objects. i.e. ABAP code will be in Business Object. Business Objects consist of attributes, methods and events. Methods consist of A BAP code. Each and

    every s tandard task is associated w ith a Business Object and a method.

    People / Group of people responsible for taking actions are defined in organization struc ture. Person responsible for taking an action is called actual agent. It is defined in the workflow activity.

    back to top

    What is a Business Object?

    Business object (BO) is bas ically collection of A ttributes, Methods and Events for a particular business entity. Example of BO: Sale Order, Vendor, Customer, Material etc.

    BOs w rap around backend tables, application code, change document and other technical information and expose them as Attributes, Methods and Events. Usually methods of BOs ref er to BAPIs.

    http://-/?-http://wiki.scn.sap.com/wiki/display/~106ujmooshttp://wiki.scn.sap.com/wiki/display/ABAPhttp://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Development+and+Programminghttp://scn.sap.com/welcomehttp://-/?-http://-/?-http://-/?-http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/ABAP+Development+and+Programminghttp://wiki.scn.sap.com/wiki/display/ABAPhttp://wiki.scn.sap.com/wiki/display/~106ujmooshttp://scn.sap.com/community/uachttp://scn.sap.com/community/developer-centerhttp://scn.sap.com/community/downloadshttp://wiki.scn.sap.com/wikihttp://wiki.scn.sap.com/wiki/login.jsp?os_destination=%2Fdisplay%2FABAP%2FSAP%2BBusiness%2BWorkflowhttp://scn.sap.com/welcomehttp://www.sapstore.com/http://scn.sap.com/community/newslettershttp://scn.sap.com/community/getting-started
  • 7/25/2019 The SAP Business Workflow - ABAP Development - SCN Wiki

    2/5

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

    http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow 2/5

    The follow ing diagram explains BO much better:

    back to top

    What is an Agent and what are diffe rent types of Agent?

    An agent is a person or a group of persons w ho can take an action during w orkflow 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 w ho actually takes the action. This is provided in the workflow Activity.

    Possible Agent: All poss ible persons/entities that can execute a task during runtime. Defines either in Org Structure or task.

    Excluded Agents: Persons w ho are excluded from taking action on a task. These are ass igned in the w orkflow definition at the w orkflow activity.

    System checks Actual Agent def ined in workflow runtime w ith the Possible Agents def ined in the task and the Excluded Agents. A ctual Agent should be a subset of Possible Agents minus the Excluded

    Agents, else Agent resolution fails.

    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 for any w orkflow . Eg. Sales order creation. is an event.

    Eg; Consider a scenario w here any sales order after c reation subject to approval from superior. So here a w orkflow comes into play. The workflow needs to start w henever a Sales order is created. The

    business object BUS2032 is assoc iated to sales order creation. It has event CREATED. So the trigger point or " START EVENTS " in the w orkf low is the BUS2032 's event CREATED.

    Then bind the event to the workflow so the data flow s fr om event to the Workflow. e.g.: Sales order is created. So for the w orkflow to proceed it'll need sales order details. With binding the respective

    values is mapped ito the workflow container.

    Then activate the linkage once you are through the w orkflow creation. This is important as after this only the workflow w ill listen for the event, in the sense that after this only the w orkflow is triggered on

    the event. This is critical also as each ac tive link adds to sy stem load considerably and too many w orkflow s in the test environment can bring the sys tem down. So caref ul. Deactivate once test is over and

    w orkflow 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 function module

    SWE_EVENT_CREATE or SAP_WAPI_CREATE_EVENT.

    - Change documents

    - Event creation w hen change documents are w ritten.

    - General status management

    - Logistics Information 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 w orkflow . The START EVENTS tab is taken through the header. The Business Object is specified and binding is generated to the w orkflow to receive the values and then the link is

    activated.See the pic below f or the Sales Order creation as start event for a w orkflow .

    http://-/?-http://-/?-http://-/?-http://-/?-http://-/?-
  • 7/25/2019 The SAP Business Workflow - ABAP Development - SCN Wiki

    3/5

    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 Workflow that hold the values in the w orkflow . 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 pass ing the values from events, methods and other externals sources to the container. When an event is binded to the workflow then the data automatically flow s

    from the Event to the Container in the w orkflow . Binding editor is there as automatic binding may not alw ays pick up the right or des ired binding or precisely the mapping generated may not be appropriate or

    as required due to technical reasons w hich 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 w ith Business w orkflow s.

    SWDD - Main Workf low Builder.

    PFTC - General task maintenance.

    SWO1- Business Object Builder.

    SBWP- The Business Workplace SWDM - Business Workflow Explorer

    SWELS - Sw itch Event Trace On/Off

    SWETYPV - Display/Maint. Event Type Linkages

    SWUS - Test Workflow

    SWUI - Start Workflow

    SWI6 - Workflow for Objects

    SW14 - Workflow s for Objects Types

    SWDB - Workflow Builder - Create Workflow

    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 Information System (LIS)

    Event Linkages

    SWB_COND - Workf low Start Conditions

    Work item analysis

    http://-/?-http://-/?-
  • 7/25/2019 The SAP Business Workflow - ABAP Development - SCN Wiki

    4/5

    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 Workflows

    SWI13 - Task profile

    List of Important Transaction Codes

    For more SAP Business Workflow Transactions,check the link :- http://help.sap.com/saphelp_40b/helpdata/en/9b/572614f6ca11d1952e0000e82dec10/content.htm

    back to top

    Where can I find more details about workflows?

    SAP Help - Business Workflow s

    SDN Forums

    SDN Blogs for Workflows

    SAP Business Workflow FAQ

    back to top

    Exception in binding of Task and the Me thod?

    It is observed that when w e bind a Task w ith any BO Method then all the fields defined for binding are wiped out after w e save the binding i.e. if w e w ant to see the fields taking part in binding of the TASK

    & METHOD or w hile binding the w ork flow 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 buffer synchronization.

    To overcome this issue f ollow the steps in SWDD.

    Menu->Extras->Transport->Synchronize runtime buf fer, or go to TCODE SWU_OBUF of buff er synchronization.

    back to top

    Basic Function Modules in Workflows?

    SWW_WI_POPUP_FOR_COMPLETION " show s the compeleted status of a w orkf low

    SWW_ADDR_KEY_CREATE_FROM_USER " display the addres s of the user or rec ipient

    SWW_WI_DELETE " delete w ork item

    SWW_WI_CREATE_VIA_EVENT " create w ork item as result of event

    SWW_WI_DEADLINE_CHANGE " change of deadline attribute of w ork item

    SWW_WI_COMP_EVENT_RECEIVE " complete w orkitem using events

    SWW_WI_REJECT " reject w ork item

    SWW_WI_EVENT_RECEIVE " retrive event for a w orkf low

    SWW_WI_DISABLE " lock w orkitem against execution

    SWW_WI_ENABLE " remove lock against execution of w orkitem

    sap workflow business object agent event binding other container

    http://wiki.scn.sap.com/wiki/label/ABAP/containerhttp://wiki.scn.sap.com/wiki/label/ABAP/otherhttp://wiki.scn.sap.com/wiki/label/ABAP/bindinghttp://wiki.scn.sap.com/wiki/label/ABAP/eventhttp://wiki.scn.sap.com/wiki/label/ABAP/agenthttp://wiki.scn.sap.com/wiki/label/ABAP/objecthttp://wiki.scn.sap.com/wiki/label/ABAP/businesshttp://wiki.scn.sap.com/wiki/label/ABAP/workflowhttp://wiki.scn.sap.com/wiki/label/ABAP/saphttp://-/?-http://-/?-https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2012http://wiki.scn.sap.com/wiki/display/ABAP/SDN+Blogs+for+Workflowshttps://forums.sdn.sap.com/forum.jspa?forumID=146http://help.sap.com/saphelp_46c/helpdata/en/c5/e4a930453d11d189430000e829fbbd/content.htmhttp://-/?-http://help.sap.com/saphelp_40b/helpdata/en/9b/572614f6ca11d1952e0000e82dec10/content.htmhttps://www.sdn.sap.com/irj/scn/wiki?path=/display/HOME/WF%252bTransactions
  • 7/25/2019 The SAP Business Workflow - ABAP Development - SCN Wiki

    5/5

    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 PagesAccessing Single Entry from Multi-line Element

    Approval Decis ion 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 Us e

    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 Us er Decesion in Workflow

    How to make FORM in workflow?

    How to send an external mail from workflow

    Marking the material for deletion using SAP Busines s 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 addres s 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 SCNContact Us SAP Help Portal

    Privacy Terms of Use Legal Disclosure Copyright

    http://www.sap.com/corporate-en/our-company/legal/copyright/index.epxhttp://www.sap.com/corporate-en/our-company/legal/impressum.epxhttp://www.sdn.sap.com/irj/scn/policyhttp://www.sdn.sap.com/irj/scn/policy?view=PPhttp://help.sap.com/http://scn.sap.com/docs/DOC-18476http://bit.ly/SCNLnIhttp://bit.ly/SCNyouThttp://bit.ly/SCNFBhttp://bit.ly/SCNTwRhttp://wiki.scn.sap.com/wiki/display/~986lqs5whttp://wiki.scn.sap.com/wiki/display/~107frvik2http://wiki.scn.sap.com/wiki/display/ABAP/Workitem+intimation+in+the+emailhttp://wiki.scn.sap.com/wiki/display/ABAP/Workflow+Scenariohttp://wiki.scn.sap.com/wiki/display/ABAP/Workflow+for+Customer+Blocking+and+UnBlockinghttp://wiki.scn.sap.com/wiki/display/ABAP/Version+Management+In+Workflowshttp://wiki.scn.sap.com/wiki/display/ABAP/Troubleshooting+Workflow+Terminating+Eventshttp://wiki.scn.sap.com/wiki/display/ABAP/Triggering+the+workflow+by+releasing+a+purchase+requisition+and+automatically+creating+a+Purchase+Orderhttp://wiki.scn.sap.com/wiki/display/ABAP/testinghttp://wiki.scn.sap.com/wiki/display/ABAP/Tasks+in+Workflowshttp://wiki.scn.sap.com/wiki/display/ABAP/Simple+Report+to+display+Task+or+Workflow+Container+Definitionhttp://wiki.scn.sap.com/wiki/display/ABAP/Send+an+External+mail++through+SAP+Business+Workflow+and+Recievers+address+in+CChttp://wiki.scn.sap.com/wiki/display/ABAP/Secondary+Methods%2C+Before+and+After+Methodshttp://wiki.scn.sap.com/wiki/display/ABAP/SDN+Blogs+for+Workflowshttp://wiki.scn.sap.com/wiki/display/ABAP/SAP+Workflow+EVENTShttp://wiki.scn.sap.com/wiki/display/ABAP/Real+Estate+Contract+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/Program+Exits+In+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/Organizational+Plan+in+Workflowshttp://wiki.scn.sap.com/wiki/display/ABAP/Need+to+delete+entries+from+table+SWFREVTLOGhttp://wiki.scn.sap.com/wiki/display/ABAP/Marking+the+material+for+deletion+using+SAP+Business+Workflow+-+triggering+the+redefined+methods+of+a+Business+Objecthttp://wiki.scn.sap.com/wiki/display/ABAP/How+to+send+an+external+mail+from+workflowhttp://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=68644http://wiki.scn.sap.com/wiki/display/ABAP/How+to+Handle+User+Decesion+in+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/How+to+find+which+organization+unit+you+are+currently+being+assigned+tohttp://wiki.scn.sap.com/wiki/display/ABAP/How+to+find+an+Event+for+any+transaction+for+triggering+of+a+workflowhttp://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=79889126http://wiki.scn.sap.com/wiki/display/ABAP/Extended+Workflow+Notificationhttp://wiki.scn.sap.com/wiki/display/ABAP/Exception+handling+in+Workflowshttp://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=72123805http://wiki.scn.sap.com/wiki/display/ABAP/Document+Template+in+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/Display+Users+details+in+Ruleshttp://wiki.scn.sap.com/wiki/display/ABAP/Differences+between+a+Work+item+and+an+emailhttp://wiki.scn.sap.com/wiki/display/ABAP/Delegation+and+Redefining+methods+of+business+object+BUS1001http://wiki.scn.sap.com/wiki/display/ABAP/Deadline+Monitoringhttp://wiki.scn.sap.com/wiki/display/ABAP/Converting+Smartform+to+PDF+in+Workflowshttp://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=29032626http://wiki.scn.sap.com/wiki/display/ABAP/Binding+Definition+in+Workflowhttp://wiki.scn.sap.com/wiki/display/ABAP/Approval+Decision+on+Approve+or+Reject+with+Reasons+or+Commentshttp://wiki.scn.sap.com/wiki/display/ABAP/Accessing+Single+Entry+from+Multi-line+Elementhttp://wiki.scn.sap.com/wiki/display/ABAP/SAP+Business+Workflow?showChildren=false#children