How to get Workflow ID Number

Shai Eyal shai.eyal at yahoo.com
Tue Apr 15 14:36:20 EDT 2008


Dear Khatawate,
 
First I'd advise using SAPI_WAPI_CREATE_EVENT since it is a released FM while the one you specified is not.
Afterwards you may use SAP_WAPI_WORKITEMS_TO_OBJECT to resolve workitems per object. Then you can look for workitems by type and status to found the started WF.
 
I do not think you'll be able to get the workitem ID during run-time because the event is published and the workflow subscribes using RFC so it is all in separate task.
 
Good luck,
 
Regards,
Shai Eyal
SAP Logistics senior consultant
SAP Workflow specialist
Mobile: 972-52-5816633



----- Original Message ----
From: "sap-wug-request at mit.edu" <sap-wug-request at mit.edu>
To: sap-wug at mit.edu
Sent: Tuesday, April 15, 2008 18:16:12
Subject: SAP-WUG Digest, Vol 41, Issue 48

Send SAP-WUG mailing list submissions to
    sap-wug at mit.edu

To subscribe or unsubscribe via the World Wide Web, visit
    http://mailman.mit.edu/mailman/listinfo/sap-wug
or, via email, send a message with subject or body 'help' to
    sap-wug-request at mit.edu

You can reach the person managing the list at
    sap-wug-owner at mit.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of SAP-WUG digest..."


Today's Topics:

  1. How to get Workflow ID Number (Khatawate, Deepak N (ACCENTURE))
  2. HR Event - Position Transfer from Org Unit (Keohan, Susan)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Apr 2008 15:57:32 +0100
From: "Khatawate, Deepak N (ACCENTURE)" <Deepak.Khatawate at bp.com>
Subject: How to get Workflow ID Number
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <2019246BF83D0F46A0376FF2A463F7120A1AEDBD at BP1XEUEX021-C.bp1.ad.bp.com>
Content-Type: text/plain; charset="us-ascii"


Hi,

Am triggering a workflow from an event using function Module
SWE_EVENT_CREATE in my program. Once the FM triggers the event i need to
capture the workflow ID number/workitem number of the workflow
triggered.
I tried to search for function module with no luck.

System: 4.6C

Regards,
Deepak N K

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/f4882a82/attachment-0001.htm

------------------------------

Message: 2
Date: Tue, 15 Apr 2008 11:07:35 -0400
From: "Keohan, Susan" <keohan at ll.mit.edu>
Subject: HR Event - Position Transfer from Org Unit
To: "SAP Workflow Users' Group" <sap-wug at mit.edu>
Message-ID:
    <E74DD9A4E0338F4F98DBE83861654A0C06B283E1B0 at LLE2K7-BE01.mitll.ad.local>
    
Content-Type: text/plain; charset="us-ascii"

Hi WFers,

Really at wit's end here (which is not too far to go).  I've read all the posts related to raising events using SWEHR1, SWEHR2, and SWEHR3...

R/3 4.6c...

I need to raise an event, preferably PDOTYPE_SH POSTRANSFER, when a position is transferred out of one org unit into another.  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.  They are not comfortable with using HR Actions to raise the event.

Entry in SWEHR1:  Relationship between Position and object type PDOTYPE_SH
[cid:image001.png at 01C89EE7.F110C060]

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.


[cid:image002.png at 01C89EE7.F110C060]


Entry in SWEHR3- Event Linkage for Customer -

[cid:image003.png at 01C89EE8.E88794E0]



1)      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)?

2)      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.

3)      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 ?

4)      I've tried debugging through, but no SWE_EVENT_CREATE, HR_EVENT_CREATE, SAP_WAPI_CREATE_EVENT gets called.

5)      Are the entries in SWEHR2 and SWEHR3 redundant ?

6)      Any other tips ?



Thanks for any help on this issue.

Sue
----
Susan R. Keohan
SAP Workflow Specialist
MIT Lincoln Laboratory
244 Wood Street, LI-200
Lexington, MA.  02420
Ph:  781-981-3561
Fax: 781-981-1607
keohan at LL.MIT.EDU

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 15692 bytes
Desc: image001.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 17183 bytes
Desc: image002.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image002.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 21340 bytes
Desc: image003.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/81e158e7/image003.png

------------------------------

_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu
http://mailman.mit.edu/mailman/listinfo/sap-wug


End of SAP-WUG Digest, Vol 41, Issue 48
***************************************

Send instant messages to your online friends http://uk.messenger.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080415/0242b439/attachment.htm


More information about the SAP-WUG mailing list