cancel
Showing results for 
Search instead for 
Did you mean: 

How to download the attachment text to local file.

Former Member
0 Kudos

Hi Xperts,

My requirement is at the time of workitem execution, Approver can write the attachment with the reason for Rejection.

Now, I need to down load that attachment content to local file and then that content needs to be updated in the PO Header changes.

I can able to get the attachment files' title, size and everything from the DB Table SOOD. But there is no Attachment's content is getting updated in that table.

Will you pls let me know how to download the content of the attachment to a local file from the sap.

ThanX in ADvance.

Krish.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I think you can use Function Module

SAP_WAPI_GET_ATTACHMENTS To retrieve the attachment

SO_FOLDER_ROOT_ID_GET to retrive the file extension.

Thaqnks

Arghadip

Former Member
0 Kudos

HI Arghadip Kar,

By using the Function Module SAP_WAPI_GET_ATTACHMENTS, we can get the Object id of the attachment, but not the content of the Attachment.

But, my requirement is to get the content of the attachment.

Best Regards,

Krishna.

vijy_mukunthan
Active Contributor
0 Kudos

Hi Krishna

You are getting the object id from SOOD table from the Object id use this FM SCMS_XSTRING_TO_BINARY to get the content of the attachment. Either use FM SCMS_XSTRING_TO_BINARY or SCMS_BINARY_TO_XSTRING based on your type of attachment.

Regards

vijay

Former Member
0 Kudos

Hi Vijay,

Have created customized FM for down loading the content of the Attachment.

ThanQ.

Krishna.

Former Member
0 Kudos

Hi krishna,

Can i know how u proceed? Because i also have the same requirement.

Thanks

Sagar

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

<<Do not post your email address>>

hi Krishna,

My mid is reddy dot sannala at the rate gmail dot com. Please send asap.

Edited by: Matt on Jul 22, 2009 3:59 PM

Former Member
0 Kudos

This message was moderated.

bpawanchand
Active Contributor
0 Kudos

I wish that even you can share the solution with others also........... So that contributors can even know how to handle the case when it occurs.