Hi experts,
in our system, we get e-mails from another SAP machine.
In the transaction "SOIN" the e-mails are displayed correctly.
The e-mail should be forwarded to external recipients.
With help of "If_document_bc help" we were able to determine all the necessary data (body, receiver).
Unfortunately we can not determine the attachment (a zip-archive).
When creating our documents the attachments are missing.
We could determined information about the attachments by using the FM "SO_ATTACHMENT_READ" and "SO_ATTACHMENT_LIST_READ" .
Code sample to create the document with an empty attachment
DATA: document TYPE REF TO cl_document_bcs.
document = cl_document_bcs=>create_document( i_type = me->soodk-objtp
i_text = me->mail_body-cont_text
i_subject = subject
).
CALL METHOD document->add_attachment
EXPORTING
i_attachment_type = 'EXT'
i_attachment_subject = '0SRCT_DS1_Q003'
* i_attachment_size =
* i_attachment_language = SPACE
* i_att_content_text =
* i_att_content_hex =
* i_attachment_header =
And here i need the content of the attachment.
The class "CL_DOCUMENT_BCS" includes the method "add_attachment". I can add an attachment but i need the content from the original mail
How can I add the attachment to the document?
Best regards
David