Workflow Event form change document via SWECDOBJ-EVENTFB
|
Every application that writes change documents triggers a workflow event
from within the function module CHANGEDOCUMENT_CLOSE,
which is called form the update processing upon writing the change document. This will
call the workflow processor |
|
|
FUNCTION swe_event_create_changedocumnt
|
|
|
which in turn will call the function module, which is defined in field
EVENTFB of table SWECDOBJ for each change document type. The follwoing call is performed,
so make sure your function module matches the specified interface parameters. (changedocument_header is declared with structure CDHDR) |
|
|
CALL FUNCTION swecdobj-objtypefb
EXPORTING
changedocument_header = changedocument_header
objecttype = swecdobj-objtype
IMPORTING
objecttype = swecdobj-objtype
TABLES
changedocument_position = changedocument_position.
|
|
|
We include an example Z_CHANGEDOCUMENT_WORKFLOW which is will send the
customer master IDoc upon each save after modifying a customer master record. To make it
work, the name of the function module must be entered in SWECDOBJ-EVENTFB for the document
type KUNA. |