on 06-22-2012 12:03 PM
Hi,
While working with Duet enterprise workflow, I noticed that the comment being returned from SharePoint that the actor of the task enters in being returned as an attachment in the task container. What are the ways to read this comment?
One way I found and was very cumbersome was to first read the document name from the task context and then somehow pass this to a FM (may be SO_DOCUMENT_READ_API1) to read the contents. Then again I found the contents were in HTML and have to do a parsing to read the comments.
Is there any other way out, possibly using Inbound handler or something else?
Hi Avishek,
You can programmatically read the comments string via a custom inboundhandler:
FUNCTION Z_Process_Comments_ib .
*"----------------------------------------------------------------------*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_WORKITEM_ID) TYPE SWN_APPKEY
*" VALUE(IV_DECISION_KEY) TYPE SWR_DECIKEY OPTIONAL
*" VALUE(IV_USER_ID) TYPE SYUNAME OPTIONAL
*" VALUE(IV_OPERATION_ID) TYPE S_OSP_DT_WI_OPERATION_ID OPTIONAL
*" VALUE(IV_WORKITEM_STATUS) TYPE SWW_WISTAT OPTIONAL
*" VALUE(IV_WRT_CONT_FLAG) TYPE S_OSP_DT_FLAG DEFAULT 'X'
*" VALUE(IV_LANGUAGE) TYPE SPRAS OPTIONAL
*" VALUE(IT_WF_CONTAINER_TAB) TYPE SOSP_TT_WF_CONTAINER OPTIONAL
*" VALUE(IT_APPL_CONTAINER_TAB) TYPE SOSP_TT_APPL_CONTAINER
*" OPTIONAL
*" EXPORTING
*" VALUE(EV_ERROR_FLAG) TYPE S_OSP_DT_FLAG
*" VALUE(ET_RETURN) TYPE BAPIRETTAB
*"----------------------------------------------------------------------
IT_WF_CONTAINER_TAB contains the 'WorkflowApproverNotes', in container-element ACTION_COMMENTS; as type CHAR(255)
Best regards, William.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Yes, you're correct. The approver's comment entered from SharePoint using Duet Enterprise is stored in the task container _Attach_Objects. This is the standard behaviour of the SAP Business Workflow, and the same way as if the approver's comment was entererd from the Unniversal Work List in the SAP Enterprise Portal.
To view the comment, you can go to the SAP Business Workplace and there is a hyperlink after you select the work item under the section Objects and Attachments.
Cheers,
Anh-Tuan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.