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

Problem sending XML file by email

0 Likes
451

Dear all,

I have developed a program that uploads XMLfile and sends it attached by email. The XML file can be local or server.

To upload local file, I use gui_upload (bin); to upload server file I use open data set (bin) and I convert the line read using fm SCMS_XSTRING_TO_BINARY. To send it I use CL_BCS.

I execute the program, the email is sent, I receive it, I go to check the attached XML file, I open it, and I get a error message. Says that the XML page cannot be open, and indicates that the problem is at the last line of the file.

So I open the file at Notepad, and I see that there are some spaces at the end of the last line. I erase those spaces, save the file, and them I try to open the file again, it works.

I would like to know if anybody could help me with that. Why the file is going with those spaces and what I can do to avoid that.

Thank you very much.

Karla.

Dear all,

I have developed a program that uploads XMLfile and sends it attached by email. The XML file can be local or server.

To upload local file, I use gui_upload (bin); to upload server file I use open data set (bin) and I convert the line read using fm SCMS_XSTRING_TO_BINARY. To send it I use CL_BCS.

I execute the program, the email is sent, I receive it, I go to check the attached XML file, I open it, and I get a error message. Says that the XML page cannot be open, and indicates that the problem is at the last line of the file.

So I open the file at Notepad, and I see that there are some spaces at the end of the last line. I erase those spaces, save the file, and them I try to open the file again, it works.

I would like to know if anybody could help me with that. Why the file is going with those spaces and what I can do to avoid that.

Thank you very much.

Karla.

1 REPLY 1
Read only

0 Likes
382

Solved passing the file length at document->add_attachment.