Custom event creation by using change document concept
Aim:
Main aim of this document try to give some basic knowledge of how to create custom event in SAP Workflow.Here more briefly discussed about Change document concept custom event creation.Based on feedback i will improve myself and sharing my knowledge
Events:
Events are used to trigger the workflows.
Custom Event creation concepts:
Custom events can be created by using all following ways.In below i am given i am small brief about all custom views.
Status management
Transaction : BSVW. Its basically Function will create status profiles.Based on status profile status sequences we can raise the event.For example after PO creation.Status will flow from CREATED to RELEASED status.
From Message
Transaction : SWUY. Its like wizard.Based on message number we can raise the events.
HR master
Info-type linkages based event creation.Transactions :SWEHR1 SWEHR2 SWEHR3.
BTE
BTE is nothing but FICO enhancement,Inside you can raise event by using create event FM. BTE wizard also you can use it by transaction : SWU_EWBTE – Business Transaction Events
Custom enhancement.
you can raise event by using create event FM.
Change document
Transaction SWEC. Change document object of your application needed here you can raise event for Document(PO,PR or DMS or etc.,) CREATE,CHANGE and DELETE.
Step1 : Creating custom event.
Copy BUS2089 —-> ZZBUS2089
Create Custom event : ZDELETE
Goto Transaction : SWEC
Find your approproate Change Document object
for Example Purchase order Change Doc object is : EINKBELEG.In the below image you can see standard linkage.
Copy any one of the line item and do the change for your custom event.
Make sure that Check box in Delete in the following screen shot.
Once linkage done whenever you are deleting the PO line item,Check SWEL. you can see Custom event got triggered.
Thanks all who motivated me to start Documentations…
Provide your valuable feedback to improvise or motivate me.Thanks Again.
Warm Regards,
Ragav
Ragav,
Thanks a lot for this post. It was very helpful..!
For PO we know that BOR is BUS2012. So we can search for it directly in SWEC and attach our custom event by copying it.
In cases where we are not sure about the correct BOR to which we should attach our change document event, can you please tell me how can we find it.
Thanks,
Aspire
Hi Aspire,
There is no direct answer for your question.
Change Document object is defined from the standard SAP.So if you try to find related Object to your application you can find by F4 help.Search relevant description.
(Its same like Enhancement search thru F4 help)
Regards,
Ragav
Thanks a lot Raghav.
Hi Ragavendran ,
i want to trigger the event on deletion of po line item , created t and followed the same procedure ..event paramrter is necessary? or when deletion occurs CHANGE event of FREBUS2012 is triggering , custom enent is not getting triggering..plz help me
thanks,
sandeep ..
Hi,
Parameter is passing depends on the event.Your linkage is not correct that's why it might not triggered.
Because for same standard event is working right ?
Regards,
Ragav
i am created the event , entered in swec on delete ,in field restrictions should enter the table and field name ? in ekpo table lokez is the field deletion indicator..should enter or automatically on deletion my custom event triggers ..
thanks
Hi Aspire,
With description, we can get particular business object from table TOJTB ( BOR basic data table ).
Regards,
Priya
Thanks a lot for sharing this solution Priya.
Nice elaborated content.... 😎
good for the begineers. Cheers 🙂
Hi Ragav,
Thanks for sharing useful information.
Regards,
Murali Krishna.
thanks for the info here.. Appreciated