Business workflow ( waiting for a project task )
You can also use Business Workflow (2) to respond to errors and exceptions in other, existing business processes. You can start a workflow when predefined events occur, for example an event can be triggered if particular errors are found during an automatic check.
- Creating Events: Events are created to report status changes for an application object and to allow a reaction to the changes.
- Providing SAP Tasks: A task contains a task description and the connection to the application logic via the method for a business object.
- Providing SAP Workflows
- when different people are involved in different parts of the process
- when the users need to be reminded of what they need to do
- when the duration of the process is critical and deadlines have to be met
- when process-tracking or auditing is critical when the process-consistency is critical
- when the process is repetitive in nature and Rule based
- Organizational Unit
- Position
- Job
- Task
Technical Principles of SAP Business Workflow
- Business Workplace and Work Items: Work items are displayed to the user for execution in their Business Workplace.
- For example, work items represent a step at runtime that is to be executed. There are various types of work item. Only certain types are displayed in the Business Workplace.
- Workflow and Workflow Definition
- You have to define a workflow before execution. This workflow definition is made up of steps that control the workflow or refer to the tasks to be executed. You can make additional specifications about agents and deadline monitoring for a step. These specifications are evaluated at runtime by the work item manager. The workflow is started either manually by the user or by the system. For the system to start a workflow, the workflow definition must contain at least one triggering event (for example the event material created). When the event occurs, the relevant workflow is started automatically.
- When you activate a workflow definition, you automatically generate a runtime version. When the workflow is started (manually or automatically), the relevant runtime version is used for the execution. If the workflow definition is changed later and a new runtime version is generated, these changes do not affect workflows that are already being executed.
- Tasks: Tasks describe elementary business activities. Tasks always refer to a method of an object type. Possible agents are defined for tasks. Tasks can refer to automatically executable methods (background tasks) or they can require a user to execute them (dialog tasks).
- Object Types and Objects: An object type describes the data with which you want to work in a workflow (for example the object type Material). An object is an individual data record of an object type. Attributes are defined for an object type, which makes up its data record (such as material name, material number). Every object type has methods in which activities are defined that can be executed with the data (for example, create material). You can call the transactions and functions of the SAP System in a method, as can your own or other applications. Events are another important component of an object type. The events describe the status changes that an object can undergo (for example, material deleted or materially changed). A workflow can be started by an event of this kind being triggered.
- Triggering Events: To Start Workflow tasks.
- Terminating Events: To End the Workflow.
- Application Creates Event through:
- Change Documents: Status changes of objects which are logged as change documents can be reported as events.
- Status Management: An event can be created automatically for objects using the general status management when an object status changes.
- Message Control (NAST table):
- Programming (Explicit event creation) using Function Modules: Events can be created by calling the relevant function module
- A linkage defines the assignment of events to the event receivers interested in them
- Organisation
- Process
- Business object
SAP-Tools für die Erstellung von Workflows
#1 SAP Business Workflow- Für die Kommunikation zwischen zwei Systemen nutzt SAP Business Workflow die WebFlow-XML-Schnittstelle.
- Transaktion SWDD
- Die Definition einer Aufgabe erfolgt über die allgemeine Aufgabenpflege, Transaktion PFTC
- Transaktion SWEC Events for change documents
- Transaktion SWED Assignments
- Die Transaktion SCDO liefert Ihnen eine Übersicht aller vorhandenen Änderungsbeleg-Objektklassen
SAP Business Workflow
Standard-Workflows konfigurieren
How to find a sample?
SAP Business Workflow - SAP Help Portal - a catalogue
Suche über den Customizing-Leitfaden (SPRO)
Suche über den Workflow Builder
Suche mithilfe des Ereignis-Trace
- SWEL - Display Event Trace
- RSWELOGD - Delete Event Trace
- SWO1 to see the Object
Automatisches Workflow-Customizing
Automatic workflow customising is a prerequisite for any use of SAP Business Workflow. You start it via transaction SWU3.
Workflow-Eingang
Work items are workflow worklists to be processed by you or a group of people. The workflow is only continued after they have been processed.
- Business Workplace (SBWP)
- Business-Workflow-Arbeitsplatz (Work Center): Service swf_ workplace über URL
- My Inbox (bzw. das Vorprodukt Unified Inbox): über das SAP Fiori Launchpad
- Nicht-SAP-Produkte mit Integration in SAP Business Workflow
Workflow-Aktivierung (SWU3)
Startereignisse (start events), auch auslösende Ereignisse genannt, sind die Ereignisse, die dazu führen, dass ein Workflow gestartet wird. Ein Workflow kann mehrere Startereignisse haben. Damit ein Workflow startet, muss das Startereignis aktiv sein.Ob das Ereignis aktiv ist, erkennen Sie an die Symbole für aktiv ( ) und inaktiv ( ) in der Spalte Aktiv.
In some cases, it can be activated in SPRO.
Ereignistypkopplung: Über die Transaktion SWETYPV oder SWE2 (SWETYPV-Typkopplungen) finden Sie die Ereignistypkopplungen.
Das bedeutet, wenn Sie eigene Workflows entwickeln und Startereignisse definieren, finden Sie auch diese Einträge in der Transaktion. Die Einträge entstehen also, wenn Sie im Workflow Builder Startereignisse zuordnen.
- Check function module: A transaction used to prevent a linkage being triggered when an event occurs.
- Receiver type function module: The event container is evaluated in the receiver type function module, and a receiver type is determined from the information. Typically, no receiver type function module is required in SAP Business Workflow.
- Enable Use of Queue: This indicator is only evaluated if the event queue is active. If the indicator is set, the event receiver is started via the event queue. If the indicator is not set or the event queue is not active, the receiver is started immediately.
- The queue management in transaction SWEADM allows you to make further settings, and the event browser in transaction SWEQBROWSER gives you an overview of the processing and status of the events created via the event queue.
Workflow-Benachrichtigungen einstellen
- Using the RSWUWFML2 report, you can easily create e-mail notifications for new work items.
- SWN_SELSEN/ You can make the appropriate settings in transaction SWNADMIN (a browser-based BSP application) or transaction SWNCONFIG (an SAP GUI application).
Workflows einsetzen und verwalten
Workitems und Workitem-Status
- in Vorbereitung (CHECKED)
- wartend (WAITING)
- bereit (READY)
- angenommen/ reserviert (SELECTED)
- ausgeführt (COMMITTED)
- beendet (COMPLETED)
- logisch gelöscht (CANCELLED)
- fehlerhaft (ERROR)
Workitem-Typen
- Dialog Workitem (W)
- Deadline-Workitem (D)
- Arbeitsvorrats Workitem (A)
- Workflow Workitem(F)
- Block Workitem (X)
- Hintergrund Workitem (B)
- Warteschritt Workitem(E)
- Web Workitem
- Container Anker
- In transaction SWI6 (Workflow for object) view the workflow for an object.
- In the transaction SWI1 (work item selection) find the executed transaction SWI1
- Workflows and work items for a specific time interval.
- If you want to make a statement about the frequency of work items, i.e. the number of workflows initiated within a period of time, this can be period, this is possible via the transaction SWI2_FREQ (work items per task).
- With the reports Work Items without Agents (transaction SWI2_ADM1) or Work items with deleted users (transaction SWI2_ADM2) can be used to determine
Workflows entwickeln
Elemente von Workflow-Definitionen
- My Inbox/Business Workplace
- Workflow-Definition
- Steps: The steps either control the workflow directly
- Tasks
- Classes/Business Objects
- Organizational management
Workflow-Definition im Workflow Builder
Aktivität: Execution of a task (single-step task or multi-step task)
This is a simple step which executes the underlying standard Task. For execution of this activity, you need to fill the container of task. The agent assignment is carried forward from the standard task.It ofers a facility to notify a user on successful execution.
- Control: select or create a task & assign agents
- Details: log? work-item response
- Outcomes
- Notification
- Latest End: If you set a deadline on the Deadline tab of the created activity, the work item must be processed within this period. you can display a text as an action and inform a message recipient if the deadline is exceeded.
- Latest Start
- Requested Start
- Requested End
- Methods
- Secondary methods can be useful in certain cases in order to show the additional information to the operator in another mode.
- Preceding and following methods are suitable for background tasks, to example, for converting values, additional notifications of a staff member, etc.
- Conditions: a new condition ( Only when this condition for creating work items is fulfilled can the work item for this step be executed. Otherwise the work item is created in status "In Preparation"), complete work item (If this condition is fulfilled, the work item is set to the status-completed and the workflow with the outcome Condition for 'complete work item' is correct is continued. This work item is checked as long as the work item does not have the status error, logically deleted or completed), complete execution
- Programs Exits. You can execute additional methods that you have programmed when predefined events occur.The ABAP classes added must support the IF_SWF_IFS_WORKITEM_EXIT interface.
Web-Aktivität: Sending an XML document from the workflow
This step uses an existing Workflow step as a reference and sends the container elements to an XML document. The XML document contains the operation CreateProcessInstance, which starts a remote process.Mail versenden
Document from Template
This step enables us to create a document runtime using the data in the containers. You can create an Excel sheet, Word Document or even a PPT presentation and slides to display the data. For this, you must create the templates first, carrying references to the container variables. Then at runtime, the template and flow items are passed from Workflow container to the task container for processing.
Formular
- Create a structure with fields.
- Create a container element with the connection to the new structure
- Insert the step
- A formular will be displayed
Benutzerentscheidung: User decision
This step is useful for seeking approval for a certain task. You can send a proposal to a user informing him about a case.- Create a structure with fields.
- Create a container element with the connection to the new structure
- Insert the step
- A formular will be displayed
Dokument aus Vorlage: A document is created from a document template
Bedingung
Ereigniserzeuger: Events
You can artificially generate events of the objects that are a part of Workflow container.Warten
- The Wait step type is a modeling element that can be used to specify that the system is waiting for an event or for a condition to be fulfilled.
- In order not to have to end the workflow and start a new one in such a case, recursions can be modelled with the step Wait for <event>.
Containeroperation
Elements of the workflow container can be with elementary arithmetic operations (add, subtract, multiply, divide) or value assignments can be changed. Here you can manually assign values to the required container elements. This is useful especially while setting/resetting the counters for running loops.
Ablaufsteuerung:
Work items of the current workflow can be influenced (cancel work item or make obsolete).- Cancel the specified Work Item. The work item is set to status logically deleted. The prerequisite is that the process control should be in a branch parallel with the work item.
- Cancel Workflow. All the Workflow steps are set as logically deleted. If this Workflow is being called by another one, the calling Workflow is set to status Incorrect.
- Terminate Workflow. Workflow status is changed to Completed.
- Set the given work item (again this should be in parallel with the process control) to obsolete.
Loop (UNTIL)
Parallel Abschnitt
Unbestimmt
Standard tasks
Business objects, SWO1
Classes
Container
With the workflow container, it is possible to make data available globally within the workflow, to edit it, and to use it in the various steps.- Workflow-Container: Sie enthalten Werte, die von einem Schritt an einen weiteren Schritt weitergegeben werden sollen.
- Aufgabencontainer
- Methodencontainer
- Ereigniscontainer
- Regelcontainer
Data flows
Standard-Workflows erweitern
Startbedingungen definieren
Start conditions are used to define additional conditions for the start of a workflow. The start of the workflow then depends on the occurrence of the triggering event and the fulfillment of the defined conditions.Bearbeiterfindung anpassen
- Create an organisational unit with the respective positions for for purchasing in transaction PPOME (Change Organisation and Staffing), or use an existing organisational unit.
- In transaction PFOM (Create PFOM Assignment), assign the purchasing groups to the positions of the created organisational unit.
- Select your organisational unit from the organisational plan (for example the for example, the purchasing department) and the organizational object type T024 (purchasing group)
- Return to transaction PFOM and execute it.
- Assign
Einen eigenen Workflow auf Basis von Standardobjekten entwickeln
- Create a class
- Assign the interface IF_WORKFLOW
- The key of a business object in the workflow environment must have a certain format, the so-called local persistent object reference (LPOR).
BI_PERSISTENT~LPOR method is the counterpart to the FIND_BY_LPOR method and returns the persistent representation for an existing instance of an ABAP object.
BI_PERSISTENT~REFRESH method is required when you need to ensure that all values of the object are valid and match the persistent state.
With the method BI_OBJECT~DEFAULT_ATTRIBUTE_VALUE you get back the display name of the object, the so-called default attribute.
Mit der Methode BI_OBJECT~RELEASE können Sie nicht mehr benötigte In- RELEASE stanzen, also abhängige Klasseninstanzen, löschen.
With call of a method
- To create the event in the update, use the function module SWE_EVENT_CREATE_IN_UPD_TASK. This module can be used be used with the addition IN UPDATE TASK and thus trigger the event in the update. trigger the event in the update. This makes sense, since SAP programmes (i.e. classical transactions) often use the update system for database updates.
- SWE_EVENT_ CREATE oder SAP_WAPI_CREATE_EVENT
With the class
With output types ( send medium )
With BTE
Einen eigenen Workflow auf Basis kundeneigener Objekte entwickeln
Fehlerbehandlung und -analyse im Rahmen der Workflow-Entwicklung
Workflows im Kontext vonSAP S/4HANA
Transaktion SWDD_SCENARIO (Flexibler Workflow: Scenario Editor).By activating a scenario, you basically enable the possibility to select this scenario in the respective SAP Fiori app and to set up a flexible workflow. and to set up a flexible workflow.
Comments
Post a Comment