Skip to Content
Sep 16, 2014 at 04:49 PM

Terminating event 'Created' in ABAP OO context



I need a little help here. A lot of times I have used terminating event ‘Created’ for different BOR types – and asynchronous tasks where users are asked to create an object using call transaction from a work item.

Now I am struggling with the same in ABAP OO and have an issue:

The goal is to have a terminating event raised on a custom class - and received by a work item if a customer is fully created, that is the general part, the company code part and the sales area part.

Raising the event is working great. I have put in a class in trx. SWEC together with a function module which set the class as object type if the condition is fulfilled.

Then in trx. SWED I have entered another function module to set the key for class together with object_por-catid = ‘CL’.

Then when a customer master record is created I can see in the event trace that the event is raised with the correct key.

No I want to receive the new object into my asynchronous dialog task. I define the event as terminating event – and in the code call transaction XD01.

When the work item is created I find a waiting event linkage in trx. SWE3 – of cause without key; this is unknown until after creating.

But after executing the workitem and raising the event the workitem does not receive the event and is therefore not completed.

Is this approach not possible in ABAP OO – or do I miss something in the class definition / coding?

The event is defined as public instance – I have not coded any event handler method.