How Can I Get Text of Workitem Result ?

Bratzler, Loren loren.bratzler at nscorp.com
Fri Mar 28 13:54:22 EDT 2014


Sudhir,

Thank you for pointing me to the SWF_PLOG_GET_LOG_UWL function module.  The ET_ACTIONLOG table that is returned does have the Outcome Name value that I am looking for.  The only problem is that there are multiple entries for the workitem in the returned table and I don't see any programmatic way that I could determine which entry has the text value I am looking for.

[cid:image002.png at 01CF4A8B.BCDA5AD0]

However, this got me to poking around into other SWF_PLOG function modules and I found SWF_PLOG_GET_LOG which returns table ET_PROTOCOL.  This table does have a single entry for the workitem I am interested in and there is a RESULT_TXT column that I can get my Outcome Name from:

[cid:image001.png at 01CF4A8D.3522F000]

So I think this function module will give me what I need.

Thanks again everyone!

Loren Bratzler
Norfolk Southern Corporation


From: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] On Behalf Of Sudhir Pargaonkar
Sent: Friday, March 28, 2014 10:51 AM
To: SAP Workflow Users' Group
Subject: Re: How Can I Get Text of Workitem Result ?

Loren,
Try FM SWF_PLOG_GET_LOG_UWL. Look at ET_ACTIONLOG table.
Sudhir

On Fri, Mar 28, 2014 at 8:24 AM, Bratzler, Loren <loren.bratzler at nscorp.com<mailto:loren.bratzler at nscorp.com>> wrote:
Rick,

Thanks for the reply.  The function module you pointed out gets me close to what I am looking for but not quite.  For example, if I run that FM against my test work-item I get these results:

[cid:image003.png at 01CF4A8B.BCDA5AD0]

The text that this brought back is the text that appears on the user decision buttons.

I realize now that what I am really looking for is the Outcome Name as defined in the Decision Options:

[cid:image006.png at 01CF4A8B.BCDA5AD0]


Loren


From: sap-wug-bounces at mit.edu<mailto:sap-wug-bounces at mit.edu> [mailto:sap-wug-bounces at mit.edu<mailto:sap-wug-bounces at mit.edu>] On Behalf Of Rick Bakker
Sent: Thursday, March 27, 2014 8:09 PM
To: SAP Workflow Users' Group
Subject: Re: How Can I Get Text of Workitem Result ?

Hi Loren,

The text is in table SWD_TEXT but it's probably easier (and better) to go via FM SWU_INTERN_GET_DECISION_TEXT.

regards
Rick Bakker

On Fri, Mar 28, 2014 at 3:47 AM, Bratzler, Loren <loren.bratzler at nscorp.com<mailto:loren.bratzler at nscorp.com>> wrote:
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.  We want to see who approved the invoice, the date and time of the approval, and the result of the user's decision.

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:

[cid:image007.png at 01CF4A8B.BCDA5AD0]

But displaying a value of "0001" on the report as the user's decision is not going to be helpful.  I want to be able to translate the numeric decision value to the text value that was assigned in the workflow definition.  We want to be able to see the value "APPROVED" as it shows up in the workflow log:

[cid:image008.png at 01CF4A8B.BCDA5AD0]

Is there a table somewhere in the system that I could query with the numeric WI_RESULT and get the text value back?

Loren Bratzler
Norfolk Southern Corporation

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


_______________________________________________
SAP-WUG mailing list
SAP-WUG at mit.edu<mailto: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/20140328/ec984bf8/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 26478 bytes
Desc: image002.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0006.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 12940 bytes
Desc: image003.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0007.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 13224 bytes
Desc: image006.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0008.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 18567 bytes
Desc: image007.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0009.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 14085 bytes
Desc: image008.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0010.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 31877 bytes
Desc: image001.png
Url : http://mailman.mit.edu/pipermail/sap-wug/attachments/20140328/ec984bf8/attachment-0011.png


More information about the SAP-WUG mailing list