<br><font size=2 face="sans-serif">Hi Vinod,</font>
<br>
<br><font size=2 face="sans-serif">Yes, you can use this ABAB Code :  </font><font size=1 face="Arial Monospaced for SAP"> </font>
<br><font size=1 face="Arial Monospaced for SAP">   </font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">* Read object into the container</font>
<br><font size=1 face="Arial Monospaced for SAP">    CALL FUNCTION 'SWW_WI_CONTAINER_READ_OBJECTS'</font>
<br><font size=1 face="Arial Monospaced for SAP">         EXPORTING</font>
<br><font size=1 face="Arial Monospaced for SAP">              wi_id                = wa_workitem_id</font>
<br><font size=1 face="Arial Monospaced for SAP">         TABLES</font>
<br><font size=1 face="Arial Monospaced for SAP">              wi_container_objects = i_objects</font>
<br><font size=1 face="Arial Monospaced for SAP">         EXCEPTIONS</font>
<br><font size=1 face="Arial Monospaced for SAP">              no_objects_found     = 1</font>
<br><font size=1 face="Arial Monospaced for SAP">              OTHERS               = 2.</font>
<br><font size=1 face="Arial Monospaced for SAP">    IF sy-subrc <> 0.</font>
<br><font size=1 face="Arial Monospaced for SAP">      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno</font>
<br><font size=1 face="Arial Monospaced for SAP">              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.</font>
<br><font size=1 face="Arial Monospaced for SAP">    ENDIF.</font>
<br>
<br><font size=1 face="Arial Monospaced for SAP">    CLEAR: st_objects, st_document, st_files, i_files.</font>
<br><font size=1 face="Arial Monospaced for SAP">    LOOP AT i_objects WHERE element EQ '_ATTACH_OBJECTS'.</font>
<br><font size=1 face="Arial Monospaced for SAP">      MOVE i_objects TO st_objects.</font>
<br><font size=1 face="Arial Monospaced for SAP">      EXIT.</font>
<br><font size=1 face="Arial Monospaced for SAP">    ENDLOOP.</font>
<br>
<br><font size=1 color=blue face="Arial Monospaced for SAP">* Download attached object to the frontend</font>
<br>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-foltp   = st_objects-value+20(03).   "FOLTP</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-folyr   = st_objects-value+23(02).   "FOLYR</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-folno   = st_objects-value+25(12).   "FOLNO</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-objtp   = st_objects-value+37(03).   "OBJTP</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-objyr   = st_objects-value+40(02).   "OBJYR</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-objno   = st_objects-value+42(12).   "OBJNO</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-FORNAM  =                  .   "FORNAM    - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-ATTTP   =                  .   "ATTTP     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-ATTYR   =                  .   "ATTYR     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-ATTNO   =                  .   "ATTNO     - NOT USED</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-objnam  = 'MESSAGE     '   .   "OBJNAM</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-objdes  = 'INVOICE     '   .   "OBJDES</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-FOLRG   =                  .   "FOLRG     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-OKCODE  =                  .   "OKCODE    - NOT USED</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-file_ext = 'PDF'            .   "FILE_EXT</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-OBJLEN   = '000000033716'   .   "OBJLEN</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-CREATOR =                  .   "CREATOR   - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-DLDAT   =                  .   "DLDAT     - NOT USED</font>
<br><font size=1 face="Arial Monospaced for SAP">    st_document-extct   = 'K'              .   "EXTCT</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-TARTP   =                  .   "TARTP     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-TARYR   =                  .   "TARYR     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-TARNO   =                  .   "TARNO     - NOT USED</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*  st_document-TARFOLRG =                  .   "TARFOLRG  - NOT USED</font>
<br>
<br><font size=1 face="Arial Monospaced for SAP">    CONCATENATE 'C:\TEMP\INV_'</font>
<br><font size=1 face="Arial Monospaced for SAP">                wa_workitem_id+4(8)</font>
<br><font size=1 face="Arial Monospaced for SAP">                '_'</font>
<br><font size=1 face="Arial Monospaced for SAP">                sy-uzeit</font>
<br><font size=1 face="Arial Monospaced for SAP">                '.PDF'</font>
<br><font size=1 face="Arial Monospaced for SAP">               INTO st_files.</font>
<br>
<br><font size=1 face="Arial Monospaced for SAP">    APPEND st_files TO i_files.</font>
<br>
<br><font size=1 color=blue face="Arial Monospaced for SAP">* Download attachment to the PC</font>
<br><font size=1 face="Arial Monospaced for SAP">CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'</font>
<br><font size=1 face="Arial Monospaced for SAP">      EXPORTING</font>
<br><font size=1 face="Arial Monospaced for SAP">        method             = 'PUTCONTENTTOFILE'</font>
<br><font size=1 face="Arial Monospaced for SAP">        office_user        = sy-uname</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   REF_DOCUMENT       =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   NEW_PARENT         =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">* IMPORTING</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   AUTHORITY          =</font>
<br><font size=1 face="Arial Monospaced for SAP">     TABLES</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   OBJCONT            =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   OBJHEAD            =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   OBJPARA            =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   OBJPARB            =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   RECIPIENTS         =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   ATTACHMENTS        =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   REFERENCES         =</font>
<br><font size=1 face="Arial Monospaced for SAP">        files              = i_files</font>
<br><font size=1 face="Arial Monospaced for SAP">      CHANGING</font>
<br><font size=1 face="Arial Monospaced for SAP">        document           = st_document</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   HEADER_DATA        =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   FOLMEM_DATA        =</font>
<br><font size=1 color=blue face="Arial Monospaced for SAP">*   RECEIVE_DATA       =</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Vinod Ramchandani <vinod.ramchandani@patni.com></b></font>
<br><font size=1 face="sans-serif">Sent by: SAP Workflow <Owner-SAP-WUG@MITVMA.MIT.EDU></font>
<p><font size=1 face="sans-serif">27/05/2003 14:14</font>
<br><font size=1 face="sans-serif">Please respond to "SAP Workflow Users' Group"</font>
<br>
<td><font size=1 face="Arial">        </font>
<br><font size=1 face="sans-serif">        To:        SAP-WUG@MITVMA.MIT.EDU</font>
<br><font size=1 face="sans-serif">        cc:        </font>
<br><font size=1 face="sans-serif">        Subject:        Re: Attachments</font></table>
<br>
<br>
<br><font size=2><tt>Hi..<br>
Is there any Function Module, which will reads the attachments of workitems<br>
and returns the table of attachment in the form of SOFM??<br>
</tt></font>
<br><font size=2><tt>OR ----><br>
I have read the attachments using the FM SWL_WI_ATTACHMENTS_READ, and format<br>
the SOFM type of table using available information (Structures: swotobjid &<br>
swlnotetab).<br>
Attachments have been seen in the Inbox but I am not able to display<br>
it.Display Command gives me the runtime "type" exception (See attached .bmp<br>
file).I think that is due to i have missed some information to place in SOFM<br>
object.<br>
</tt></font>
<br><font size=2><tt>Anybody have any suggestions?<br>
I have filled the following fields of SOFM.<br>
1) sofm-mandt<br>
2) sofm-foltp<br>
3) sofm-folyr<br>
4) sofm-folno<br>
5) sofm-doctp<br>
6) sofm-docyr<br>
7) sofm-docno<br>
8) sofm-fortp<br>
9) sofm-foryr<br>
10) sofm-forno<br>
</tt></font>
<br><font size=2><tt>Is there any other field is required to be filled in, to remove the<br>
exception while display command?<br>
Kindly suggest if you have some idea.I really appericiate any kind of input.<br>
</tt></font>
<br><font size=2><tt>Thanks,<br>
- Vinod.<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>-----Original Message-----<br>
From: SAP Workflow [mailto:Owner-SAP-WUG@MITVMA.MIT.EDU]On Behalf Of<br>
Kjetil Kilhavn<br>
Sent: Tuesday, May 27, 2003 2:15 PM<br>
To: SAP-WUG@MITVMA.MIT.EDU<br>
Subject: Re: Attachments<br>
</tt></font>
<br>
<br><font size=2><tt>No, I don't know. Trial error is the best recipe I can suggest. (Optionally<br>
you can also learn from those trials that were unsuccessful.)<br>
--<br>
Kjetil Kilhavn<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Vinod Ramchandani<br>
<vinod.ramchandani@p        To:</tt></font>
<br><font size=2><tt>SAP-WUG@MITVMA.MIT.EDU<br>
atni.com>                   cc:     (bcc: Kjetil</tt></font>
<br><font size=2><tt>Kilhavn)<br>
Sent by: SAP                Subject:     Re: Attachments<br>
Workflow<br>
<Owner-SAP-WUG@MITVM<br>
A.MIT.EDU></tt></font>
<br>
<br>
<br><font size=2><tt>27.05.2003 08:10<br>
Please respond to<br>
"SAP Workflow Users'<br>
Group"</tt></font>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Thanks Kjetil,<br>
</tt></font>
<br><font size=2><tt>Ok ! Now I have only one option to go. That is, Write one method and<br>
execute<br>
it in first step.<br>
Is It?<br>
would you please eloberate difference between _adhoc_objects and<br>
_attach_objects?<br>
The Only difference which i think is the TYPE.<br>
_adhoc_objects  -- No Type, that is abstract type can be used for any kind<br>
of attachments.<br>
_attach_objects -- SOFM type, that is only with Office attachments.<br>
</tt></font>
<br><font size=2><tt>Do you know when _adhoc_objects being used in Workflow Circuit?<br>
</tt></font>
<br><font size=2><tt>Thanks.<br>
- Vinod.<br>
</tt></font>
<br><font size=2><tt>-----Original Message-----<br>
From: SAP Workflow [mailto:Owner-SAP-WUG@MITVMA.MIT.EDU]On Behalf Of<br>
Kjetil Kilhavn<br>
Sent: Tuesday, May 27, 2003 11:20 AM<br>
To: SAP-WUG@MITVMA.MIT.EDU<br>
Subject: Re: Attachments<br>
</tt></font>
<br>
<br><font size=2><tt>Ahhhh.. good point. The only event container element I can think of right<br>
here and now is the adhoc objects.<br>
Unless you can pass _adhoc_objects to _attach_objects it is probably better<br>
to do the copying at the beginning of the flow as you suggest.<br>
</tt></font>
<br><font size=2><tt>Modifying SAP standard is never a good idea. It is sometimes necessary, but<br>
it is never a good idea. I've only encountered SPAU briefly, but it was<br>
enough.<br>
--<br>
Kjetil Kilhavn<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Vinod Ramchandani<br>
<vinod.ramchandani@p        To:</tt></font>
<br><font size=2><tt>SAP-WUG@MITVMA.MIT.EDU<br>
atni.com>                   cc:     (bcc: Kjetil</tt></font>
<br><font size=2><tt>Kilhavn)<br>
Sent by: SAP                Subject:     Re:</tt></font>
<br><font size=2><tt>Attachments<br>
Workflow<br>
<Owner-SAP-WUG@MITVM<br>
A.MIT.EDU></tt></font>
<br>
<br>
<br><font size=2><tt>26.05.2003 14:17<br>
Please respond to<br>
"SAP Workflow Users'<br>
Group"</tt></font>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Thanks Kjetil,<br>
</tt></font>
<br><font size=2><tt>I have found two FM's which can probalbly make my work easy.<br>
1) SWI_WORKITEMS_OF_OBJTYPE_GET<br>
2) SWL_WI_ATTACHMENTS_READ<br>
</tt></font>
<br><font size=2><tt>But How should I encapsulate this functionality in my logic.<br>
I was thinking in the following direction.<br>
- Write one Static(Instance Independent) Method in the according Business<br>
Object,<br>
And call this method in first step of the flow and passing this attachment<br>
table to the workflow container parameter - _attach_objects.<br>
</tt></font>
<br><font size=2><tt>But your suggestion is seems to be quite efficient (using check function<br>
module).<br>
But Check Function has the similar interface like event container.<br>
How can I pass the the value to the _attachment_objects from check funtion<br>
module?<br>
would you have any idea?<br>
Should i modify the event, to change the event container parameters...or<br>
anything else?<br>
</tt></font>
<br><font size=2><tt>Thanks once again for your help.<br>
</tt></font>
<br><font size=2><tt>- Vinod.<br>
</tt></font>
<br>
<br>
<br><font size=2><tt>-----Original Message-----<br>
From: SAP Workflow [mailto:Owner-SAP-WUG@MITVMA.MIT.EDU]On Behalf Of<br>
Kjetil Kilhavn<br>
Sent: Monday, May 26, 2003 11:19 AM<br>
To: SAP-WUG@MITVMA.MIT.EDU<br>
Subject: Re: Attachments<br>
</tt></font>
<br>
<br><font size=2><tt>Write a check function which finds the previous instance of the same<br>
workflow for the requisition object (SWW_WI_TO_OBJECT_FIND) and copies the<br>
attachment object(s).<br>
--<br>
Kjetil Kilhavn<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Vinod Ramchandani<br>
<vinod.ramchandani@p        To:</tt></font>
<br><font size=2><tt>SAP-WUG@MITVMA.MIT.EDU<br>
atni.com>                   cc:     (bcc: Kjetil</tt></font>
<br><font size=2><tt>Kilhavn)<br>
Sent by: SAP                Subject:     Attachments<br>
Workflow<br>
<Owner-SAP-WUG@MITVM<br>
A.MIT.EDU></tt></font>
<br>
<br>
<br><font size=2><tt>24.05.2003 10:05<br>
Please respond to<br>
"SAP Workflow Users'<br>
Group"</tt></font>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2><tt>Hi Workflowers,<br>
I want to configure Standard Purchase Requisition Release Workflow.<br>
I want to carry the attachments on workitem to the next release iteration.<br>
- Workflow has simply two step execution.<br>
- Workflow is triggered on "releasestepcreated" event.<br>
- At every iteration of the release procedure of the same requisition, In</tt></font>
<br><font size=2><tt>new Workflow instance, I need the attachments of the previous workflow<br>
instance which is in  "completed" - status.</tt></font>
<br><font size=2><tt>can anybody have any suggestion or Idea?<br>
</tt></font>
<br><font size=2><tt>Thanks in Advance.<br>
Regards,<br>
Vinod.<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>-------------------------------------------------------------------<br>
The information contained in this message may be CONFIDENTIAL and is<br>
intended for the addressee only. Any unauthorised use, dissemination of the<br>
information or copying of this message is prohibited. If you are not the<br>
addressee, please notify the sender immediately by return e-mail and delete<br>
this message.<br>
Thank you.<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>-------------------------------------------------------------------<br>
The information contained in this message may be CONFIDENTIAL and is<br>
intended for the addressee only. Any unauthorised use, dissemination of the<br>
information or copying of this message is prohibited. If you are not the<br>
addressee, please notify the sender immediately by return e-mail and delete<br>
this message.<br>
Thank you.<br>
</tt></font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>-------------------------------------------------------------------<br>
The information contained in this message may be CONFIDENTIAL and is<br>
intended for the addressee only. Any unauthorised use, dissemination of the<br>
information or copying of this message is prohibited. If you are not the<br>
addressee, please notify the sender immediately by return e-mail and delete<br>
this message.<br>
Thank you.</tt></font>
<br>
<br>
<br>
<br>