10-29-2014 10:15 AM
Hi Experts ,
I want to send IDOC with some attachment like TEXt file or image.
I read forums regarding this but couldn't get it.
Can anyone help me on this.
Thanks ,
Akriti
10-29-2014 8:24 PM
Hi,
i am afraid this is not possible. Data is stored in character format in an IDoc (you can think about it as a text file) and cannot contain binary data or attachments.
Dov
10-30-2014 4:11 AM
Hi, as far as I am aware there are no standard IDOC's that send out attachments.
However you can add it in an IDOC extension and use a ABAP exit or enhancement in the outbound IDOC to populate the IDOC data.
We have a development in place that attaches invoice archivelink documents into the invoice IDOC. The data is encoded into base 64 format.
Regards Jack
09-16-2020 3:30 PM
Hi
I have a question for you. We want to do the exact same thing as you have described here :
"invoice archivelink documents into the invoice IDOC. The data is encoded into base 64 format."
We have an output type for the IDOC, but the IDOC is not saved iin archivelink, which is also expected, but we would like to avoid having to have 2 output types, one to create teh PDF to the archivelink and one to create the IDOC, so how did you handle the part of saving the billing document to archivelink without using 2 output types?
Hope you can clarify
Thanks in advance
Br Birgitte Hamborg Jakobsen
10-30-2014 5:25 AM
Thanks for the comments.
I read in some forums that we can add an extra segment with binary type field and can attach the binary format of that file in it an then can send the IDOC to SAP.
Is it possible? if yes then could you please explain how?
And there is one issue that how can i get the file attached in the IDOC in SAP.
Regards,
Akriti
10-30-2014 6:00 AM
Hi, the IDOC segments are character based. To put binary attachment data into the IDOC the binary data first need to be converted into BASE64 format. The BASE64 format is a character format.
To convert binary data into BASE64 function module SSCF_BASE64_ENCODE can be used.
Not sure you are sending or receiving an IDOC in SAP.
When receiving in SAP then you can use function module SSCF_BASE64_DECODE to decode the BASE64 IDOC data into binary data.
Also not sure how you want to process the attachment in SAP. When saving to a SAP office file you could use function module SO_DOCUMENT_INSERT_API1.
Regards Jack
10-30-2014 6:07 AM
Thanks Jack.. This was really helpful
Actually my scenario is to save the file attached to the IDOC into SAP content server.
Can you help me in this .
Regards
Akriti