Application Development and Automation 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: 
Read only

BP_EVENT_RAISE

Former Member
0 Likes
2,381

Hi all,

How to use fm BP_EVENT_RAISE to raise an event to get some of the values from BADI and use it in program ?

Please explain me in detail.

Thanks,

Vinay.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,884

Hi Vinay,

Follow the below steps to achieve the requirement:

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 u2018BP_EVENT_RAISEu2019.

REPORT Z_Evnt_Trigger .

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 u201CStart conditionu201D button.

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

Now go back to the initial screen and press u201CStepu201D 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

Regards,

Soundarya.

Edited by: K.Soundarya Singh on Apr 5, 2010 11:59 AM

Edited by: K.Soundarya Singh on Apr 5, 2010 11:59 AM

Hi all,

How to use fm BP_EVENT_RAISE to raise an event to get some of the values from BADI and use it in program ?

Please explain me in detail.

Thanks,

Vinay.

1 REPLY 1
Read only

Former Member
0 Likes
1,885

Hi Vinay,

Follow the below steps to achieve the requirement:

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 u2018BP_EVENT_RAISEu2019.

REPORT Z_Evnt_Trigger .

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 u201CStart conditionu201D button.

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

Now go back to the initial screen and press u201CStepu201D 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

Regards,

Soundarya.

Edited by: K.Soundarya Singh on Apr 5, 2010 11:59 AM

Edited by: K.Soundarya Singh on Apr 5, 2010 11:59 AM