<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Times New Roman","serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText>Hi Mike,<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Another WFer (Thank you Rob!) clued me in to the error of
my ways.&nbsp; I restored the SWEHR2 entries to where they were supposed to be
(of course, not letting Basis know I had too much access!) and corrected some
entries in SWEHR3.&nbsp; Added a function to raise the event, instead of trying
to raise the event directly.&nbsp; Then, I set a breakpoint in my FM, and after
I perform the PO13 creation of the new relationship - bing! - I am dropped into
my FM and can see that the event will get raised (with some minor corrections
to the function).<o:p></o:p></p>

<p class=MsoPlainText><br>
Anyhow, for those who care, table SWEHR3 now looks like:<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><img width=861 height=613 id="Picture_x0020_1"
src="cid:image001.png@01C89FAC.2715CAB0"><o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>So, I now get the event specified in my custom FM, raised
by SAP_WAPI_EVENT_CREATE_EVENT, and have a little more logic to put in to build
the event container so that it reflects the delimited relationship, instead of
the new one.&nbsp; For some reason, using UPD and DEL did not bring me any joy,
so I&#8217;ll just work backwards from there.&nbsp; <o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Best regards,<o:p></o:p></p>

<p class=MsoPlainText>Sue<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>----<o:p></o:p></p>

<p class=MsoPlainText>Susan R. Keohan<o:p></o:p></p>

<p class=MsoPlainText>SAP Workflow Specialist<o:p></o:p></p>

<p class=MsoPlainText>MIT Lincoln Laboratory<o:p></o:p></p>

<p class=MsoPlainText>244 Wood Street, LI-200<o:p></o:p></p>

<p class=MsoPlainText>Lexington, MA.&nbsp; 02420<o:p></o:p></p>

<p class=MsoPlainText>Ph:&nbsp;&nbsp; 781-981-3561<o:p></o:p></p>

<p class=MsoPlainText>Fax: 781-981-1607<o:p></o:p></p>

<p class=MsoPlainText>keohan@LL.MIT.EDU<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>-----Original Message-----<br>
From: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] On Behalf Of Mike
Pokraka<br>
Sent: Wednesday, April 16, 2008 5:35 AM<br>
To: SAP Workflow Users' Group<br>
Subject: Re: HR Event - Position Transfer from Org Unit<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Hi Sue,<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>One difference between SWEHR2 and SWEHR3 is that you
cannot<o:p></o:p></p>

<p class=MsoPlainText>forward-navigate to the function module by doubleclicking
on it in SWEHR3.<o:p></o:p></p>

<p class=MsoPlainText>This probably doesn't help your cause but I thought I'd
mention it anyway.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>At my present site I have too much auth to verify this,
but I think at<o:p></o:p></p>

<p class=MsoPlainText>other sites I could not create new entries in SWEHR2. I
think they're<o:p></o:p></p>

<p class=MsoPlainText>basically the same, but one is for SAP and one for us. I
modify SW...2<o:p></o:p></p>

<p class=MsoPlainText>when changing SAP-delivered setup and use SW...3 to
create new<o:p></o:p></p>

<p class=MsoPlainText>object/event combos.<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Other than that you've pretty much got it spot on. The
difference between<o:p></o:p></p>

<p class=MsoPlainText>event and FM is that an event will always be raised. If
the process code<o:p></o:p></p>

<p class=MsoPlainText>is not enough to identify what happened, a FM allows you
to put some more<o:p></o:p></p>

<p class=MsoPlainText>conditions around it (e.g. by comparing before/after
images to determine<o:p></o:p></p>

<p class=MsoPlainText>what changed).<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Cheers,<o:p></o:p></p>

<p class=MsoPlainText>Mike<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>On Tue, April 15, 2008 4:07 pm, Keohan, Susan wrote:<o:p></o:p></p>

<p class=MsoPlainText>&gt; Hi WFers,<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Really at wit's end here (which is not too far to
go).&nbsp; I've read all the<o:p></o:p></p>

<p class=MsoPlainText>&gt; posts related to raising events using SWEHR1,
SWEHR2, and SWEHR3...<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; R/3 4.6c...<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; I need to raise an event, preferably PDOTYPE_SH
POSTRANSFER, when a<o:p></o:p></p>

<p class=MsoPlainText>&gt; position is transferred out of one org unit into
another.&nbsp; Our HR friends<o:p></o:p></p>

<p class=MsoPlainText>&gt; want us to do this based on the creation of a new
relationship A003<o:p></o:p></p>

<p class=MsoPlainText>&gt; between position and org, or the delimiting of
previous relationship.<o:p></o:p></p>

<p class=MsoPlainText>&gt; They are not comfortable with using HR Actions to
raise the event.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Entry in SWEHR1:&nbsp; Relationship between Position
and object type PDOTYPE_SH<o:p></o:p></p>

<p class=MsoPlainText>&gt; [cid:image001.png@01C89EE7.F110C060]<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Entry in SWEHR2: (HR-CA Event Linkage) - I have a
custom FM in the FM<o:p></o:p></p>

<p class=MsoPlainText>&gt; field which calls SAP_WAPI_CREATE_EVENT to raise the
event.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; [cid:image002.png@01C89EE7.F110C060]<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Entry in SWEHR3- Event Linkage for Customer -<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; [cid:image003.png@01C89EE8.E88794E0]<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Can it be done ?
Raise an event for PDOTYPE_SH POSTRANSFER based<o:p></o:p></p>

<p class=MsoPlainText>&gt; on a PO13 (copy relationship, enter new begin date
and org, delimit old<o:p></o:p></p>

<p class=MsoPlainText>&gt; org relationship)?<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 2)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do I need to use a
custom FM, or is it enough to specify the EVENT<o:p></o:p></p>

<p class=MsoPlainText>&gt; in SWEHR2/SWEHR3... The entries seem to be mutually
exclusive.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do you need to wait
for a day or should the event get raised (if<o:p></o:p></p>

<p class=MsoPlainText>&gt; ever) immediately, regardless of start date on new
org assignment ?<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 4)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I've tried
debugging through, but no SWE_EVENT_CREATE,<o:p></o:p></p>

<p class=MsoPlainText>&gt; HR_EVENT_CREATE, SAP_WAPI_CREATE_EVENT gets called.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 5)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Are the entries in
SWEHR2 and SWEHR3 redundant ?<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; 6)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any other tips ?<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Thanks for any help on this issue.<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; Sue<o:p></o:p></p>

<p class=MsoPlainText>&gt; ----<o:p></o:p></p>

<p class=MsoPlainText>&gt; Susan R. Keohan<o:p></o:p></p>

<p class=MsoPlainText>&gt; SAP Workflow Specialist<o:p></o:p></p>

<p class=MsoPlainText>&gt; MIT Lincoln Laboratory<o:p></o:p></p>

<p class=MsoPlainText>&gt; 244 Wood Street, LI-200<o:p></o:p></p>

<p class=MsoPlainText>&gt; Lexington, MA.&nbsp; 02420<o:p></o:p></p>

<p class=MsoPlainText>&gt; Ph:&nbsp;&nbsp; 781-981-3561<o:p></o:p></p>

<p class=MsoPlainText>&gt; Fax: 781-981-1607<o:p></o:p></p>

<p class=MsoPlainText>&gt; keohan@LL.MIT.EDU<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>&gt; _______________________________________________<o:p></o:p></p>

<p class=MsoPlainText>&gt; SAP-WUG mailing list<o:p></o:p></p>

<p class=MsoPlainText>&gt; SAP-WUG@mit.edu<o:p></o:p></p>

<p class=MsoPlainText>&gt; http://mailman.mit.edu/mailman/listinfo/sap-wug<o:p></o:p></p>

<p class=MsoPlainText>&gt;<o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>_______________________________________________<o:p></o:p></p>

<p class=MsoPlainText>SAP-WUG mailing list<o:p></o:p></p>

<p class=MsoPlainText>SAP-WUG@mit.edu<o:p></o:p></p>

<p class=MsoPlainText>http://mailman.mit.edu/mailman/listinfo/sap-wug<o:p></o:p></p>

</div>

</body>

</html>