A method is typically called from a task on some flow, or a single step task. There is however another way to call your method. What has to be taken into account when calling a method is that the parameters a method requires or proposes need to be passed on to the "caller" via the method container. So the actual parameters to using macro SWC_CALL_METHOD are:

This function module is executed to check wheter a given event/workflow linkage should be triggered. This can be set up in customizing on the triggering event. 

Coding example which can fetch an object from a live / used container. This example demonstrates how a container works. 

Function module Z_ERROR_HANDLING with parameters:

  • Title - (string) appears as title in the inbox of administrators, please put identifyable data on this title, such as a purchase order number or a vendor number.

This function module can be applied as template for the "Check function module" in transaction SWETYPV event type linkages. 

Coding example for the creation of an event, which also places some data on the event container to be passed on to the flow (or task). The object key of the business object is supplied (required) in this case with a hardcoded purchase order number. Where the object key consists of more than one values, they should be concatenated together into the OBJKEY field (field length should be takeninto account, so do not use the CONCATENATE statement untested).