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 not working to Email SapScript PDF

0 Likes
926

Hi All,

  I have converted my SapScript using  SX_OBJECT_CONVERT_OTF_PDF and it converts the SapScript to PDF fine. I can download the file to my desktop and it opens with adobe with no issue, I can even email it from my desktop and it opens fine.

HOWEVER, when I try to email it from my program using either  SO_DOCUMENT_SEND_API1 or  SO_NEW_DOCUMENT_ATT_SEND_API1 the attaching the file as  contents_hex the email arrives with attachment fine but when I try to open the file, I get a message saying that the attachment has been corrupted and cannot be repaired. This is the same file that opens without issue when downloaded. as a matter of fact I left the download in the program and the same file comes both ways opens on download corrupted message through email.

I have noticed that I am using PDF as document type  lt_objpack-doc_type = 'PDF'. and it our table TSOTD - Valid Object Types there is no entry for PDF. Do we need to perhaps add a PDF entry??

Any suggestions?

Thanks,

Jim

1 ACCEPTED SOLUTION
Read only

0 Likes
774

Hi All,

   I rewrote it using cl_bcs and it now works without issue.

Thanks,

Jim

Hi All,

   I rewrote it using cl_bcs and it now works without issue.

Thanks,

Jim

1 REPLY 1
Read only

0 Likes
775

Hi All,

   I rewrote it using cl_bcs and it now works without issue.

Thanks,

Jim