Skip to Content

E-Mail Attachment is missing

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


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


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2013 at 08:57 AM

    Hi David,

    Check the include LCNTXF19 which will be helpful.

    Hope it helps.


    Tooshar Bendale

    Add a comment
    10|10000 characters needed characters exceeded

    • Hello Bendale,

      In the TA "Soin" i don't find information about the workitem.

      In the TA "SWIA" I find no further information

      About the FM "SO_ATTACHMENT_READ" and "SO_ATTACHMENT_LIST_READ" i get some information about the attachment.

      Now i need the binary string and text content. It must be possible without a workflow/workitem or?

      How can i determine the workitem number?



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.