09-09-2019 4:58 PM
Hi,
I have created a z program to send email with a single pdf attachment.
I am using the FM: SO_NEW_DOCUMENT_ATT_SEND_API1 to send the email.
I am using the FM:GUI_UPLOAD to specify the PDF file.
Now I want to attach more than one RDF files to the email.
I have managed to create and send the email with two attachments but all attachments are corrupted.
When I open the email and trying to open the attachments I get an error:
The file is damaged and cannot be repaired.
Can someone help me?
09-09-2019 6:03 PM
Problem solved.
The error was in body_start, body_num and doc_size fields of packing_list table of the FM.
For second attachment:
The body_start must have the number of lines +1 of the first attachment
The body_num must have the number of lines of the second attachment .
The doc_size must have the number of lines of the second attachment multiplied by 255.
Thanks.
09-09-2019 6:03 PM
Problem solved.
The error was in body_start, body_num and doc_size fields of packing_list table of the FM.
For second attachment:
The body_start must have the number of lines +1 of the first attachment
The body_num must have the number of lines of the second attachment .
The doc_size must have the number of lines of the second attachment multiplied by 255.
Thanks.
09-10-2019 8:39 AM
Note that SO_NEW_DOCUMENT_ATT_SEND_API1 is obsolete and that you should use BCS classes.
Now, read your question again and you'll see that it's impossible to answer except saying to compare your code to one of the BCS demo programs.