<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 14 (filtered medium)"><style><!--
/* Font Definitions */
@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:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I was able to get the text I was looking for by using function module SAP_WAPI_GET_WORKITEM_DETAIL.&nbsp; When you call that FM with a dialog task, the return field WORKITEM_RESULT has the outcome name of the user&#8217;s decision.&nbsp; It also returns a structure, WORKITEM_DETAIL, which contains all of the other details that I needed, such as Actual-Agent, End Date &amp; Time, etc.&nbsp; So I was essentially able to create my entire report around this one function module.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Comic Sans MS";color:blue'>Loren </span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:gray'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:gray'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span 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>siva krishna<br><b>Sent:</b> Wednesday, April 02, 2014 7:47 AM<br><b>To:</b> sap-wug@mit.edu<br><b>Subject:</b> Re: SAP-WUG Digest, Vol 112, Issue 30<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Hi Loren,</span><o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Are you maintaining the approval decision text mandatory in the workflow approval process. How is the approval process happening. Is it through the transaction or some othe process.&nbsp;</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>1. Approval at transaction : In this process ask the user to maintain the decision &nbsp;texts in the transaction during approving or rejection. Then you can user FM READ_TEXT for reading the same. Also as you mentioned, you are reading the workflow texts. I would suggest to read the current status of the workflow and then run the above logic.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>Thanks.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div><div><p class=MsoNormal><br clear=all><o:p></o:p></p><div><div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div><p class=MsoNormal>SIVA KRISHNA<br>+91-9000008083<o:p></o:p></p><div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>On Fri, Mar 28, 2014 at 8:02 PM, &lt;<a href="mailto:sap-wug-request@mit.edu" target="_blank">sap-wug-request@mit.edu</a>&gt; wrote:<o:p></o:p></p><p class=MsoNormal>Send SAP-WUG mailing list submissions to<br>&nbsp; &nbsp; &nbsp; &nbsp; <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>&nbsp; &nbsp; &nbsp; &nbsp; <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>&nbsp; &nbsp; &nbsp; &nbsp; <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>&nbsp; &nbsp; &nbsp; &nbsp; <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 &quot;Re: Contents of SAP-WUG digest...&quot;<br><br><br>Today's Topics:<br><br>&nbsp; &nbsp;1. RE: How Can I Get Text of Workitem Result ? (Bratzler, Loren)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Fri, 28 Mar 2014 09:24:19 -0400<br>From: &quot;Bratzler, Loren&quot; &lt;<a href="mailto:loren.bratzler@nscorp.com">loren.bratzler@nscorp.com</a>&gt;<br>Subject: RE: How Can I Get Text of Workitem Result ?<br>To: &quot;SAP Workflow Users' Group&quot; &lt;<a href="mailto:sap-wug@mit.edu">sap-wug@mit.edu</a>&gt;<br>Message-ID:<br>&nbsp; &nbsp; &nbsp; &nbsp; &lt;<a href="mailto:D093F74E504B0745917E905C9FC31F2D1170FE1E60@GATUCEXCH07ASV.nscorp.ad.nscorp.com">D093F74E504B0745917E905C9FC31F2D1170FE1E60@GATUCEXCH07ASV.nscorp.ad.nscorp.com</a>&gt;<br><br>Content-Type: text/plain; charset=&quot;us-ascii&quot;<br><br>Rick,<br><br>Thanks for the reply. &nbsp;The function module you pointed out gets me close to what I am looking for but not quite. &nbsp;For example, if I run that FM against my test work-item I get these results:<br><br><a href="mailto:[cid:image003.png@01CF4A62.713EDF70]">[cid:image003.png@01CF4A62.713EDF70]</a><br><br>The text that this brought back is the text that appears on the user decision buttons.<br><br>I realize now that what I am really looking for is the Outcome Name as defined in the Decision Options:<br><br><a href="mailto:[cid:image001.png@01CF4A62.CF7ED540]">[cid:image001.png@01CF4A62.CF7ED540]</a><br><br><br>Loren<br><br><br>From: <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>] On Behalf Of Rick Bakker<br>Sent: Thursday, March 27, 2014 8:09 PM<br>To: SAP Workflow Users' Group<br>Subject: Re: How Can I Get Text of Workitem Result ?<br><br>Hi Loren,<br><br>The text is in table SWD_TEXT but it's probably easier (and better) to go via FM SWU_INTERN_GET_DECISION_TEXT.<br><br>regards<br>Rick Bakker<br><br>On Fri, Mar 28, 2014 at 3:47 AM, Bratzler, Loren &lt;<a href="mailto:loren.bratzler@nscorp.com">loren.bratzler@nscorp.com</a>&lt;mailto:<a href="mailto:loren.bratzler@nscorp.com">loren.bratzler@nscorp.com</a>&gt;&gt; wrote:<br>I am exploring the possibilities of creating a custom report where I can pass in a long list of invoices and get back a listing that shows the workflow approval information for each invoice. &nbsp;We want to see who approved the invoice, the date and time of the approval, and the result of the user's decision.<br><br>I can easily identify the dialog steps from the workflow and I know that I can use SAP_WAPI_READ_CONTAINER to get the WI_RESULT field value as shown here:<br><br><a href="mailto:[cid:image004.png@01CF4A62.713EDF70]">[cid:image004.png@01CF4A62.713EDF70]</a><br><br>But displaying a value of &quot;0001&quot; on the report as the user's decision is not going to be helpful. &nbsp;I want to be able to translate the numeric decision value to the text value that was assigned in the workflow definition. &nbsp;We want to be able to see the value &quot;APPROVED&quot; as it shows up in the workflow log:<br><br><a href="mailto:[cid:image005.png@01CF4A62.713EDF70]">[cid:image005.png@01CF4A62.713EDF70]</a><br><br>Is there a table somewhere in the system that I could query with the numeric WI_RESULT and get the text value back?<br><br>Loren Bratzler<br>Norfolk Southern Corporation<br><br>_______________________________________________<br>SAP-WUG mailing list<br><a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a>&lt;mailto:<a href="mailto:SAP-WUG@mit.edu">SAP-WUG@mit.edu</a>&gt;<br><a href="http://mailman.mit.edu/mailman/listinfo/sap-wug" target="_blank">http://mailman.mit.edu/mailman/listinfo/sap-wug</a><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0002.htm" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0002.htm</a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: image003.png<br>Type: image/png<br>Size: 12940 bytes<br>Desc: image003.png<br>Url : <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0008.png" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0008.png</a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: image004.png<br>Type: image/png<br>Size: 18567 bytes<br>Desc: image004.png<br>Url : <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0009.png" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0009.png</a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: image005.png<br>Type: image/png<br>Size: 14085 bytes<br>Desc: image005.png<br>Url : <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0010.png" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0010.png</a><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: image001.png<br>Type: image/png<br>Size: 13224 bytes<br>Desc: image001.png<br>Url : <a href="http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0011.png" target="_blank">http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/a7078081/attachment-0011.png</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 112, Issue 30<br>****************************************<o:p></o:p></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>