The OLE control version of the SAP Automation GUI Component provides the following OLE events to its control container.
OnLogoff OnNewEvent OnNewSession OnDelSessionThese events allow the container to respond when a new event has been received in response to a GUI Component call.
This is useful, for instance, in allowing a container program to replay macros and drive a reconstructed version of the SAP interface based on the incoming SAP event data.