Can not open pdf attachment in email (SBWP)
Hello Expert,
I created a program to covert a form to pdf format, then, send it to SAPoffice (SBWP) as an attachment successfully. But I cannot open the pdf attachment. I don't know the reason. Could you please give me some suggestion?
use function module 'CONVERT_OTF_2_PDF' to convert pdf format
use function module SO_NEW_DOCUMENT_ATT_SEND_API1 to send email.
points will be assigned for Helpful suggestion.
Thank you.
Thanks.
I have tried to download it into my local computer, the downloaded pdf file can be open correctly. So it's the problem in my program.
Below is my program, thanks a lot.
DATA: itcpo LIKE itcpo,
tab_lines LIKE sy-tabix.
Variables for EMAIL functionality
DATA: maildata LIKE sodocchgi1.
DATA: mailpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
DATA: mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
DATA: mailbin LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
DATA: mailrec LIKE somlrec90 OCCURS 0 WITH HEADER LINE.
DATA: solisti1 LIKE solisti1 OCCURS 0 WITH HEADER LINE.
PERFORM send_form_via_email.
FORM SEND_FORM_VIA_EMAIL *
FORM send_form_via_email.
CLEAR: maildata, mailtxt, mailbin, mailpack, mailhead, mailrec.
REFRESH: mailtxt, mailbin, mailpack, mailhead, mailrec.
Creation of the document to be sent File Name
maildata-obj_name = 'TEST'.
Mail Subject
maildata-obj_descr = 'test_1234567879'.
Mail Contents
mailtxt-line = 'Here is your file'.
APPEND mailtxt.
Prepare Packing List
PERFORM prepare_packing_list.
CLEAR: mailpack, mailbin, mailhead.
REFRESH: mailpack, mailbin, mailhead.
DESCRIBE TABLE mailtxt LINES tab_lines.
READ TABLE mailtxt INDEX tab_lines.
maildata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( mailtxt ).
Creation of the entry for the compressed document
CLEAR mailpack-transf_bin.
mailpack-head_start = 1.
mailpack-head_num = 0.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'PDF'.
APPEND mailpack.
PERFORM get_otf_code.
DATA: BEGIN OF otf OCCURS 0.
INCLUDE STRUCTURE itcoo .
DATA: END OF otf.
DATA: itcpo LIKE itcpo.
DATA: itcpp LIKE itcpp.
CLEAR itcpo.
itcpo-tdgetotf = 'X'.
Start writing OTF code
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZTEST_FORM'
language = sy-langu
options = itcpo
dialog = ' '
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'START_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'MAIN'
EXCEPTIONS
error_message = 01
OTHERS = 02.
Close up Form and get OTF code
CALL FUNCTION 'END_FORM'
EXCEPTIONS
error_message = 01
OTHERS = 02.
MOVE-CORRESPONDING itcpo TO itcpp.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
result = itcpp
TABLES
otfdata = otf
EXCEPTIONS
OTHERS = 1.
DATA: i_tline TYPE TABLE OF tline WITH HEADER LINE,
v_len_in LIKE sood-objlen.
DATA doctab_archive LIKE docs OCCURS 10.
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
USE_OTF_MC_CMD = 'X'
ARCHIVE_INDEX =
IMPORTING
BIN_FILESIZE =
TABLES
otf = otf
doctab_archive = doctab_archive
lines = i_tline
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR solisti1. REFRESH solisti1.
LOOP AT i_tline.
solisti1-line = i_tline.
APPEND solisti1.
ENDLOOP.
LOOP AT solisti1. "solisti1.
MOVE-CORRESPONDING solisti1 TO mailbin.
APPEND mailbin.
ENDLOOP.
DESCRIBE TABLE mailbin LINES tab_lines.
mailhead = 'TEST.PDF'.
APPEND mailhead.
Creation of the entry for the compressed attachment
mailpack-transf_bin = 'X'.
mailpack-head_start = 1.
mailpack-head_num = 1.
mailpack-body_start = 1.
mailpack-body_num = tab_lines.
mailpack-doc_type = 'PDF'.
mailpack-obj_name = 'TEST'.
mailpack-obj_descr = 'Subject'.
mailpack-doc_size = tab_lines * 255.
APPEND mailpack.
Set recipient - email address here!!!
mailrec-receiver = 'FU.Q.HUANG'. "'[email protected]'.
mailrec-rec_type = 'B'. "'U'.
APPEND mailrec.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = maildata
PUT_IN_OUTBOX = ' '
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = mailpack
OBJECT_HEADER =
contents_bin = mailbin
contents_txt = mailtxt
CONTENTS_HEX = mailbin
OBJECT_PARA =
OBJECT_PARB =
receivers = mailrec
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Similar Messages
-
I'm using iphone 4S and ipad mini, and I can not open PDF file only from my husband email that using Mic outlook. It was very weird because I can received other email with pdf file from other people. Can someone help...
Thanks in advanceHi Eidda,
This may because the attachment is a winmail.dat file. I would recommend taking a look at the article below for more information. Note: the article is written for OS X mail, but does also apply to this situation.
Mac OS X Mail: What is a winmail.dat attachment?
http://support.apple.com/kb/HT2614
-Griff W. -
In most of my email attachment the logo ( Mimi attachment ) show and I can not open that attachment , why and how to solve this problem ???
iPad 2, iOS 7When did this start? What was the last thing you changed before problem started?
Have you tried sending the attachment from a different account. Have a friend send you an attachment. Get a gmail account.
Send the email with attachments to two different accounts one to your ipad and the other to a gmail account in a web browser and not on an iPad. See if you can read the ones to the gmail account.
You did reboot your ipad?
Standard stuff for ipad.
http://www.my-iguru.com/ipad/ipad-hints-tips/ipad-viewing-saving-email-attachmen ts.php -
How can I open PDF attached to Yahoo email in Windows7 ?
ADOBE Reader XI Installed seemingly OK, [windows 7] but does not open PDF attachment contained in Yahoo email
When I try, an unreadable large number of letters and symbols shows up, framed in the middle of the screen.
-
I can not open PDF attachments from outlook 2010. I am running windows 8 and using Adobe version 11.0.2 If I save the file to desktop, then it will allow me to open it and print it.
Thanks in advance for yor help.
the error says it can not open the file because it is unsupported or corrupt.If you can't open the attachment, have your client/ customer or whatever fix their defective copy of Outlook and send real mail attachments not TNEF encoded rubbish. They are spewing defective email every time they click send on a mail with an attachment.
See https://support.mozilla.org/en-US/kb/what-winmaildat-attachment -
CAN NOT OPEN PDF EMALE FILES RECIEVED
I have bought 3 up grades, first $323.54 Aug 21, 07 second $95.93 Aug 11 012, third Dec 1 012 for another $236.73. My problem has been I CAN NOT OPEN PDF EMAILS. This purchase yesterday has not solved the problem, why does it not give me the ability to fix the problem?
Can you let us know exactly what three products you purchased, so we can direct you to the right place.
-
There was an error opening document. Access denied. Cant open pdf attached to emails
I just upgraded to Acrobat Reader x and can't open files attached to emails in Outlook 2010. If I save the file, I can open it. I assume it has something to do with protected view or such but can't find where to change settings. I can open .doc and .xlsx files attached to emails so it seems to be only an issue with .pdf files attached to emails in Outlook. Suggestions?
To make things simple for you, here are two ways for you fix the problem:
A. Fix One PC
Launch Adobe Acrobat Reader X
Go to: Edit > Preferences...
Click on "General" in the left pane.
Uncheck "Enable Protected Mode at startup"
You will prompted with a dialog box to remind you to close the application for the change to go into effect. Click Yes.
Click OK to save your change.
Exit Adobe Reader
B. Fix Several PCs in Your Organization
Following the above steps aren't practical if you have Adobe Acrobat installed on 1,000+ computers in 30 regional offices! Push this registry setting using your standard software deployment software.
[HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\10.0\Privileged]
"bProtectedMode"=dword:00000000
Microsoft Outlook and other email clients
I hear this will also fix the "There was an error opening this document. Access denied." error that is occurring with any email client, including Microsoft Outlook Express; Microsoft Outlook 2010, 2007, 2003; Eudora; Mozilla Thunderbird.
Credit for this answer must go to http://www.brianstevenson.com/blog/adobe-acrobat-reader-x-there-was-error-opening-document -access-denied -
I can not open any attachment in my MACBook Air laptop. sometime I only can access the attachments as HTML.
Note that i am using Outlook Web Access to access my company email..Hello Rami:
Welcome to Apple discussions.
This knowledge base article may be of some help:
http://docs.info.apple.com/article.html?path=Mail/3.0/en/9995.html
Barry -
I am running Vista and Windows Mail, I can not open PDF files when in Windows Mail, I must save to Desktop first, this has changes recently and I do not know why or how to fix.
Why after 6 year's this has changed?
I would like to open PDF's straight from Window Mail.Good day Jeff.
I am running most current Adobe Reader X.
Tks Mark -
I can not open PDF files in safari
I can not open PDF files in safari. How can I fix this problem?
Back up all data.
Quit Safari. In the Finder, select Go ▹ Go to Folder... from the menu bar, or press the key combination shift-command-G. Copy the line of text below into the box that opens, and press return:
/Library/Internet Plug-ins
From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then launch Safari and test.
If you still have the issue, repeat with this line:
~/Library/Internet Plug-ins
If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again. -
Can not open pdf documents...
can not open pdf documents..., when i use my laptop without restart two,three day's....???????
why is that ??????????AmS-Haz wrote:
I mean, when I install the Adobe Reader 8 previous problem occur, as same as Adobe Reader 9, I did not use or install Adobe Reader 8 &
Adobe Reader 9 both are concurrently....
Do you have, or have
had, both Reader 8 and Reader 9 installed
at the same time in your machine? If you have, you must
do as graffiti
suggested in a previous message.
Extra line breaks kindly provided by the software. -
Can not open pdfs w/adobe reader for android on archos 10i tablet?
I can not open pdfs w/adobe reader for android on archos 10i tablet? How to fix it?
Hi Dennis, thank you for the reply. I have Adobe Reader installed and open. When I click on the pdf documents an error message box opens and says "Error. The document cannot be opened beacause it is not a valid pdf document". Perhaps the pdf's on the USB memory stick are corrupted. I can't open them on the laptop either. I'll reload them and try again.
-
Even I have the latest version of Adober reader I still can not open pdf file on safari
Even I have the latest version of Adober reader I still can not open pdf file on safari.
Save the file locally, open the Reader application and try to open it from there. If it still doesn't work provide the full details of your OS, Reader version and the exact error message you're getting when you try to open the file.
-
If I want to open a pdf document I get the following error-message:
"Error during page elaboration. A problem occurred during reading this document (109)"
I have Adobe Reader V8. I removed the version 8 and installed version 7, but I still can not open the document.I can not open .pdf documents unless I save them first. But sometimes I can't download the file first - I get an error message that says that my version of Adobe can't open a .pdf in a web browser...
Help -
I have a brand new MacBookProo and I can not open PDF files from my desktop. Can anyone help me with this please?
A new Mac comes with 90 days of free tech support from AppleCare.
AppleCare: 1-800-275-2273
Maybe you are looking for
-
Iphone 4 does not want to turn on and home button is messed up.
Yeaaa:(
-
I have a Windows XP Pro PC and Can't Get it to Connect to an Airport Wireless network
Hi, I'm kinda at my wit's end here. I have a desktop PC using Windows XP Pro operating system. To get wireless, I'm using an external wireless d-link USB. It works fine on my home network. I took the desktop to my local repair guy. There's nothing wr
-
Orarrp it works with OAS 40821
Orarrp it works with OAS 40821??? I configured the MIME types in oas 40821 and I installed orarrp in the client. When I run direct printing by Web, the process tries to unload filename.rrpa to the disk instead of printing to local printer.
-
Reading form data using javascript
Hello. I want to go over the data received from the context to the PDF file using JavaScript, without binding it to any elements on the form. How can I access the data? I've tried using xfa.data or xfa.dataset, but didn't manage to get to it. How can
-
I'm trying to load a .TOD file from a server-based JVC camera. Anyway, I have to use MPEG Streamclip to change the file into a FCE usable format. I'm changing the file format into MPEG4, but it takes FOREVER for the clip to convert into MPEG4 and the