<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:tahoma, new york, times, serif;font-size:10pt"><DIV></DIV>
<DIV>Dear Khatawate,</DIV>
<DIV>&nbsp;</DIV>
<DIV>First I'd advise using SAPI_WAPI_CREATE_EVENT since it is a released FM while the one you specified is not.</DIV>
<DIV>Afterwards you may use SAP_WAPI_WORKITEMS_TO_OBJECT to resolve&nbsp;workitems per&nbsp;object. Then you can look for workitems&nbsp;by type and status to found the started WF.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I do not think&nbsp;you'll be able to get the&nbsp;workitem&nbsp;ID&nbsp;during run-time because the event is published and the workflow&nbsp;subscribes using RFC so it is all in separate task.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Good luck,<BR>&nbsp;</DIV>
<P><FONT face="verdana, helvetica, sans-serif" color=#00007f size=2><STRONG>Regards,<BR>Shai Eyal</STRONG></FONT></P>
<P><FONT face=Verdana color=#000080 size=2><STRONG>SAP Logistics senior consultant<BR>SAP Workflow specialist<BR>Mobile: 972-52-5816633</STRONG></FONT></P>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: tahoma, new york, times, serif"><BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: "sap-wug-request@mit.edu" &lt;sap-wug-request@mit.edu&gt;<BR>To: sap-wug@mit.edu<BR>Sent: Tuesday, April 15, 2008 18:16:12<BR>Subject: SAP-WUG Digest, Vol 41, Issue 48<BR><BR>Send SAP-WUG mailing list submissions to<BR>&nbsp;&nbsp;&nbsp; <A href="mailto:sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A><BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>&nbsp;&nbsp;&nbsp; <A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A><BR>or, via email, send a message with subject or body 'help' to<BR>&nbsp;&nbsp;&nbsp; <A href="mailto:sap-wug-request@mit.edu" ymailto="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</A><BR><BR>You can reach the person managing the list at<BR>&nbsp;&nbsp;&nbsp; <A href="mailto:sap-wug-owner@mit.edu"
 ymailto="mailto:sap-wug-owner@mit.edu">sap-wug-owner@mit.edu</A><BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of SAP-WUG digest..."<BR><BR><BR>Today's Topics:<BR><BR>&nbsp; 1. How to get Workflow ID Number (Khatawate, Deepak N (ACCENTURE))<BR>&nbsp; 2. HR Event - Position Transfer from Org Unit (Keohan, Susan)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Tue, 15 Apr 2008 15:57:32 +0100<BR>From: "Khatawate, Deepak N (ACCENTURE)" &lt;<A href="mailto:Deepak.Khatawate@bp.com" ymailto="mailto:Deepak.Khatawate@bp.com">Deepak.Khatawate@bp.com</A>&gt;<BR>Subject: How to get Workflow ID Number<BR>To: "SAP Workflow Users' Group" &lt;<A href="mailto:sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A>&gt;<BR>Message-ID:<BR>&nbsp;&nbsp;&nbsp; &lt;<A href="mailto:2019246BF83D0F46A0376FF2A463F7120A1AEDBD@BP1XEUEX021-C.bp1.ad.bp.com"
 ymailto="mailto:2019246BF83D0F46A0376FF2A463F7120A1AEDBD@BP1XEUEX021-C.bp1.ad.bp.com">2019246BF83D0F46A0376FF2A463F7120A1AEDBD@BP1XEUEX021-C.bp1.ad.bp.com</A>&gt;<BR>Content-Type: text/plain; charset="us-ascii"<BR><BR><BR>Hi,<BR><BR>Am triggering a workflow from an event using function Module<BR>SWE_EVENT_CREATE in my program. Once the FM triggers the event i need to<BR>capture the workflow ID number/workitem number of the workflow<BR>triggered.<BR>I tried to search for function module with no luck.<BR><BR>System: 4.6C<BR><BR>Regards,<BR>Deepak N K<BR><BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/f4882a82/attachment-0001.htm" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/f4882a82/attachment-0001.htm</A><BR><BR>------------------------------<BR><BR>Message: 2<BR>Date: Tue, 15 Apr 2008 11:07:35 -0400<BR>From:
 "Keohan, Susan" &lt;<A href="mailto:keohan@ll.mit.edu" ymailto="mailto:keohan@ll.mit.edu">keohan@ll.mit.edu</A>&gt;<BR>Subject: HR Event - Position Transfer from Org Unit<BR>To: "SAP Workflow Users' Group" &lt;<A href="mailto:sap-wug@mit.edu" ymailto="mailto:sap-wug@mit.edu">sap-wug@mit.edu</A>&gt;<BR>Message-ID:<BR>&nbsp;&nbsp;&nbsp; &lt;<A href="mailto:E74DD9A4E0338F4F98DBE83861654A0C06B283E1B0@LLE2K7-BE01.mitll.ad.local" ymailto="mailto:E74DD9A4E0338F4F98DBE83861654A0C06B283E1B0@LLE2K7-BE01.mitll.ad.local">E74DD9A4E0338F4F98DBE83861654A0C06B283E1B0@LLE2K7-BE01.mitll.ad.local</A>&gt;<BR>&nbsp;&nbsp;&nbsp; <BR>Content-Type: text/plain; charset="us-ascii"<BR><BR>Hi WFers,<BR><BR>Really at wit's end here (which is not too far to go).&nbsp; I've read all the posts related to raising events using SWEHR1, SWEHR2, and SWEHR3...<BR><BR>R/3 4.6c...<BR><BR>I need to raise an event, preferably PDOTYPE_SH POSTRANSFER, when a position is transferred out of one org
 unit into another.&nbsp; Our HR friends want us to do this based on the creation of a new relationship A003 between position and org, or the delimiting of previous relationship.&nbsp; They are not comfortable with using HR Actions to raise the event.<BR><BR>Entry in SWEHR1:&nbsp; Relationship between Position and object type PDOTYPE_SH<BR>[cid:<A href="mailto:image001.png@01C89EE7.F" ymailto="mailto:image001.png@01C89EE7.F">image001.png@01C89EE7.F</A>110C060]<BR><BR>Entry in SWEHR2: (HR-CA Event Linkage) - I have a custom FM in the FM field which calls SAP_WAPI_CREATE_EVENT to raise the event.<BR><BR><BR>[cid:<A href="mailto:image002.png@01C89EE7.F" ymailto="mailto:image002.png@01C89EE7.F">image002.png@01C89EE7.F</A>110C060]<BR><BR><BR>Entry in SWEHR3- Event Linkage for Customer -<BR><BR>[cid:<A href="mailto:image003.png@01C89EE8.E" ymailto="mailto:image003.png@01C89EE8.E">image003.png@01C89EE8.E</A>88794E0]<BR><BR><BR><BR>1)&nbsp; &nbsp; &nbsp; Can it
 be done ? Raise an event for PDOTYPE_SH POSTRANSFER based on a PO13 (copy relationship, enter new begin date and org, delimit old org relationship)?<BR><BR>2)&nbsp; &nbsp; &nbsp; Do I need to use a custom FM, or is it enough to specify the EVENT in SWEHR2/SWEHR3... The entries seem to be mutually exclusive.<BR><BR>3)&nbsp; &nbsp; &nbsp; Do you need to wait for a day or should the event get raised (if ever) immediately, regardless of start date on new org assignment ?<BR><BR>4)&nbsp; &nbsp; &nbsp; I've tried debugging through, but no SWE_EVENT_CREATE, HR_EVENT_CREATE, SAP_WAPI_CREATE_EVENT gets called.<BR><BR>5)&nbsp; &nbsp; &nbsp; Are the entries in SWEHR2 and SWEHR3 redundant ?<BR><BR>6)&nbsp; &nbsp; &nbsp; Any other tips ?<BR><BR><BR><BR>Thanks for any help on this issue.<BR><BR>Sue<BR>----<BR>Susan R. Keohan<BR>SAP Workflow Specialist<BR>MIT Lincoln Laboratory<BR>244 Wood Street, LI-200<BR>Lexington, MA.&nbsp; 02420<BR>Ph:&nbsp; 781-981-3561<BR>Fax:
 781-981-1607<BR><A href="mailto:keohan@LL.MIT.EDU" ymailto="mailto:keohan@LL.MIT.EDU">keohan@LL.MIT.EDU</A><BR><BR>-------------- next part --------------<BR>An HTML attachment was scrubbed...<BR>URL: <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/attachment.htm" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/attachment.htm</A><BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: image001.png<BR>Type: image/png<BR>Size: 15692 bytes<BR>Desc: image001.png<BR>Url : <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image001.png" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image001.png</A><BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: image002.png<BR>Type: image/png<BR>Size: 17183 bytes<BR>Desc: image002.png<BR>Url : <A
 href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image002.png" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image002.png</A><BR>-------------- next part --------------<BR>A non-text attachment was scrubbed...<BR>Name: image003.png<BR>Type: image/png<BR>Size: 21340 bytes<BR>Desc: image003.png<BR>Url : <A href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image003.png" target=_blank>http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image003.png</A><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>SAP-WUG mailing list<BR><A href="mailto:SAP-WUG@mit.edu" ymailto="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</A><BR><A href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target=_blank>http://mailman.mit.edu/mailman/listinfo/sap-wug</A><BR><BR><BR>End of SAP-WUG Digest, Vol 41, Issue
 48<BR>***************************************<BR></DIV><BR></DIV></div><br>Send instant messages to your online friends http://uk.messenger.yahoo.com </body></html>