0% found this document useful (0 votes)
69 views9 pages

Trigger BK Job by Event

This document provides steps to schedule a background job by triggering an event in SAP: 1. Create an event from transaction SM62 and give it a name and description. 2. Create a program that calls the FM 'BP_EVENT_RAISE' to trigger the event. 3. Configure the background job from transaction SM36, selecting the event as the start condition and providing the program and variant. 4. Execute the triggering program and check the job status and output with transactions SM37 and SPOOL.

Uploaded by

vardhanfrd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views9 pages

Trigger BK Job by Event

This document provides steps to schedule a background job by triggering an event in SAP: 1. Create an event from transaction SM62 and give it a name and description. 2. Create a program that calls the FM 'BP_EVENT_RAISE' to trigger the event. 3. Configure the background job from transaction SM36, selecting the event as the start condition and providing the program and variant. 4. Execute the triggering program and check the job status and output with transactions SM37 and SPOOL.

Uploaded by

vardhanfrd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Scheduling a background job by triggering an event

Email ThisBlogThis!Share to TwitterShare to Facebook Step1: Create event from transaction SM62.

Give event name and description and press save button

Step2: Create a program that triggers this event by calling the FM BP_EVENT_RAISE.
*&---------------------------------------------------------------------* *& Report Z_TRIGGER_EVENT * *& * *&---------------------------------------------------------------------* *& * *& * *&---------------------------------------------------------------------* REPORT Z_TRIGGER_EVENT . CALL FUNCTION 'BP_EVENT_RAISE' EXPORTING eventid = 'Z_TRIGGER_JOB' EXCEPTIONS BAD_EVENTID = 1 EVENTID_DOES_NOT_EXIST = 2 EVENTID_MISSING = 3 RAISE_FAILED = 4 OTHERS = 5 . IF sy-subrc <> 0. Write: 'Event failed to trigger'. else. Write: 'Event triggered'. ENDIF.

Step3: Configure the background job from transaction SM36. In the initial screen give job name and job class and press Start condition button.

In the popup screen press After event button and give the event name and then press save button.

Now go back to the initial screen and press Step button

Provide program and variant name and after providing all the values press save button.

In the initial screen press save button.

Step4: Now execute the program to trigger the event and as well check the background job.

Run transaction SM37

Check the status of job defined above

Now check the spool to see the generated list

You might also like