SAP ABAP MINI DAEMON ABEXA



Get Example source ABAP code based on a different SAP table
  



ABAP_ADF - Simple ABAP Daemon
This example demonstrates a mini ABAP daemon .

ABAP_SOURCE_CODE
DEMO CL_DEMO_ABAP_SIMPLE_DAEMON

ABAP_DESCRIPTION
The class CL_DEMO_ABAP_MINI_DAEMON used by the class above demonstrates a mini ABAP daemon class. It implements only the following methods of the interface IF_ABAP_DAEMON_EXTENSION:
ON_ACCEPT
METH CL_DEMO_ABAP_MINI_DAEMON=>IF_ABAP_DAEMON_EXTENSION~ON_ACCEPT In this method, the return value E_SETUP_MODE must be set, otherwise the daemon is not created. The method limits the creation of daemons to the class CL_DEMO_ABAP_SIMPLE_DAEMON.
ON_MESSAGE
METH CL_DEMO_ABAP_MINI_DAEMON=>IF_ABAP_DAEMON_EXTENSION~ON_MESSAGE This method indicates that the daemon is reacting to a message from a class. To enable this, the message is exported to the cross-transaction application buffer of the shared memory.
The class CL_DEMO_ABAP_SIMPLE_DAEMON uses the ABAP daemon manager to do the following:
Start a daemon based on the class CL_DEMO_ABAP_MINI_DAEMON.
Send a PCP message using a temporary ABAP daemon handle.
Stop the daemon immediately, which is not a typical step.
It then checks whether the daemon wrote the message to the shared memory.