<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:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:rtc="http://microsoft.com/officenet/conferencing" xmlns:D="DAV:" xmlns:Repl="http://schemas.microsoft.com/repl/" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ppda="http://www.passport.com/NameSpace.xsd" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" 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;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Arial","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</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-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Probably
via the SAP WAPI functions….<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <b>On Behalf Of </b>Shoaib Mirza<br>
<b>Sent:</b> Wednesday, January 27, 2010 10:39 AM<br>
<b>To:</b> sap-wug@mit.edu<br>
<b>Subject:</b> RE: AW: AW: Getting current agent (name) from workflow work
item<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Hi Paul<br>
<br>
That is a great suggestion, I will put it to the customer.
Previously they declined my proposal to write a report because they
actually want the agent to appear on a bespoke transaction that already exists
so they might not go for it. I will try again anyway.<br>
<br>
If I were to follow the approach below, which function modules would I use to
get the first two steps, have you written this yourself already?<br>
<br>
Kind Regards<br>
Sunni<br>
<br>
> Subject: RE: AW: AW: Getting current agent (name) from workflow work item<br>
> To: sap-wug@mit.edu<br>
> From: Paul.Bakker@osr.treasury.qld.gov.au<br>
> Date: Wed, 27 Jan 2010 09:34:58 +1000<br>
> <br>
> Sunni,<br>
> <br>
> Is there a better way...? Actually, I'm wondering what your requirements<br>
> are.<br>
> <br>
> Is it for a report to determine 'who is currently holding up the<br>
> workflows'?<br>
> <br>
> If so, you might want to consider approaching it from the bottom up:<br>
> - find all dialog items currently in 'READY' status<br>
> - find their parents (or grandparents)<br>
> - filter the results to show only the workflow(s) you are interested in<br>
> <br>
> Just a suggestion<br>
> <br>
> cheers<br>
> Paul.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Shoaib Mirza <br>
> <shoaib_mirza@hot <br>
> mail.com> To <br>
> Sent by: <sap-wug@mit.edu> <br>
> sap-wug-bounces@m cc <br>
> it.edu <br>
> Subject <br>
> RE: AW: AW: Getting current agent <br>
> 27/01/2010 08:58 (name) from workflow work item <br>
> AM <br>
> <br>
> <br>
> Please respond to <br>
> "SAP Workflow <br>
> Users' Group" <br>
> <sap-wug@mit.edu> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Hi Paul<br>
> <br>
> Thanks for your reply, you're right and I've just realised that this<br>
> workflow does have subworkflows!!<br>
> <br>
> ---------<br>
> So Im thinking.<br>
> <br>
> I take the top workitem that I have,<br>
> select from table swwwihead to find the child workitems of type F, (there<br>
> seem to be just two subworkflows started here always)<br>
> save these as the new 'top' work items in an internal table<br>
> <br>
> select from swwwihead again for the first of the new work items (the new<br>
> top work item)<br>
> take the last entry of the list output type 'W' to represent the last<br>
> dialog work item<br>
> save this workitem nr<br>
> <br>
> repeat the above step for the next 'top' work item of the parallel branch<br>
> for the other subworkflow, and save this work item nr<br>
> <br>
> run the below function module 'SAP_WAPI_WORKITEM_RECIPIENTS' to get the<br>
> user/s for each derived work item<br>
> ------------------<br>
> <br>
> I would have to repeat this for potentially hundreds of line items just<br>
> before an alv list is output.<br>
> <br>
> Is there a better way?<br>
> <br>
> Best Regards<br>
> Sunni<br>
> <br>
> <br>
> <br>
> > Subject: RE: AW: AW: Getting current agent (name) from workflow work
item<br>
> > To: sap-wug@mit.edu<br>
> > From: Paul.Bakker@osr.treasury.qld.gov.au<br>
> > Date: Wed, 27 Jan 2010 07:59:37 +1000<br>
> ><br>
> > Sunni,<br>
> ><br>
> > I think there's a problem with your concept of 'last workitem'.<br>
> ><br>
> > A workflow can, of course, have multiple dialog workitems active at
once<br>
> > (e.g. in parallel branches).<br>
> > Which one would you then want the details of?<br>
> ><br>
> > cheers<br>
> > Paul<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Shoaib Mirza<br>
> > <shoaib_mirza@hot<br>
> > mail.com> To<br>
> > Sent by: <sap-wug@mit.edu><br>
> > sap-wug-bounces@m cc<br>
> > it.edu<br>
> > Subject<br>
> > RE: AW: AW: Getting current agent<br>
> > 27/01/2010 07:37 (name) from workflow work item<br>
> > AM<br>
> ><br>
> ><br>
> > Please respond to<br>
> > "SAP Workflow<br>
> > Users' Group"<br>
> > <sap-wug@mit.edu><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Hi<br>
> ><br>
> > This doesn't seem to work, or are we missing something in the code.<br>
> > This gives the details of the top level workflow item. I can not see
the<br>
> > latest work item being processed in the workflow.<br>
> ><br>
> > Any ideas how to get this information?<br>
> ><br>
> > Thanks<br>
> > Sunni<br>
> ><br>
> > From: Benjamin.Koeb@comlineag.de<br>
> > To: sap-wug@mit.edu<br>
> > Date: Tue, 26 Jan 2010 20:22:00 +0100<br>
> > Subject: AW: AW: Getting current agent (name) from workflow work item<br>
> ><br>
> > Hi Sunni,<br>
> ><br>
> > that’s no problem, if you have the ‘top’ workitem, just select
swwwihead<br>
> > 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<br>
> the<br>
> > function module.<br>
> ><br>
> > Hope that helps…<br>
> ><br>
> > Benny<br>
> ><br>
> > Von: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] Im
Auftrag<br>
> > von Shoaib Mirza<br>
> > Gesendet: Dienstag, 26. Januar 2010 18:17<br>
> > An: sap-wug@mit.edu<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<br>
> the<br>
> > current task. I only have the 'top' work item id of the workflow.
That<br>
> > does not have any agents.<br>
> ><br>
> > So I need to go down the workflow to the final workitem and get the<br>
> agents<br>
> > 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: Benjamin.Koeb@comlineag.de<br>
> > To: sap-wug@mit.edu<br>
> > Date: Tue, 26 Jan 2010 17:51:09 +0100<br>
> > Subject: AW: Getting current agent (name) from workflow work item<br>
> > Hi Sunni,<br>
> ><br>
> > you can read the actual (Workitem status = started) agent from table<br>
> > SWWWIHEAD-WI_AAGENT with key = WI_ID. This works fine for workitems
with<br>
> > status = started, if the status = ready the field wi_aagent is empty!
For<br>
> > workitems with status ready, try to use function module<br>
> > 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>
> > Von: sap-wug-bounces@mit.edu [mailto:sap-wug-bounces@mit.edu] Im
Auftrag<br>
> > von Shoaib Mirza<br>
> > Gesendet: Dienstag, 26. Januar 2010 17:37<br>
> > An: sap-wug@mit.edu<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<br>
> > of a workflow from the workitem id of the workflow. I looked for a
wapi<br>
> > 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>
> ><br>
> ><br>
> > Not got a Hotmail account? Sign-up now - Free<br>
> > _______________________________________________<br>
> > SAP-WUG mailing list<br>
> > SAP-WUG@mit.edu<br>
> > http://mailman.mit.edu/mailman/listinfo/sap-wug<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ******************************************************************************************************************************************************<br>
> <br>
> ><br>
> > Only an individual or entity who is intended to be a recipient of
this<br>
> e-mail may access or use the information contained in this e-mail or any
of<br>
> its attachments. Opinions contained in this e-mail or any of its<br>
> attachments do not necessarily reflect the opinions of Queensland
Treasury.<br>
> ><br>
> > The contents of this e-mail and any attachments are confidential and
may<br>
> be legally privileged and the subject of copyright. If you have received<br>
> this e-mail in error, please notify Queensland Treasury immediately and<br>
> erase all copies of the e-mail and the attachments. Queensland Treasury<br>
> uses virus scanning software. However, it is not liable for viruses
present<br>
> in this e-mail or in any attachment.<br>
> ><br>
> ><br>
>
******************************************************************************************************************************************************<br>
> <br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > SAP-WUG mailing list<br>
> > SAP-WUG@mit.edu<br>
> > http://mailman.mit.edu/mailman/listinfo/sap-wug<br>
> <br>
> Got a cool Hotmail story? Tell us now<br>
> _______________________________________________<br>
> SAP-WUG mailing list<br>
> SAP-WUG@mit.edu<br>
> http://mailman.mit.edu/mailman/listinfo/sap-wug<br>
> <br>
> _______________________________________________<br>
> SAP-WUG mailing list<br>
> SAP-WUG@mit.edu<br>
> http://mailman.mit.edu/mailman/listinfo/sap-wug<o:p></o:p></span></p>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>We
want to hear all your funny, exciting and crazy Hotmail stories. <a
href="http://clk.atdmt.com/UKM/go/195013117/direct/01/" target="_new">Tell us
now</a><o:p></o:p></span></p>
</div>
</div>
</body>
</html>