cancel
Showing results for 
Search instead for 
Did you mean: 

Event

Former Member
0 Kudos

Hi Experts,

Im New to workflow.

Im going to trigger the work flow when purchase order is created. But in my version[4.7] there is no Event for "Create"[BUS2012].

So I need to create one Event like "Create". What are the steps are involved for Creating Events.

Thanks,

Points will be Rewarded for all Helpfull answers.

Accepted Solutions (1)

Accepted Solutions (1)

Anjhi
Contributor
0 Kudos

Hi,

Yes, you need to create a new Event 'Created'. FYI all the event names will be in the past tense. Method names will be Verbs.

Create a new sub type, create event, attach Sub Type to the Main Object Type.

Rgds,

AK

Answers (3)

Answers (3)

Former Member
0 Kudos

Hii Vijji,

You have to create an event using "SWE_EVENT_CREATE".

You need to provide appropiate parameters..

Also you can use class CL_SWF_EVT_EVENT.

Hope you are aware that you need to create a z-object for this, then you extend it.

And also create the z-object as subtype of standard BO, and make the delegation(this will help to access the extended methods and events of z-object accessible in standard)

Hope it helps you..........

Regards,

Ashish

KKilhavn
Active Contributor
0 Kudos

Just one small comment to Ashish's suggestion: You should not use SWE_EVENT_CREATE, you should use the new function which is part of the Workflow Application Programming Interface (WAPI), i.e. you should use the function module SAP_WAPI_CREATE_EVENT.

Former Member
0 Kudos

Hi Experts,

Thanks for your quick reply.

is it possible for write a code in Event. In methods and attributes we can write our own codes.

But In event it is possible?

Thanks.

KKilhavn
Active Contributor
0 Kudos

Events don't have any code, neither SAP-code or customer code. This is only natural, as the BOR object can't know who will be receiving (processing) the event, and thus can not perform any coding.

Events can take parameters, so you can pass additional data to the event receiver, e.g. who caused the event to be created or a release code in the case of a release event.

Former Member
0 Kudos

Hi viji

Create a zobject for purchase order using bus2012 as the parent type and then create an event by right clicking on the events in tx SWo1.

You will have to program the event create for this zobject.

former_member189596
Active Participant
0 Kudos

Hi vijji........

Jsu go through it may help........

http://help.sap.com/saphelp_nw70/helpdata/en/c5/e4aec8453d11d189430000e829fbbd/frameset.htm.

if useful, reward points,

Regards,

Bhaksar