cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Content of attachment

Former Member
0 Kudos

Hi All,

I have a requirement where i need to get the attachment attached through CV01N . here i need a RFC which can return the content of attachment in the form of Binary data so its structure should be as below

RFC input -- DocumentNumber , type , Part , version

RFC export or table -- Table filled with attachment content in Binary format.

Please let me know its very much required immediately.

Thanks

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If KPro is available, then you can check scms package, function group - SCMS_CONV for conversion of files.

But function modules are not RFC enabled, you can write your own FMs and call modules from above function group to achieve this.

Regards

Surjit

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this :

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/codetogetthecontentofanattachmentinDMandmailittoexternalemailid

Thanks

Papiya

Edited by: Papiya chatterjee on Dec 17, 2009 9:33 AM

Former Member
0 Kudos

Hi Abhishek,

First use the function module : 'CVAPI_DOC_GETDETAIL and get the tables parameter PT_FILES.

Now read this PT_FILES : CLASS and OBJID.

Now use SDOK_PHIO_LOAD_CONTENT and get the details in FILE_CONTENT_BINARY .

Hope this solves your problem.