cancel
Showing results for 
Search instead for 
Did you mean: 

How to store Multiple Attachments in Workflow.

Former Member
0 Kudos

Hello All,

I am doing an scenario, in that i need to store multiple attachments in the workflow container.

Kindly help me, how to store and also, how to retrieve those attachments form worklfow.

I am using custom workflow.

Thanks in advance......

Best Regards,

Chandran S

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Finally We are able get the attachments and its contents.

Thanks

Best Regards,

Chandran S

Former Member
0 Kudos

Hi,

Please tell us how this is achieved. For me also, I can't get the content of the attachments.

Regards,

Jubish Jacob

Former Member
0 Kudos

Hi Chandan,

Can you please post how you added multiple attachments in a single workflow. My requirement is when I select workitem it should display multiple attachments.

Former Member
0 Kudos

Hi Jubish/Venkat

1. I iterated this fucntion moudule to store the multiple attachments to the workflow

SAP_WAPI_ATTACHMENT_ADD

2. Call this FM to get the attachemnts form the workflow (pass workitem Item id which is used for storing the attchments). SAP_WAPI_GET_ATTACHMENTS

from above you will get objkey for each attachment as output in table.

3. Pass the objkey to this FM to get the contents

SO_DOCUMENT_READ_API1'. this will retrun the content of the attachment either in object_content, contents_hex.

4. Pass the Obtained content to SCMS_BINARY_TO_XSTRING to get the disired format.

Best Regards,

Chandran S

Former Member
0 Kudos

Hi All,

I searched through SDN and got the solution for first one Storing Mulitiple Files in Workflow.

and also i am able to retrieve the list of attached files.

Now the thing is i want to get the content of the file and that should be provided to the Web Dynpro Java Application and get dis[layed there. How to get the Content (XSTRING) of that file.

Kindly Help us......Thanks in Advance..........

Best Regards,

Chandran S

vijy_mukunthan
Active Contributor
0 Kudos

Hi chandran

The attachment you need to get in xstring and put that xstring in a binfile and make a link in your webdynpro if your using JAVA. Suppose if your using ABAP the content in the binfile is put in the function module so_new_document_api1 that function module. I dont no the full name of the function module. Put the binfile there it will go has attachment in the mail. For regarding multiple attachment loop the binfile alone and call the function module inside the loop.

Regards

vijay

bpawanchand
Active Contributor
0 Kudos

To get the content in the XSTRING format make use of the FM SCMS_BINARY_TO_XSTRING

Former Member
0 Kudos

Hi Vijay,

Thanks for the reply,

My scenario is i want to make attachments (files of any type ) to the workflow. I am able attach the file through FM SAP_WAPI_ATTACHMENT_ADD and also i am able to read the attachments through FM SAP_WAPI_GET_ATTACHMENTS, but this FM is retruning only File Name and Object ID , there is no content . With the Object ID and File name how to get the file content (either as Binary or XString).

Kindly Help us............Thanks in Advance.

Best Regards,

Chandran S

Former Member
0 Kudos

Hi All,

I searched through SDN and got the solution for first one Storing Mulitiple Files in Workflow.

and also i am able to retrieve the list of attached files.

Now the thing is i want to get the content of the file and that should be provided to the Web Dynpro Java Application and get dis[layed there. How to get the Content (XSTRING) of that file.

Kindly Help us......Thanks in Advance..........

Best Regards,

Chandran S