Hi Arghadip<br><br>We are ready to "throw some light" only if you can explain the issue you face, in simple English. From what I could follow, you may not be passing the required parameters...<br><br>Cheers<br>Ravi<br>
<br><div class="gmail_quote">On Wed, Jan 27, 2010 at 8:37 AM, <span dir="ltr"><<a href="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Send SAP-WUG mailing list submissions to<br>
<a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<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>
<a href="mailto:sap-wug-request@mit.edu">sap-wug-request@mit.edu</a><br>
<br>
You can reach the person managing the list at<br>
<a href="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>
1. Workflow container gets updated with values when we trigger<br>
event synchronously only not for TRFC? (arghadip kar)<br>
2. RE: AW: AW: Getting current agent (name) from workflow work<br>
item (Shoaib Mirza)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 26 Jan 2010 11:54:49 -0800 (PST)<br>
From: arghadip kar <<a href="mailto:arghadipkar@yahoo.com">arghadipkar@yahoo.com</a>><br>
Subject: Workflow container gets updated with values when we trigger<br>
event synchronously only not for TRFC?<br>
To: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
Message-ID: <<a href="mailto:518726.67982.qm@web50308.mail.re2.yahoo.com">518726.67982.qm@web50308.mail.re2.yahoo.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi All<br>
<br>
The workflow gets triggered with all the container element getting properly updated if I Trigger the event from Tcode SWUE with Trigger FM Synchronously Checked. I further debugged and found this FM gets called when I select this flag.<br>
?CALL FUNCTION im_handler->m_linkage-recfb<br>
????? DESTINATION im_handler->m_linkage-rfcdest<br>
????? EXPORTING<br>
?????????? objtype??????????? = l_bor_objtype<br>
?????????? objkey???????????? = l_bor_objkey<br>
?????????? event????????????? = l_bor_event<br>
?????????? rectype??????????? = l_bor_rectype<br>
?????????? exceptions_allowed = 'X'<br>
????? IMPORTING<br>
?????????? rec_id???????????? = l_receiver_id<br>
????? TABLES<br>
?????????? event_container??? = lt_event_container<br>
????? EXCEPTIONS<br>
?????????? temp_error???????? = 1<br>
?????????? OTHERS???????????? = 99.? " catch all exceptions<br>
When I Uncheck this Flag this FM gets called in background.<br>
????? CALL FUNCTION im_handler->m_linkage-recfb<br>
?????????? IN BACKGROUND TASK<br>
?????????? AS SEPARATE UNIT<br>
?????????? DESTINATION im_handler->m_linkage-rfcdest<br>
?????????? EXPORTING<br>
??????????????? objtype??????????? = l_bor_objtype<br>
??????????????? objkey???????????? = l_bor_objkey<br>
??????????????? event????????????? = l_bor_event<br>
??????????????? rectype??????????? = l_bor_rectype<br>
??????????????? exceptions_allowed = space<br>
?????????? TABLES<br>
??????????????? event_container??? = lt_event_container.<br>
????? CALL FUNCTION 'ID_OF_BACKGROUNDTASK'<br>
?????????? IMPORTING<br>
??????????????? tid = l_trfc_id.<br>
When we trigger this event synchronously it gets triggered Under the user Id who runs SWUE tcode. For not synchronous it gets triggered with WF-BATCH. WF-BATCH has SAP_ALL and SAP_NEW Authorization. The workflow gets triggered(for not synchronous) after sometime without the container element getting populated after giving a RFC Status as *System overloaded, repeat immediately by batch*. When i Trigger the event synchronously we have no RFC Status.In standard event gets triggered through TRFC and not through synchronous.<br>
Can you please throw some light on what is the issue.<br>
<br>
Thanks<br>
<br>
Arghadip Kar<br>
<br>
SAP Workflow Expert<br>
<br>
IBM INDIA<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20100126/101952a3/attachment-0001.htm" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20100126/101952a3/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 26 Jan 2010 21:37:21 +0000<br>
From: Shoaib Mirza <<a href="mailto:shoaib_mirza@hotmail.com">shoaib_mirza@hotmail.com</a>><br>
Subject: RE: AW: AW: Getting current agent (name) from workflow work<br>
item<br>
To: <<a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a>><br>
Message-ID: <COL123-W327A4BDEEF9779683E025CE35E0@phx.gbl><br>
Content-Type: text/plain; charset="windows-1252"<br>
<br>
<br>
<br>
<br>
Hi<br>
<br>
<br>
<br>
This doesn't seem to work, or are we missing something in the code.<br>
<br>
This gives the details of the top level workflow item. I can not see the latest work item being processed in the workflow.<br>
<br>
<br>
<br>
Any ideas how to get this information?<br>
<br>
<br>
<br>
Thanks<br>
<br>
Sunni<br>
<br>
<br>
<br>
From: <a href="mailto:Benjamin.Koeb@comlineag.de">Benjamin.Koeb@comlineag.de</a><br>
To: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
Date: Tue, 26 Jan 2010 20:22:00 +0100<br>
Subject: AW: AW: Getting current agent (name) from workflow work item<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Hi Sunni,<br>
<br>
that?s no problem, if you have the ?top? workitem, just select swwwihead with ?where?-clause: WI_CHCKWI = your_top_wi_id<br>
Try this select statement:<br>
SELECT SINGLE * FROM SWWWIHEAD into wa_SWWWIHEAD<br>
WHERE WI_CHCKWI = lv_top_wi_id<br>
AND wi_type = 'W'<br>
AND ( WI_STAT = 'READY' or WI_STAT = 'STARTED' ).<br>
You should get the actual workitem, with this information you can call the function module.<br>
<br>
Hope that helps?<br>
<br>
Benny<br>
<br>
<br>
<br>
Von: <a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a> [mailto:<a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a>] Im Auftrag von Shoaib Mirza<br>
Gesendet: Dienstag, 26. Januar 2010 18:17<br>
An: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
Betreff: RE: AW: Getting current agent (name) from workflow work item<br>
<br>
Hi<br>
<br>
Thanks for that, but my issue is that I don't have the work item id of the current task. I only have the 'top' work item id of the workflow. That does not have any agents.<br>
<br>
So I need to go down the workflow to the final workitem and get the agents from that. (Maybe then I can use the function below to get the agents)<br>
<br>
Any ideas how I can do that.<br>
<br>
Kind Regards<br>
Sunni<br>
<br>
<br>
<br>
<br>
From: <a href="mailto:Benjamin.Koeb@comlineag.de">Benjamin.Koeb@comlineag.de</a><br>
To: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
Date: Tue, 26 Jan 2010 17:51:09 +0100<br>
Subject: AW: Getting current agent (name) from workflow work item<br>
<br>
Hi Sunni,<br>
<br>
you can read the actual (Workitem status = started) agent from table SWWWIHEAD-WI_AAGENT with key = WI_ID. This works fine for workitems with status = started, if the status = ready the field wi_aagent is empty! For workitems with status ready, try to use function module SAP_WAPI_WORKITEM_RECIPIENTS:<br>
<br>
CALL FUNCTION 'SAP_WAPI_WORKITEM_RECIPIENTS'<br>
EXPORTING<br>
workitem_id = lv_wi_id<br>
tables<br>
recipients = it_recipients.<br>
<br>
That?s my way, maybe there are better ones?<br>
<br>
Regards,<br>
<br>
Benny<br>
<br>
<br>
<br>
Von: <a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a> [mailto:<a href="mailto:sap-wug-bounces@mit.edu">sap-wug-bounces@mit.edu</a>] Im Auftrag von Shoaib Mirza<br>
Gesendet: Dienstag, 26. Januar 2010 17:37<br>
An: <a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a><br>
Betreff: Getting current agent (name) from workflow work item<br>
<br>
Hi<br>
<br>
Please can you let me know how I would go about getting the current agent of a workflow from the workitem id of the workflow. I looked for a wapi but could not find one suitable.<br>
<br>
Kindest Regards<br>
Sunni<br>
<br>
<br>
<br>
Do you have a story that started on Hotmail? Tell us now<br>
<br>
<br>
<br>
<br>
Got a cool Hotmail story? Tell us now<br>
_________________________________________________________________<br>
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now<br>
<a href="http://clk.atdmt.com/UKM/go/195013117/direct/01/" target="_blank">http://clk.atdmt.com/UKM/go/195013117/direct/01/</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20100126/53d368da/attachment.htm" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20100126/53d368da/attachment.htm</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
SAP-WUG mailing list<br>
<a href="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 62, Issue 61<br>
***************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best Regards<br>Ravi Dixit<br>