Warning: include_once(http://erpgenie.com/_borders/topabap.htm) [function.include-once]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/templates/rhuk_solarflare_ii/index.php on line 52

Warning: include_once() [function.include]: Failed opening 'http://erpgenie.com/_borders/topabap.htm' for inclusion (include_path='.:') in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/templates/rhuk_solarflare_ii/index.php on line 52

Login

Login to view more content!!!





Lost Password?
No account yet? Register

Registered Access

Poll

What area of ABAP are you interested in?
 
Home arrow Tips and Tricks arrow General arrow Starting and Event to kick off a job
Starting and Event to kick off a job PDF Print E-mail
User Rating: / 1
PoorBest 
Written by Kevin Wilson   
Monday, 23 July 2007
Ever needed to kick off a job from another external system? This tip shows you how to kick off an event. A background job is then created in SM36 that waits for this event to occur. Scheduling this job as a periodic job will cause this job to be kicked off each time this event happens. It has the ability to send in a parameter which allows you to configure the ABAP of the job to react differently based on the event parameter. Use SM62 to create the user defined event. Events let you start background jobs when particular changes in the SAP system take place. When an event occurs, the background processing system starts all jobs that were scheduled to wait for that event.
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e2a543b11d1898e0000e8322d00/frameset.htm

Events have meaning only in the background processing system. You can use events only to start background jobs.

Triggering an event notifies the background processing system that a named condition has been reached. The background processing system reacts by starting any jobs that were waiting for the event.
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/096e37543b11d1898e0000e8322d00/frameset.htm


Use function module BP_EVENT_RAISE to trigger an event from an ABAP program or BAPI_XBP_EVENT_RAISE from an external system.

Example


* Report processing before triggering event...
*
* Trigger event to start background jobs waiting for the event.
*
DATA: EVENTID LIKE TBTCJOB-EVENTID.
DATA: EVENTPARM LIKE TBTCJOB-EVENTPARM.

EVENTID = 'SP_TEST_EVENT'. " Event name must be defined
" with transaction SM62.

EVENTPARM = 'EVENT1'. " Optional: a job can be
" scheduled to wait for an
" EVENTID or combination of
" EVENTID and EVENTPARM.

CALL FUNCTION 'BP_EVENT_RAISE' " Event is triggered. Jobs
EXPORTING " waiting for event will be
EVENTID = EVENTID " started.
EVENTPARM = EVENTPARM
TARGET_INSTANCE = ‘ ‘ " Instance at which an event
" should be processed. Can
" generally be omitted.
EXCEPTIONS OTHERS = 1. " Exceptions include event not
" defined, no EVENTID
" exported, etc.

Related Items:

 
< Prev   Next >

Google Search

Statistics

Contribution Activity
Utilities: 38
Tips and Tricks: 333
Sample Code: 164
Total Contributions: 550

Member Activity
Members: 6244 since 2/1/2007!
New: 1 since yesterday!
Visitors: 1077666

Newest Members

Welcome our newest members:

Google Ads


Warning: include(http://erpgenie.com/_borders/bottom.htm) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/includes/footer.php on line 22

Warning: include() [function.include]: Failed opening 'http://erpgenie.com/_borders/bottom.htm' for inclusion (include_path='.:') in /var/www/vhosts/erpgenie.com/httpdocs/abaptips/includes/footer.php on line 22