Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can we create an Events

Former Member
0 Kudos

Hello Experts,

I'm having a requirement, in that i want to create a new event.

I have called function module "BP_EVENT_RAISE" in user exit. Once the FM run the event which i have given should be triggered.

So my requirement is i want to create a new event & when this event is triggered the background process should be start.

Can anybody provide me sample code for creation of new event & steps for scheduling background jobs after this event.

Thanks in advance.

Regard,

Muddu

3 REPLIES 3

jack_graus2
Active Contributor
0 Kudos

A batch job event can be raised by calling function module BP_EVENT_RAISE with the batch job event in paramaeter EVENTID.

The batch job event itself needs to be defined first in transaction SM62.

To start a batch job from event the batch job needt to be event triggered. You can assign a batch job event to a batch job in transaction SM37. Then 'Start condition' -> 'After event'.

Regards jack

former_member182041
Active Contributor
0 Kudos

Hi Muddasar,

First of all to use FM BP_EVENT_RAISE is not a good idea . If you can check the documentation of it , its obsolete and is planned to be deleted.

Insted use CALL METHOD cl_batch_event=>raise (all this given in the FM).

Per your requirement - trigger the event which in turn schedules background job : follow below steps:

1. Create an event in SM62. Remember to transport event as well.

2. Trigger the event via method mentioned above.

3. Now in the job to be scheduled, (SM36), select start condition as 'AFTER EVENT' and specify the event name created.

You can specify the parameter name as well if in case two different parameters of same event trigger different jobs.

Regards,

Kumud

Former Member
0 Kudos

Hi,

CALL METHOD cl_swf_evt_event=>raise_in_update_task

or

CALL METHOD cl_swf_evt_event=>raise

for create a event.