Triggering SAP Events from External Programs

Use the SAP program SAPEVT to trigger an event from a program running outside the SAP system.

The syntax for SAPEVT is as follows:

sapevt <EVENTID> [-p <EVENTPARM>] [-t]
pf=<Profile Name>|name=<SAP system name> nr=<SAP system mumber>

Example: sapevt END_OF_FI_DATATRANS name=C11 nr=11 triggers the event END_OF_FI_DATATRANS without a parameter. The event is triggered in SAP system C11, instance number 11. Any jobs that are waiting for this event are started.

The SAPEVT parameters are as follows:

  • <EVENTID>: The name of the event as defined in the SAP system with transaction SM64.
  • -p <EVENTPARM>: An optional argument for the EVENTID which qualifies the event. The EVENTPARM is not defined in the SAP system.
  • -t: Causes SAPEVT to log its actions in a short trace file. You can find the trace file in the current directory of the user who called SAPEVT.
  • pf=<Profile Name> or name=<SAP system name> nr=<SAP system mumber>: Either pf or name and nr identify the SAP system in which the event is to be triggered. At least one instance of the SAP system must be active when SAPEVT runs. Otherwise, the system will not know that the event has occurred. The instance must have the number specified in the SAPEVT call.

In more detail, the parameters for identifying the SAP system are as follows:

  • pf <Profile Name>: Enter the name of the profile with which the SAP background processing instance(s) are started. SAPEVT identifies the SAP system from the specifications in the profile.
  • You can find SAP system profiles in the globally shared SAP directory SYS\profile (Windows NT), or SYS/profile (UNIX).
  • name=<SAP system name> nr=<SAP system number>: The name of the SAP system (SID) and the SAP system number.

Abdel SIDHOM has written 38 articles

Leave a Reply

Your email address will not be published. Required fields are marked *

five × 3 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>