<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16757" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=130392900-20112008><FONT face=Arial
color=#0000ff>Thanks for that... I hadn't noticed the BAPI_CASE_...
routines - that makes it a little easier. Jocelyn.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Dave Weston<BR><B>Sent:</B>
Thursday, 20 November 2008 2:11 AM<BR><B>To:</B> SAP Workflow Users'
Group<BR><B>Subject:</B> RE: User decision UWL comments added to Adobe HCM form
comments in a workflow<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV id=idOWAReplyText52115 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Thanks Jocelyn. Yeah I
figured as much. I have created some test code (and I stress dirty test
code) as follows in case other folks need it. </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Cheers</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2>Dave</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><!--StartFragment -->
<STYLE type=text/css>SPAN {
        FONT-SIZE: 10pt; BACKGROUND: #ffffff; COLOR: #000000; FONT-FAMILY: "Courier New"
}
.L1S31 {
        COLOR: #808080; FONT-STYLE: italic
}
.L1S32 {
        COLOR: #3399ff
}
.L1S33 {
        COLOR: #4da619
}
.L1S52 {
        COLOR: #0000ff
}
</STYLE>
<SPAN><SPAN class=L1S52>PARAMETERS</SPAN>: doc_id <SPAN
class=L1S52>TYPE</SPAN> sofolenti1-doc_id,<BR> iv_guid <SPAN
class=L1S52>TYPE</SPAN> asr_guid.<BR><BR><SPAN
class=L1S52>DATA</SPAN>: lt_content <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> solisti1,<BR> wa_content <SPAN
class=L1S52>TYPE</SPAN> solisti1.<BR><BR><SPAN
class=L1S52>CALL</SPAN> <SPAN class=L1S52>FUNCTION</SPAN> <SPAN
class=L1S33>'SO_DOCUMENT_READ_API1'</SPAN><BR> <SPAN
class=L1S52>EXPORTING</SPAN><BR> document_id = doc_id<BR><SPAN
class=L1S31>* FILTER = 'X '</SPAN><BR><SPAN
class=L1S31>* IMPORTING</SPAN><BR><SPAN
class=L1S31>* DOCUMENT_DATA =</SPAN><BR> <SPAN
class=L1S52>TABLES</SPAN><BR><SPAN
class=L1S31>* OBJECT_HEADER =</SPAN><BR> object_content = lt_content<BR><SPAN
class=L1S31>* OBJECT_PARA =</SPAN><BR><SPAN
class=L1S31>* OBJECT_PARB =</SPAN><BR><SPAN
class=L1S31>* ATTACHMENT_LIST =</SPAN><BR><SPAN
class=L1S31>* RECEIVER_LIST =</SPAN><BR><SPAN
class=L1S31>* CONTENTS_HEX =</SPAN><BR><SPAN
class=L1S31>* EXCEPTIONS</SPAN><BR><SPAN
class=L1S31>* DOCUMENT_ID_NOT_EXIST = 1</SPAN><BR><SPAN
class=L1S31>* OPERATION_NO_AUTHORIZATION = 2</SPAN><BR><SPAN
class=L1S31>* X_ERROR = 3</SPAN><BR><SPAN
class=L1S31>* OTHERS = 4.</SPAN><BR>.<BR><SPAN
class=L1S52>TYPES</SPAN>: <SPAN class=L1S52>BEGIN</SPAN> <SPAN
class=L1S52>OF</SPAN> t_text,<BR> <SPAN
class=L1S52>line</SPAN> <SPAN
class=L1S52>TYPE</SPAN> tdline,<BR> <SPAN
class=L1S52>END</SPAN> <SPAN
class=L1S52>OF</SPAN> t_text.<BR><BR><SPAN
class=L1S52>DATA</SPAN>: ref_process <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>REF</SPAN> <SPAN
class=L1S52>TO</SPAN> if_hrasr00_process, <SPAN
class=L1S31>" The process object that corresponds to this process</SPAN><BR> ref_ex <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>REF</SPAN> <SPAN
class=L1S52>TO</SPAN> cx_root, <SPAN
class=L1S31>" Exception reference</SPAN><BR> l_msg <SPAN
class=L1S52>TYPE</SPAN> string, <SPAN
class=L1S31>" Error message</SPAN><BR> lt_guids <SPAN
class=L1S52>TYPE</SPAN> scmg_tt_case_guid, <SPAN
class=L1S31>" Step GUIDs belonging to this process</SPAN><BR> wa_proc_query <SPAN
class=L1S52>TYPE</SPAN> hrasr00process_query_attr, <SPAN
class=L1S31>" Process query string</SPAN><BR> wa_proc_attr <SPAN
class=L1S52>TYPE</SPAN> hrasr00process_attr, <SPAN
class=L1S31>" Attributes of the process</SPAN><BR> lt_head <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>STANDARD</SPAN> <SPAN
class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> bapinoteheader, <SPAN
class=L1S31>" Header info about the comments</SPAN><BR> lt_notes <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>STANDARD</SPAN> <SPAN
class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> bapinote, <SPAN
class=L1S31>" Comments</SPAN><BR> lt_notes_db <SPAN
class=L1S52>TYPE</SPAN> hrasr00_note_tab, <SPAN
class=L1S31>" Comments from DB (non-formated)</SPAN><BR> lt_all_text <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>STANDARD</SPAN> <SPAN
class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> t_text, <SPAN
class=L1S31>" Formatted comments</SPAN><BR> lt_text_tmp <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>STANDARD</SPAN> <SPAN
class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> t_text,<BR> wa_text <SPAN
class=L1S52>TYPE</SPAN> tdline. <SPAN
class=L1S31>" work area</SPAN><BR><BR><SPAN
class=L1S52>DATA</SPAN>: lt_comment_lines_temp <SPAN
class=L1S52>TYPE</SPAN> zhr_wf_char72_ttype,<BR> comment_lines <SPAN
class=L1S52>TYPE</SPAN> zhr_wf_char72_ttype.<BR><BR><SPAN
class=L1S52>FIELD</SPAN>-SYMBOLS: <fs_note> <SPAN
class=L1S52>LIKE</SPAN> <SPAN class=L1S52>LINE</SPAN> <SPAN
class=L1S52>OF</SPAN> lt_notes,<BR> <fs_note_db> <SPAN
class=L1S52>LIKE</SPAN> <SPAN class=L1S52>LINE</SPAN> <SPAN
class=L1S52>OF</SPAN> lt_notes_db,<BR> <fs_guid> <SPAN
class=L1S52>LIKE</SPAN> <SPAN class=L1S52>LINE</SPAN> <SPAN
class=L1S52>OF</SPAN> lt_guids,<BR> <fs_text> <SPAN
class=L1S52>LIKE</SPAN> <SPAN class=L1S52>LINE</SPAN> <SPAN
class=L1S52>OF</SPAN> lt_all_text.<BR><BR><SPAN
class=L1S31>* Create a process object for this guid</SPAN><BR><SPAN
class=L1S52>TRY</SPAN>.<BR> <SPAN
class=L1S52>CALL</SPAN> <SPAN
class=L1S52>METHOD</SPAN> cl_hrasr00_process=>get<BR> <SPAN
class=L1S52>EXPORTING</SPAN><BR> process_guid = iv_guid<BR> <SPAN
class=L1S52>IMPORTING</SPAN><BR> instance = ref_process<BR><SPAN
class=L1S31>* no_authority =</SPAN><BR> .<BR> <SPAN
class=L1S52>CATCH</SPAN> cx_hrasr00_process_object <SPAN
class=L1S52>INTO</SPAN> ref_ex .<BR> l_msg = ref_ex->get_text( ).<BR> <SPAN
class=L1S52>EXIT</SPAN>.<BR><SPAN class=L1S52>ENDTRY</SPAN>.<BR><BR><SPAN
class=L1S31>* Get the general attributes so we can determine the steps assigned to this</SPAN><BR><SPAN
class=L1S31>* process</SPAN><BR><SPAN
class=L1S52>TRY</SPAN>.<BR> <SPAN
class=L1S52>CALL</SPAN> <SPAN
class=L1S52>METHOD</SPAN> ref_process->get_general_attributes<BR> <SPAN
class=L1S52>IMPORTING</SPAN><BR> process_attributes = wa_proc_attr.<BR> <SPAN
class=L1S52>CATCH</SPAN> cx_hrasr00_process_object <SPAN
class=L1S52>INTO</SPAN> ref_ex .<BR> l_msg = ref_ex->get_text( ).<BR> <SPAN
class=L1S52>EXIT</SPAN>.<BR><SPAN class=L1S52>ENDTRY</SPAN>.<BR><BR><SPAN
class=L1S52>MOVE</SPAN>-CORRESPONDING wa_proc_attr <SPAN
class=L1S52>TO</SPAN> wa_proc_query.<BR><BR><SPAN
class=L1S31>* Get all the step guids for this process, the comments entered in the forms are</SPAN><BR><SPAN
class=L1S31>* stored against the steps</SPAN><BR><SPAN
class=L1S52>TRY</SPAN>.<BR> <SPAN
class=L1S52>CALL</SPAN> <SPAN
class=L1S52>METHOD</SPAN> cl_hrasr00_step=>if_hrasr00_step~find_step_guids_by_attr<BR> <SPAN
class=L1S52>EXPORTING</SPAN><BR> process_query_attr = wa_proc_query<BR> <SPAN
class=L1S52>IMPORTING</SPAN><BR> step_guids = lt_guids.<BR> <SPAN
class=L1S52>CATCH</SPAN> cx_hrasr00_process_object <SPAN
class=L1S52>INTO</SPAN> ref_ex .<BR> l_msg = ref_ex->get_text( ).<BR> <SPAN
class=L1S52>EXIT</SPAN>.<BR><SPAN class=L1S52>ENDTRY</SPAN>.<BR><BR><SPAN
class=L1S31>* For each step guid get the comments</SPAN><BR><SPAN
class=L1S52>LOOP</SPAN> <SPAN
class=L1S52>AT</SPAN> lt_guids <SPAN
class=L1S52>ASSIGNING</SPAN> <fs_guid>.<BR><BR> <SPAN
class=L1S52>CALL</SPAN> <SPAN class=L1S52>FUNCTION</SPAN> <SPAN
class=L1S33>'BAPI_CASE_GETNOTES'</SPAN><BR> <SPAN
class=L1S52>EXPORTING</SPAN><BR> guid = <fs_guid><BR> <SPAN
class=L1S52>TABLES</SPAN><BR> note_headers = lt_head<BR> note_contents = lt_notes.<BR><BR> <SPAN
class=L1S52>LOOP</SPAN> <SPAN
class=L1S52>AT</SPAN> lt_notes <SPAN
class=L1S52>ASSIGNING</SPAN> <fs_note>.<BR><BR> <SPAN
class=L1S52>DATA</SPAN>: lt_case_note_ids <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> bapinoteid,<BR> wa_case_note_ids <SPAN
class=L1S52>TYPE</SPAN> bapinoteid,<BR> lt_case_notes <SPAN
class=L1S52>TYPE</SPAN> <SPAN class=L1S52>TABLE</SPAN> <SPAN
class=L1S52>OF</SPAN> bapinote,<BR> wa_case_notes <SPAN
class=L1S52>TYPE</SPAN> bapinote,<BR> wa_head <SPAN
class=L1S52>TYPE</SPAN> bapinoteheader.<BR><BR> <SPAN
class=L1S52>LOOP</SPAN> <SPAN class=L1S52>AT</SPAN> lt_head <SPAN
class=L1S52>INTO</SPAN> wa_head.<BR> wa_case_note_ids-elem_no = <SPAN
class=L1S32>1</SPAN>.<BR> wa_case_note_ids-tdid = wa_head-tdid.<BR> <SPAN
class=L1S52>INSERT</SPAN> wa_case_note_ids <SPAN
class=L1S52>INTO</SPAN> <SPAN
class=L1S52>TABLE</SPAN> lt_case_note_ids.<BR> <SPAN
class=L1S52>EXIT</SPAN>.<BR> <SPAN
class=L1S52>ENDLOOP</SPAN>.<BR><BR> <SPAN
class=L1S52>LOOP</SPAN> <SPAN
class=L1S52>AT</SPAN> lt_content <SPAN
class=L1S52>INTO</SPAN> wa_content.<BR> wa_case_notes-elem_no = <SPAN
class=L1S32>1</SPAN>.<BR> wa_case_notes-tdformat = <SPAN
class=L1S33>'*'</SPAN>.<BR> wa_case_notes-tdline = wa_content-<SPAN
class=L1S52>line</SPAN>+<SPAN
class=L1S32>5</SPAN>.<BR> <SPAN
class=L1S52>INSERT</SPAN> wa_case_notes <SPAN
class=L1S52>INTO</SPAN> <SPAN
class=L1S52>TABLE</SPAN> lt_case_notes.<BR> <SPAN
class=L1S52>ENDLOOP</SPAN>.<BR><BR> <SPAN
class=L1S52>CALL</SPAN> <SPAN class=L1S52>FUNCTION</SPAN> <SPAN
class=L1S33>'BAPI_CASE_ADDNOTES'</SPAN><BR> <SPAN
class=L1S52>EXPORTING</SPAN><BR> guid = <fs_guid><BR><SPAN
class=L1S31>* IMPORTING</SPAN><BR><SPAN
class=L1S31>* RETURN =</SPAN><BR> <SPAN
class=L1S52>TABLES</SPAN><BR> case_note_ids = lt_case_note_ids<BR> case_notes = lt_case_notes.<BR> <SPAN
class=L1S52>EXIT</SPAN>.<BR> <SPAN
class=L1S52>ENDLOOP</SPAN>.<BR><BR> <SPAN
class=L1S52>CLEAR</SPAN>: lt_notes, lt_head.</SPAN> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu on behalf of Dart,
Jocelyn<BR><B>Sent:</B> Tue 11/18/2008 5:20 PM<BR><B>To:</B> SAP Workflow Users'
Group<BR><B>Subject:</B> RE: [LIKELY JUNK]User decision UWL comments added to
Adobe HCM formcomments in aworkflow<BR></FONT><BR></DIV>
<DIV dir=ltr>
<DIV dir=ltr align=left><SPAN class=275251522-18112008><FONT face=Arial
color=#0000ff size=2>Ok Dave, Sorry but it's code-it-yourself time with that
because the comments are held as a string field in the XML. You could add
it to an ordinary table type field using the Export task, but if you really want
to use the comments you'll need to take </FONT></SPAN><SPAN
class=275251522-18112008><FONT face=Arial color=#0000ff size=2>a look at the
ABAP Class CL_HRASR00_WF_COMPONENTS method DATAMAPPING which imports/exports
fields - and create your own version to work with the string type comments
fields. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=275251522-18112008><FONT face=Arial
color=#0000ff size=2>Regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=275251522-18112008><FONT face=Arial
color=#0000ff size=2>Jocelyn </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=275251522-18112008><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV><FONT face=Arial color=#0000ff
size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> sap-wug-bounces@mit.edu
[mailto:sap-wug-bounces@mit.edu] <B>On Behalf Of </B>Dave Weston<BR><B>Sent:</B>
Wednesday, 19 November 2008 6:05 AM<BR><B>To:</B>
sap-wug@mit.edu<BR><B>Subject:</B> [LIKELY JUNK]User decision UWL comments added
to Adobe HCM form comments in aworkflow<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial color=#000000 size=2>Hi folks,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Was wondering if anyone working with the workflows
with Adobe HCM forms has taken the comments from a user decision in the UWL
(object SOFM) and added them to the comments of an HCM form in an Adobe process
? If they have, would they mind sharing how they did it and any development
details ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In the meantime I will look at creating a method to
read the SAP Office stuff and calling another HCM form process method to add it
to the Adobe form comments.....somehow !!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Dave</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></DIV></BODY></HTML>