Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SO_DOCUMENT_SEND_API1 - attach an excel file but have missing line items

Former Member
0 Likes
1,089

Hi all,

I am using this fm SO_DOCUMENT_SEND_API1 to send an excel file to an external email. The excel file is from and internal table. The program works fine with no errors but when I received the email, the file only have 15 line items. It supposed to have 25 line items. I am not sure why this has happened from debug I see no errors and correct values were passed.

Anyone have any ideas?

Thanks.

Hi all,

I am using this fm SO_DOCUMENT_SEND_API1 to send an excel file to an external email. The excel file is from and internal table. The program works fine with no errors but when I received the email, the file only have 15 line items. It supposed to have 25 line items. I am not sure why this has happened from debug I see no errors and correct values were passed.

Anyone have any ideas?

Thanks.

1 REPLY 1
Read only

gokul_radhakrishnan3
Active Participant
0 Likes
551

Hi,

Please check whether you are passing the correct parameters in the parameter 'packing_list' for the attachment line. First line should be for the mail text/header part and next lines are for attachments. For example,

  • Create attachment notification for each attachment

objpack-transf_bin = 'X'. (if the attachment is passed in contents_hex)

objpack-head_start = 1.

objpack-head_num = 1.

objpack-body_start = lv_num + 1.

DESCRIBE TABLE lt_target_tab LINES objpack-body_num.

objpack-doc_size = objpack-body_num * 255.

objpack-body_num = lv_num + objpack-body_num.

lv_num = objpack-body_num.

objpack-doc_type = 'XLS'. or what ever attachment you are sending.

APPEND objpack.

Based on what you have explained here, it seems like the doc_size parameter value is passed wrongly. In debugging, see what is getting passed. Try passing a higher value & see whether there is any difference. Check body_num also.

Regards,

Gokul