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

Send email with attachment

Former Member
0 Likes
622

Hi all,

In my webdynpro i have an UI element FileUpload and i want to send this file by email.

I'm trying with the FM SO_NEW_DOCUMENT_ATT_SEND_API1 but always returns the exception document_not_sent

I'm using also the FM SCMS_XSTRING_TO_BINARY to convert the data to binary.

Do you know any FM to do it ?

If you want i'll post my code for check it...

Thanks in advance.

Hi all,

In my webdynpro i have an UI element FileUpload and i want to send this file by email.

I'm trying with the FM SO_NEW_DOCUMENT_ATT_SEND_API1 but always returns the exception document_not_sent

I'm using also the FM SCMS_XSTRING_TO_BINARY to convert the data to binary.

Do you know any FM to do it ?

If you want i'll post my code for check it...

Thanks in advance.

3 REPLIES 3
Read only

thomas_jung
Developer Advocate
Developer Advocate
0 Likes
581

This isn't really a Web Dynpro ABAP question. I'm moving your question to the ABAP General Forum since your focus is sending an email with an attachment. There are tons of materials on this topic within SCN. I suggest that you search. You will likely have to provide more details on the error. Have you tested with a simple email from standard SAP functionality? Any error or trace details in SCOT? Have you considered using the CL_BCS classes to send email instead? The BCS classes are the recommended method over the old function modules. There is also the class CL_BCS_CONVERT to help with the conversion from STRING/XSTRING to the SOLI/SOLX format for the mail interface.

Read only

0 Likes
581

ok, it was a configuration problem.

At the begining I opened the thread in the ABAP WebDynpro forum because I did not know if the FM used some class cl_gui * which conflict with the WebDynpro, i did not know if there was a better FM.

I don't knew the class CL_BCS, i'm going to try to see how it works.

Thanks!

Read only

brad_bohn
Active Contributor
0 Likes
581

Use a dynamic breakpoint at 'RAISE' or 'MESSAGE...RASING' to stop in debug mode when the exception is thrown and identify the condtion. You can also find the exception in the code and backtrack to the error for setting a breakpoint. There are multiple reason for that particular error, including SAPConnect not being configured properly.