cancel
Showing results for 
Search instead for 
Did you mean: 

Question about event handler

Former Member
0 Kudos

Hi,

I'm doing enhancement to opportunity. I want to trigger my function module after I create a new opportunity and save it. I choose "AFTER_CREATE" event, object "OPPORT_H", and tried "Save Document" and "Save Header" for Time, but it didn't stop after save.

Can anybody provide help on this?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

saumya_govil
Active Contributor
0 Kudos

Hi Shane,

I understand your query.

I am not sure how the metjod you mentioned would work. But I can tell you an alternate method to achieve the result.

You can use BO BUS2000111 i.e. for Opportunity event CREATED. Add an event linkage to this BO event in t-code SWETYPV and add your FM as the reciever type.

Hence, whenever a new oppt gets created your FM would trigger.

Hope this helps!

Regards,

Saumya

Former Member
0 Kudos

Thanks for your suggestion, Saumya.

I resolve this by using two events, one for status change, before saving. The other is for save.

saumya_govil
Active Contributor
0 Kudos

Great that you found a way out

Regards,

Saumya

saumya_govil
Active Contributor
0 Kudos

Hi Shane,

Why don't you try this approach!

Create a BADI enhancement for ORDER_SAVE Badi.

This BADI gets triggered when an opportunity is saved.

In the BADI implementation you can call your FM.

Do tell me if there is some other requirement.

Regards,

Saumya

Former Member
0 Kudos

Hi Saumya,

Thank you a lot for your reply.

I chose to use event handler because I don't want to trigger it every time I save an order, I just want it triggered when the opportunity is created.