BUS2089 CHANGE and APPROVE events

Ramki Maley rmaley at erpworkflow.com
Wed Apr 6 09:19:53 EDT 2011


John,

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.

* Did the change happen from Workflow? Try and Get calling Work Item Id
   CALL METHOD cl_swf_evt_requester=>get_workitem
     IMPORTING
       ex_workitem     = lv_workitem
       ex_workitem_id = lv_workitem_id.
   IF lv_workitem_id IS NOT INITIAL.
* Do Not Raise the Event - Called from Workflow
     REFRESH events.
     EXIT.
   ENDIF.

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.

Regards,
Ramki



On 4/6/11 7:59 AM, John Haworth wrote:
>
> Hi
>
> 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)
>
> The problem is that when the TRIP is approved, both CHANGE and APPROVE 
> events are issued, seeing the CHANGE event ends my workflow.
>
> 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).
>
> Kind Regards
>
> John Haworth
> SAP PDM
> CSC
>
> Euxton House, Euxton Lane, Chorley, PR7 6FE.
> |Office: +44(0)1257 23 6474|Mobile: +44(0)7921069650| email: 
> jhaworth at csc.com|www.csc.com
>
> 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
>
>
> _______________________________________________
> SAP-WUG mailing list
> SAP-WUG at mit.edu
> http://mailman.mit.edu/mailman/listinfo/sap-wug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20110406/5bfbc9b1/attachment.htm


More information about the SAP-WUG mailing list