Thursday, February 17, 2011

Greco Roman Wrestling Schools In Nyc

workflow events to changes

If the workflow run-time system is set up in an SAP system once It supports the expansion of all business processes - in many cases without additional programming, model-based approach with a. By Workflow Builder can processes in the BOR (Business Object Repository ) objects defined in conjunction with manual steps (decisions, notices, etc.) defined and implemented based on.

basic idea is the loose coupling of customizebare BOR events at consumers. The coupling can also still be in the production system on and off. Estimated workflows, tasks, BOR methods or class or function blocks are. The triggering event is pervasive throughout the system. There is hardly an economically relevant event in the workflow system does not find a correlation. Typical examples include the installation of new evidence or a change of system or user status. Naturally, workflow events can be triggered programmatically (if improbably but missing even one should), for which one method raise class cl_swf_evt_event should use.

Here I want to show how you can register for the amendment of certain fields in the item master. In this specific case, should a consumer for the change of two particular Register fields. In order not to trigger any now for change an event, it seemed necessary to define a custom event to change just for this case.

events are part of BOR objects. To free of modifications to define a new event, I have defined a subtype of the BOR object BUS1001001 (commercial products):



the new type ZBU1001001 I use to define a new event FIELDSET_CHANGED :



This workflow event must now be tied to the changes of the article master. The SAP system requires continuous changes to business objects in the tables CDHDR and CDPOS . It is for each business object has a type code, called the change document object. When developing the business object (ie, generally in the SAP standard development) of this change document object is created, whereby automatic function modules generated for updating. Does that change document object such as MAT_FULL , so get the associated function module called MAT_FULL_WRITE_DOCUMENT . This block is then, generally in the delayed update (V2) is called when you save the business object.

In order to notify the change document object, that it should trigger the event of a BOR object, we define a map in the transaction SWEC .



The detail screen for this line, you can specify the condition editor, for example, nor that the event should be triggered only when changing certain fields:



After these settings caused the new event. Up to this point let's all done with the naked Customizing. If there must be linked to the event to a consumer, you can decide: If you want to own a specific consumer To implement or can you model the desired functions within a workflow. The often desired 08/15-Fall think anyone would like an e-mail alerts, can be almost always solved by workflow resources without programming. The use of a workflow task to an e-mail generation has the additional advantage that the header and detail data is the mail user adjustable, can be used as the wildcard application data.

If one wants to, can couple is also programmed logic to the event. In the following event-type coupling, for example, the function module Z_CONSUME_FIELDSET_CHANGED with the new Event FIELDSET_CHANGED linked. The coupling is given a symbolic name (which is not further validated in the system), here MARA_FIELDSET_CHANGED :
have


The function module must have the following interface and is otherwise freely definable. The internal table EVENT_CONTAINER contains detailed data for the application object: in this case, the number of the change document.

 z_consume_fieldset_changed function. 
*"-----------------------------------------------
----------------------- * "*" Local interface:
* "IMPORTING
*" VALUE (EVENT) EVENT TYPE SWETYPECOU
* "VALUE (RECTYPE) TYPE SWETYPECOU-RECTYPE
*" VALUE (OBJTYPE) TYPE SWETYPECOU-OBJTYPE
* "VALUE (OBJKEY) TYPE SWEINSTCOU-OBJKEY
*" VALUE (EXCEPTIONS_ALLOWED) TYPE SWEFLAGS-EXC_OK
DEFAULT SPACE * "EXPORTING
* "VALUE (REC_ID) TYPE Swelog-recid
*" TABLES *
"EVENT_CONTAINER STRUCTURE SWCONT
*"--------------------------- -------------------------------------------


is worth mentioning, that for a very useful workflow events Trace is that a transaction on the Swel can turn on and off (the switch is of course important, particularly in the productive system). In transaction Swel you can view the log of the event trace. For testing, I have successively carried out two field changes. The log shows that each triggered the event and identified the consumer in accordance with the coupling MARA_FIELDSET_CHANGED and was started correctly.

0 comments:

Post a Comment