| Home • Tips • Tutorials • Forums • Certification Q's • Interview Q's • Jobs • Testimonials • Contact Us | ||
Document Categories:
What's New?
Contribute?Sample SpecsWhat's Hot? |
Triggering an event using Function Module Enhancement6.
Click on the Enhance button
7.
Go to the end of the FM and click on the yellow line. Now
go to Edit -> Enhancement Operations -> Create Enhancement.
8.
Now you would get a popup. Select ‘Code’.
9.
Now enter the details of the new enhancement.
10.
A new enhancement would be created ad the following code
would be added to the end of the FM. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" A
*$*$-Start: (2)------------------------------------------------------------------$*$*
ENHANCEMENT 1 Z_IBPO_OQT_EVENTTRIGGER.
*
ENDENHANCEMENT.
*$*$-End: (2)------------------------------------------------------------------$*$*
ENDFUNCTION.
11.
Now write the
code to trigger the event of the business object inside this enhancement. This
code would be executed when ever an OQT is saved. Call
the FM SAP_WAPI_CREATE. This FM accepts the business object name, Opportunity
GUID and business object event name as input and triggers the BO event.
12.
Save and activate the enhancement. Go to Function Module
-> Activate Enhancement.
13.
Save the Function Module. 14.
Associate the Z business object ZBO_TEST -> OQTSaved
event as a triggering event of a workflow and do the required processing. (BO
creation and event association with the workflow is out of scope of this
document). 15.
Execute the Opportunity transaction. On save of the OQT,
the function module CRM_SVY_OPPORT_PAI would get triggered which would in turn
trigger the business object event. This would trigger your workflow! NOTE: This implementation can be used for save on any survey.
Also enhancement of any function module can be done similarly. This approach
might seem simple, but has vast implications so should be used with care. Also
function module enhancement is only possible on SAP CRM 2007; older
versions do not support it. Conclusion The issue of triggering a workflow from a Java save button was solved. |
|
|
Please send us your feedback/suggestions at webmaster@SAPTechnical.COM Home • Contribute • About Us • Privacy • Terms Of Use • Disclaimer • Safe • Companies: Advertise on SAPTechnical.COM | Post Job • Contact Us ©2006-2007 SAPTechnical.COM. All rights reserved. All
product names are trademarks of their respective companies. SAPTechnical.COM
is in no way affiliated with SAP AG. Graphic Design by Round the Bend Wizards |
||