<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic creating events in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160841#M994765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create events from application or system program.how can i do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Jul 2008 11:01:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-07-11T11:01:54Z</dc:date>
    <item>
      <title>creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160841#M994765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to create events from application or system program.how can i do it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 11:01:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160841#M994765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T11:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160842#M994766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use 'SWE_EVENT_CREATE' functin to create system events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;take eg from this program...&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SWE_EVENT_CREATE'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;OBJTYPE = 'ZYMBOR'&lt;/P&gt;&lt;P&gt;OBJKEY = OBJKY&lt;/P&gt;&lt;P&gt;EVENT = 'ADD_ENTRY'&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CREATOR = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TAKE_WORKITEM_REQUESTER = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;START_WITH_DELAY = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;START_RECFB_SYNCHRON = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NO_COMMIT_FOR_QUEUE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;DEBUG_FLAG = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;NO_LOGGING = ' '&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IDENT =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EVENT_ID =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;EVENT_CONTAINER = i_cont&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;OBJTYPE_NOT_FOUND = 1&lt;/P&gt;&lt;P&gt;OTHERS = 2&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this will clear your doubt.&lt;/P&gt;&lt;P&gt;please reward if it helps.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 11:06:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160842#M994766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T11:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160843#M994767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pooja,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using Function Module  SWE_EVENT_CREATE &lt;/P&gt;&lt;P&gt;you can Create event from application program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You Can get the Deatils in the link-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af4a453d11d189430000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af4a453d11d189430000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample Code for your reference-&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:
  key LIKE sweinstcou-objkey,
  w_creator TYPE swhactor.

key = 'MM017'. " Material Number (hard-coded)

w_creator-otype = 'US'.
w_creator-objid = 'SAPDEV02'.


CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'Y1151_MAT2'
objkey = key
event = 'Ecreate'
 creator = w_creator
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2
.
IF sy-subrc &amp;lt;&amp;gt; 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
  WRITE 'Event Triggered'.
ENDIF.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 11:18:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160843#M994767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T11:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160844#M994768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://searchsap.techtarget.com/general/0,295582,sid21_gci1156900,00.html" target="test_blank"&gt;http://searchsap.techtarget.com/general/0,295582,sid21_gci1156900,00.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.erpgenie.com/basis/events.htm" target="test_blank"&gt;http://www.erpgenie.com/basis/events.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.saptechies.com/sap-events/" target="test_blank"&gt;http://www.saptechies.com/sap-events/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sowmya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 11:31:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160844#M994768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T11:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160845#M994769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys &lt;/P&gt;&lt;P&gt;That's only (The EASY) part of the answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What the OP wants I suspect is an explanation of actually how to process an action when the event takes place.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody can say use  FMOD xxxxxx.  Actually the FMOD you want these days is actually SAP_WAPI_CREATE_EVENT.&lt;/P&gt;&lt;P&gt;Also I think the OP would like to know HOW to use the FMOD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you need to do a bit of prep before  your application can use your event.  (Note it's better these days to use classes but for simplicity I'll stick to the old method as you can try this out on your own system quite easily (or even the ABAP demo minisystem downloadable from SDN).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Define an event in a Business object (BOR). Use transaction SWO1 to build  a simple business object and define an event in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you create say a ZTABLE with two  or 3 fields in it -- a number (key) and two fields.  Now your BOR should be an instance of the ZTABLE object.  So define in your BOR two events  CREATE and CHANGE. You don't need any code.&lt;/P&gt;&lt;P&gt;In the Methods section of your BOR define two methods   do_when_changed and do_when_created -- these can be really simple stuff like just send an express mail to yourself to prove the process works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Define  two tasks  with transaction PFTC. these will be TSXXXXXXXXX. In the task specify your business object (ZTABLE) and the method you want executed  such as do_when_changed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Now use transaction SWE2 and put your Business object, the events CREATE and CHANGE and the TSXXXXXXX task numbers . (You can start an entire Workflow like this but keep it simple to start with so I use a one step task for each event).&lt;/P&gt;&lt;P&gt;Fill in the rest of the table fields as per other entries in SWE2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4)  Code an application program which calls the function module specified above. You'll need to pass the key of your business object to the function module and specify the event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) if it all works properly you should get an express mail in your inbox or whatever process you used as a task to be performed when the evnt is triggered.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that to start with use "synchronous" tasks - when you use PFTC you'll see the checkbox. If you use Asynchronous tasks the task won't end until you raise another event to specifically terminate the process. This is a bit more complex (not too difficult) but I suggest you try the easy way first..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;jimbo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 11:47:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160845#M994769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T11:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: creating events</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160846#M994770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af4a453d11d189430000e829fbbd/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4af4a453d11d189430000e829fbbd/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chk it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Jul 2008 12:10:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/creating-events/m-p/4160846#M994770</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-11T12:10:08Z</dc:date>
    </item>
  </channel>
</rss>

