AW: Reading WF Attachment
Werner Kößl
werner.koessl at hirschvogel.de
Wed Aug 27 07:14:43 EDT 2003
DATA buffer TYPE TABLE OF swr_object.
DATA attach_key TYPE swotobjid.
DATA BEGIN OF attach_objkey,
folder_id TYPE soodk,
object_id TYPE soodk,
forwardername LIKE soub-usrnam,
END OF attach_objkey.
DATA obj_container TYPE TABLE OF soli WITH HEADER LINE.
CALL FUNCTION 'SAP_WAPI_GET_ATTACHMENTS'
EXPORTING
workitem_id = workflow_id
IMPORTING
return_code = sy_retcode
TABLES
attachments = buffer.
MOVE buffer-object_id TO attach_key.
MOVE attach_key-objkey TO attach_objkey.
CALL FUNCTION 'SO_OBJECT_READ'
EXPORTING
folder_id = attach_objkey-folder_id
object_id = attach_objkey-object_id
TABLES
objcont = obj_container
EXCEPTIONS
....
Now the content of the attachment is inserted in the table 'obj_container'.
But only for SAP internal Objects like RAW or SCR.
This method does not work with external objects like DOC, XLS, ...
Werner.
-----Urspr|ngliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Sanusi Oetomo
Gesendet: Mittwoch, 27. August 2003 10:12
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Re: Reading WF Attachment
Hi Werner,
Thanks for your response.
I've tried and get the attachment result (FOL280000...),
how do we get the text or content of the attachment?
Regards
Sanusi
-----Original Message-----
From: Werner Kv_l [mailto:werner.koessl at hirschvogel.de]
Sent: Tuesday, August 26, 2003 8:10 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: AW: Reading WF Attachment
Hello Sanusi,
you can use FM "SAP_WAPI_GET_ATTACHMENTS".
You have to export the workitem-ID to the FM and get back a table of the
attachments.
Regards,
Werner.
-----Urspr|ngliche Nachricht-----
Von: SAP Workflow [mailto:Owner-SAP-WUG at MITVMA.MIT.EDU]Im Auftrag von
Sanusi Oetomo
Gesendet: Dienstag, 26. August 2003 10:03
An: SAP-WUG at MITVMA.MIT.EDU
Betreff: Reading WF Attachment
Hi all,
Is there function to read WF attachment?
I've to pass the content of attachment to someone.
Environment: 4.6C
Thanks a lot before
Sanusi
More information about the SAP-WUG
mailing list