Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Attachment is many

Hi Gurus,

I have requirement that needs to email a client.

I have used the SO_NEW_DOCUMENT_ATT_SEND_API1 FM to email the attachment.

The problem is, it is inside the loop statement.

loop at it_objpack into wa_objpack.


wa_objpack-transf_bin = c_x.

wa_objpack-body_start = 1.

wa_objpack-body_num = gv_tab_lines.

wa_objpack-obj_langu = sy-langu.

wa_objpack-doc_type = c_dat.

wa_objpack-obj_name = c_att.

wa_objpack-obj_descr = lv_title.

wa_objpack-doc_size = gv_tab_lines * 250.

APPEND wa_objpack TO it_objpack.


Is that the code that is making all the attachments?

I have tried running it as many times as the loop, and filtering only the needed record that I need. The problem is that, there is no more attachment.

Is there any way that I could use to have only 1 attachment?

Thanks in advance.


Former Member
Not what you were looking for? View more on this topic or Ask a question