<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <tt>John,<br>
      <br>
      I am not sure if the workflow/workitem context will be available
      for a check function module. I had a similar need for a different
      object and implemented the code below in an event function module
      in SWEC.<br>
      <br>
      <font color="black" size="1"><span style="font-size: 9pt;
          font-family: &quot;Arial monospaced for SAP&quot;; color:
          black;"><font color="#3333ff">* Did the change happen from
            Workflow? Try and Get calling Work
            Item Id</font><font color="blue"><br>
          </font>  CALL METHOD cl_swf_evt_requester=&gt;get_workitem<br>
              IMPORTING<br>
                ex_workitem     =
          lv_workitem<br>
                ex_workitem_id = lv_workitem_id.</span></font><br>
      <font color="black" size="1"><span style="font-size: 9pt;
          font-family: &quot;Arial monospaced for SAP&quot;; color:
          black;">  IF lv_workitem_id IS NOT INITIAL.</span><span
          style="font-size: 9pt; font-family: &quot;Arial monospaced for
          SAP&quot;; color: blue;"><br>
          * Do Not Raise the Event - Called from Workflow</span><span
          style="font-size: 9pt; font-family: &quot;Arial monospaced for
          SAP&quot;; color: black;"><br>
              REFRESH events.<br>
              EXIT.<br>
            ENDIF.</span></font><br>
    </tt>
    <font size="2"><span style="font-size: 10pt; font-family: Arial;"><tt> <br>
        </tt></span></font><tt>I have recently experienced the same
      issue for the Trip Approval while trying to help a friend and
      found it strange that both events are being raised on Approval. If
      this works for you, It will probably help him as well.<br>
    </tt><br>
    <font size="2"><span style="font-size: 10pt; font-family: Arial;"><tt>Regards,<br>
          Ramki</tt></span></font><font face="Arial" size="2"><span
        style="font-size: 10pt; font-family: Arial;"><br>
      </span></font><br>
    <br>
    <br>
    On 4/6/11 7:59 AM, John Haworth wrote:
    <blockquote
cite="mid:OF51BE0B95.8AA6EB90-ON8025786A.00410E28-8025786A.0041FEA4@csc.com"
      type="cite">
      <br>
      <font face="sans-serif" size="2">Hi</font>
      <br>
      <br>
      <font face="sans-serif" size="2">I have a new workflow for TRIP
        approvals.
        I have an issue, in that in my workflow I have two wait for
        event legs,
        that are waiting for event APPROVED and event CHANGED, as the
        trip could
        be approved outside of the workflow (and /or changed outside the
        workflow)</font>
      <br>
      <br>
      <font face="sans-serif" size="2">The problem is that when the TRIP
        is
        approved, both CHANGE and APPROVE events are issued, seeing the
        CHANGE
        event ends my workflow.</font>
      <br>
      <br>
      <font face="sans-serif" size="2">I only want to recognise the
        change
        event, when it happens from outside the workflow, I thought a
        check function
        module on the change event, but how do I determine if the event
        was as
        a result of the TRIP being approved, or changed outside of the
        workflow
        (it could be approved outside of the workflow too).</font>
      <br>
      <font face="sans-serif" size="2"> </font>
      <br>
      <font face="sans-serif" size="2">Kind Regards<br>
        <br>
        John Haworth<br>
        SAP PDM<br>
        CSC<br>
        <br>
        Euxton House, Euxton Lane, Chorley, PR7 6FE.<br>
        |Office: +44(0)1257 23 6474|Mobile: +44(0)7921069650| email:
        <a class="moz-txt-link-abbreviated" href="mailto:jhaworth@csc.com">jhaworth@csc.com</a>|<a class="moz-txt-link-abbreviated" href="http://www.csc.com">www.csc.com</a><br>
        <br>
        CSC • This is a PRIVATE message. If you are not the intended
        recipient,
        please delete without copying and kindly advise us by e-mail of
        the mistake
        in delivery.  NOTE: Regardless of content, this e-mail shall not
        operate
        to bind CSC to any order or other contract unless pursuant to
        explicit
        written agreement or government initiative expressly permitting
        the use
        of e-mail for such purpose • CSC Computer Sciences Limited •
        Registered
        Office: Royal Pavilion, Wellesley Road, Aldershot, Hampshire,
        GU11 1PZ,
        UK • Registered in England No: 0963578<br>
      </font>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
SAP-WUG mailing list
<a class="moz-txt-link-abbreviated" href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a>
<a class="moz-txt-link-freetext" href="http://mailman.mit.edu/mailman/listinfo/sap-wug">http://mailman.mit.edu/mailman/listinfo/sap-wug</a>
</pre>
    </blockquote>
  </body>
</html>