Show TOC

Uploading Attachments to a Work ItemLocate this document in the navigation structure

This action uploads attachments to a Workflow work item. For this, you must execute a POST request on the Attachments Collection.

To upload attachments to a Workflow work item:

  1. On the SAP Gateway system, go to transaction SPRO, open the SAP Reference IMG and navigate to Start of the navigation path SAP NetWeaver Next navigation step  SAP Gateway Next navigation step OData Channel Next navigation step Administration Next navigation step General Settings Next navigation step Activate and Maintain Services End of the navigation path.

  2. Select the Workflow service.

  3. Execute a POST request on the AttachmentsCollection.

  4. Fill in the request body as shown in the example below.

    Request body <atom:entry xmlns:atom="http://www.w3.org/2005/Atom"> <atom:id></atom:id> <atom:summary>Summary</atom:summary> <atom:title>Title</atom:title> <atom:updated>2010-08-09T14:35:45Z</atom:updated> <atom:author> <atom:name></atom:name> </atom:author> <atom:content type="application/xml"> <m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"> <d:filename>testfile_excel</d:filename> <d:extension>doc</d:extension> <d:content>ZGZzZnNkZnNmc2Rmc2Y=</d:content> </m:properties> </atom:content> </atom:entry> 
  • Important: To enter the attachment content to the body, you must first decode it to Base64. Only then is the attachment uploaded to the item.

  • The fields filename, file_ext, and content are mandatory.