Open po sending as pdf to email
Hi All,
I am sending open po report converting as pdf and excel and sending it to email specified in the selection screen email.
for few materials in the selection screen the data is coming properly and sending it to email.
But for few materials a pdf is sending to email and while opening an error message is coming as "adobe reader could not open because it is neither not a supported file type or because the file has been damaged (ex: it was sent as an email attachment and wasn't correctly decoded).
could please let me know why this message is coming? and the excel doesn't contains any data?
what could be the reason?
Regards
SRI
Hi Sri,
Can you debug the code for the erroneous materials? Can you provide us with the function modules/class methods that you are using?
You can probably generate some logs where you can fill in those error details? Are the customization settings maintained properly for those materials?
Hope this will guide you better to track the error and provide here with more information so that we can exactly pin point the problem.
Thanks,
Samantak.
Similar Messages
-
Data from check boxes fails to be collected, when sending the PDF as email
Hi
I am working on an interactive PDF that should act as an ordersheet for clients to fill out. I am using Acrobat Pro 9, and everything works as intended, but when the client tries to send the order by email (By pressing a button that uses "submit a form" as actio, where it sends the whole PDF to a single email), the pdf pops up in the email client, and everything looks fine, except all of the checkboxes. None of them have been checked, even though the client have done so. I have searched the forums without luck, so now i am trying in here.
I have made sure that the client is using the version, that has the extended reader rights.
If you feel need additional information regarding the PDF, just ask.
Thank you very much for your time.Edit>Preferences>Email accounts>List of email accounts. Click the drop-down that says "add account" and select Gmail. After adding it, you can go to the account area and change it to default.
-
When I send a PDF attachment by email the recipient sees only a blank unfilled form. This has only occurred since IOS 7 was updated. The email with the PDF when recieved by my MAC is OK, but my phone and iPad are not!
Any advise would be appreciated.I have the same problem. Sought to insert a pdf into Apple Mail after editing a form pdf and only the blank form shows. I didn't use Preview to generate the form, just Acrobat. And, the filled in form inserts perfectly into an email when I use Outlook for Mac. Problem only with Apple Mail.
HELP!! -
Goodreader will allow me to send a PDF via email but my notes wont go?
I do apologize as I am very new to this. I did just download goodreader onto my iPad 2. It is very simple to use but I do have an issue. I was forwarding a PDF via email. I attached a note along with it, just above my signature. The email did go to a PC and the attachment was their, but the note and signature was attached as another attachment as a .txt file. The odd thing is, if I copy the email to myself it shows the note and signature? I hope i explained this situation so that it is understandable and thanks for any advise. Really am a big fan of the Apple products, even have a new iPhone 4 being delivered tomorrow.
GYes, but selecting the icon only gives me the option to print.
-
Trouble sending some pdfs by email
Hi I'm new to this so, please bear with my lack of technical language!
I've been having difficulties sending emails with pdf attachments. I'm running OSX 10.4.1 and use Mac Mail and have tried sending a variety of different sizes of pdf, but it doesn't seem to be the size that's the problem. It seems to be pdfs I've saved in Illustrator (CS2), but there seems to be no rhyme nor reason to which ones Mail will send and which ones it won't.
I thought it might be that some of the pdfs I'm trying to send are corrupt. One, in particular, which was 6MB I have now sent OK from Webmail; it's been received and read fine by the recipient. Another file, just 156kb which I produced to test Mail, was rejected with the message "This message could not be delivered and will remain in your Outbox until it can be delivered.
Sending the message content to the server failed."
This never used to be a problem until a few weeks ago. I have no idea what I've changed (if anything) and I'm beginning to tear my hair out.
Can anyone please help?
Thanks.You should really ask this question in the Acrobat forum and not here, since this is about the PDF file format...
Leonard -
Making spool, convert it into PDF and send that PDf throgh EMAIl
Hi,
In my making ALV report. In that i want to make the spool and then convert it into the pdf and send mail to the recepient.
AtulHi,
please try the following code. It works for me.
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
DATA : path LIKE pcfile-path.
DATA : extension(5) TYPE c.
DATA : name(100) TYPE c.
DATA:receiver TYPE somlreci1-receiver ,
p_file LIKE rlgrap-filename.
declarations for PDF convertion
DATA: path1 TYPE string ,
fullpath TYPE string.
DATA :textlines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA otf LIKE itcoo OCCURS 1000 WITH HEADER LINE.
DATA it_lines LIKE tline OCCURS 100 WITH HEADER LINE.
DATA options LIKE itcpo.
DATA header LIKE thead.
DATA result LIKE itcpp.
DATA: bin_filesize TYPE i.
fullpath type string.
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
DATA: filesize TYPE i,
convcount TYPE i,
cancel(1).
textlines-tdformat = '*'.
textlines-tdline = 'Hello Hao'.
APPEND textlines.
options-tdgetotf = 'X'.
options-tdnoprev = 'X'.
CALL FUNCTION 'PRINT_TEXT'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = ' '
ARCHIVE_PARAMS = ' '
DEVICE = 'PRINTER'
dialog = ' '
header = header
OPTIONS = options
IMPORTING
NEW_ARCHIVE_PARAMS =
RESULT = RESULT
tables
lines = textlines
otfdata = otf
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
UNKNOWN = 6
FORMAT = 7
TEXTFORMAT = 8
COMMUNICATION = 9
BAD_PAGEFORMAT_FOR_PRINT = 10
OTHERS = 11
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = filesize
TABLES
otf = otf
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_bad_otf = 2.
fullpath = 'C:/foldername/test.pdf'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin_filesize
filename = fullpath
filetype = 'BIN'
APPEND = ' '
CODEPAGE = ' '
NO_BYTEORDER_MARK = ' '
IMPORTING
FILELENGTH = c
TABLES
data_tab = it_lines
FORMAT_TAB =
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6.
*filename = fullpath.
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = 'Tst'.
docdata-obj_descr = 'Testing'.
reclist-receiver = give the mail id.
reclist-rec_type = 'U'.
APPEND reclist.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = fullpath
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
path = fullpath.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
extension = extension
name = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
invalid_drive = 1
invalid_extension = 2
invalid_name = 3
invalid_path = 4
OTHERS = 5
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT itab.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
objbin+len = itab(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND objbin.
CLEAR: objbin, len.
IF pos < 134.
objbin = itab+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND objbin.
ENDIF.
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
name = extension.
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = name.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = name.
APPEND objpack.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
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 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
Keerthi -
I have 2008R2 Remote Desktop Servers with Adobe Acrobat XI pro. When a new user tries to send a pdf via email, it pops up a message "How would you like to send this email" they have to pick "Default email application (Microsoft Outlook) and Remember my choice. Then the next time they try to send an email, the get a warning "This email will be sent using "Default email application (Microsoft Outlook)". Click on 'Change Preferences' to change your default account settings. They have to Click Do not Show this message again, and then continue. (actually I have a couple of users that have to go through this process Every time they sign on to the remote desktop server),
I downloaded the group policy adm pack and I can not find any settings to default this for a user.
Is there any group policy settings or a registry entry I can make on the remote desktop server to default these settings?
Thank you in advanceDistiller is a different product. The prefs should go under Adobe Acrobat.
BTW, are you familiar with the Admin Guide and the Pref Ref? Acrobat-Reader Enterprise Toolkit Home
Examples:
[HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert]
[HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert\cCheckbox]
"iDigSigSaveAsCertified"=dword:00000001
"iAppDoNotTakePDFOwnershipAtLaunch"=dword:00000001
"iavARMNoAutoUpdateWarning"=dword:00000002
"iDontShowWarn"=dword:00000000
"iSendMailDefaultAccountAlert"=dword:00000001
[HKEY_CURRENT_USER\Software\Adobe\Adobe Acrobat\11.0\AVAlert\cCheckbox\cAnnots]
"iEmailCollisionConfirm"=dword:00000001
"iSharedReviewConfirm"=dword:00000001
"iSendForReviewConfirm"=dword:00000001 -
Error opening PDF file when send as attachment via email
Hi,
I searched around the forum to resolve my issue and there's alot of post that is related but i can't find any answer to my issues.
Here's the scenario :-
I try to convert the smartform to PDF and then send the PDF as an attachment via email.
After converting the smartform to PDF, i managed to download the file and view it without any problem but i can't view the PDF as an attachment. It has the following error :-
Adobe Reader could not open '4500002325.PDF' because it is either not a supported fle type or because the file has been damaged (for example, it was sent as an email and wasn't correctly decoded
The following is the snapshot of my code:-
* Determine smartform function module for invoice
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lf_formname
IMPORTING
fm_name = lf_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
* error handling
ent_retco = sy-subrc.
PERFORM protocol_update_i.
ENDIF.
ls_control_param-getotf = 'X'.
CALL FUNCTION lf_fm_name
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = ls_control_param
mail_recipient = ls_recipient
mail_sender = ls_sender
output_options = ls_composer_param
zxekko = l_doc-xekko " user_settings = ' '
zxpekko = l_doc-xpekko
IMPORTING
document_output_info = l_ssfcrespd
job_output_info = l_ssfcrescl
job_output_options = l_ssfcresop
TABLES
l_xekpo = l_doc-xekpo[]
l_xekpa = l_doc-xekpa[]
l_xpekpo = l_doc-xpekpo[]
l_xeket = l_doc-xeket[]
l_xtkomv = l_doc-xtkomv[]
l_xekkn = l_doc-xekkn[]
l_xekek = l_doc-xekek[]
l_xkomk = l_xkomk
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc = 0.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
IMPORTING
BIN_FILESIZE = v_len_in
BIN_FILE = v_bin_file
TABLES
OTF = l_ssfcrescl-otfdata
LINES = l_pdf
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5.
* email subject
CONCATENATE 'Purchase order' l_doc-xekko-ebeln INTO lw_subject
SEPARATED BY space.
* RECIPIENTS
lwa_recipients-rec_type = 'U'.
lwa_recipients-express = 'X'.
SELECT adr6~smtp_addr
INTO TABLE gv_smtp_addr
FROM ekko AS ekko INNER JOIN
lfa1 AS lfa1 ON ekko~lifnr = lfa1~lifnr INNER JOIN
adr6 AS adr6 ON adr6~addrnumber = lfa1~adrnr
WHERE ekko~ebeln = l_doc-xekko-ebeln.
IF NOT gv_smtp_addr[] IS INITIAL.
LOOP AT gv_smtp_addr INTO gv_smtp_addr_line FROM 2.
lwa_recipients-receiver = gv_smtp_addr_line.
lwa_recipients-copy = ''.
APPEND lwa_recipients TO ptb_recipients.
ENDLOOP.
* Text Data
CALL FUNCTION 'READ_TEXT'
EXPORTING
id = 'ST'
language = 'E'
name = 'TEST'
object = 'TEXT'
TABLES
lines = lv_lines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
LOOP AT lv_lines INTO lv_lines_line.
ltb_objtxt = lv_lines_line-tdline.
APPEND ltb_objtxt.
ENDLOOP.
DESCRIBE TABLE ltb_objtxt LINES lw_tab_lines.
READ TABLE ltb_objtxt INDEX lw_tab_lines.
* document data contains information for the whole message
lwa_doc_chng-obj_descr = 'ABAPlist'.
* Control Data
lwa_doc_chng-obj_name = 'TESTING'.
lwa_doc_chng-sensitivty = 'F'.
lwa_doc_chng-no_change = 'X'.
lwa_doc_chng-priority = '1'.
lwa_doc_chng-obj_prio = '1'.
lwa_doc_chng-obj_langu = sy-langu.
CLEAR ltb_objpack-transf_bin.
*Attachment
*Move the binary attachment to other internal table.
ltb_objpack-head_start = 1.
ltb_objpack-head_num = 0.
ltb_objpack-body_start = 1.
ltb_objpack-body_num = lw_tab_lines.
ltb_objpack-doc_type = 'RAW'.
APPEND ltb_objpack.
clear : lw_tab_lines.
*Get the number of lines in the Attachment (PDF FILE)
* DESCRIBE TABLE it_mess_att LINES lw_tab_lines.
DESCRIBE TABLE l_objbin lines lw_tab_lines.
ltb_objpack-transf_bin = 'X'.
ltb_objpack-head_start = 1.
ltb_objpack-head_num = 1.
ltb_objpack-body_start = 1.
ltb_objpack-body_num = lw_tab_lines.
ltb_objpack-doc_type = 'PDF'.
ltb_objpack-obj_descr = l_doc-xekko-ebeln.
ltb_objpack-doc_size = lw_tab_lines * 255.
APPEND ltb_objpack.
*Email Subject
lwa_doc_chng-obj_descr = lw_subject.
lwa_recipients-receiver = recipeint.
lwa_recipients-rec_type = 'U'.
lwa_recipients-copy = 'X'.
lwa_recipients-express = 'X'.
APPEND lwa_recipients TO ptb_recipients.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
COMMIT_WORK = 'X'
TABLES
packing_list = ltb_objpack
contents_bin = l_objbin
contents_txt = ltb_objtxt
receivers = ptb_recipients.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDIF.
Edited by: ~loObie on Apr 23, 2010 12:01 PM
Edited by: ~loObie on Apr 23, 2010 12:02 PMDid you send the pdf in the following format ...
2. Sending PDF as mail.
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = sy-uname.
t_receivers-rec_type = 'B'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
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.
Quote from the Following [LINK|http://www.sap-basis-abap.com/smartforms/convert-the-smart-form-into-pdf-and-send.htm] -
HT5361 how do I send a pdf so that it is already "open" (not an icon) in an email
How do I send a pdf in an email message so that it is already "open" (not an icon that has to be opened)?
If you are using Apple's Mail, right click or control click on the icon of the attachment and from the drop-down menu select 'View in place'.
-
Can anyone tell me how to send a PDF file so that it opens up in the body of the email itself? Thanks
That is a function of the recipient's e-mail software understanding what your software sent. If it doesn't it will always show as an icon or attachment. It is also a function of both your internet provider and their internet provider accepting messages of that size, and a function of their download attachment settings in their e-mail program. There is no way to guarantee it will appear inline in the attachment. The best you can do is attach with Windows Friendly format. To do that, use the attach toolbar icon that looks like a paperclip, (View menu -> Customize toolbar if invisible) on Mac OS X Mail when composing the message. A checkbox appears in the file dialog box's bottom to make it Windows friendly when you navigate to pick the PDF file. That makes it as universally compatible as possible. It still may not appear inline, but at least you are less likely to be incompatible.
-
When I send a pdf as an attachment from my windows pc to the ipad via outlook mail there are occasions when the pdf is open on the email and not as an attachment which means I cannot store this on ibooks, any suggestions.
If the document is already open then, if you touch and hold in the body of the document, you will be given a set of options. One of these is to "Open in iBooks".
-
Error opening the PDF file while sending the PDF as an attachment
Hi All,
I am sending a PDF as an attachment in the mail. I am using the code pasted on 'Jul 28, 2006 8:59 AM' subject OTF Format of Purchase Order in email unreadable.
My problem is when I open the attachment in SOST or in the mail, I get the error message "Adobe could not open *.PDF because it is either not a supported file type or because the file type has been corrupted."
Please let me know if anybody has faced such an issue.
The code is found below.
FORM MAIL_OBJECT *
This routine receives OTF data. OTF data is converted to PDF
format and send to the Partner's email address
FORM mail_object TABLES otf_data STRUCTURE itcoo .
DATA: pdf_size TYPE i, " PDF Size
pdf_itab_size TYPE i, " Attachment size
mailtxt_size TYPE i, " Text in mail size
l_vbeln LIKE vbdka-vbeln. " Order Doc
DATA:
it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE, " Mail Text
it_pdf TYPE TABLE OF tline WITH HEADER LINE, " OTF output
it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
it_mailhead LIKE solisti1 OCCURS 1 WITH HEADER LINE," Header data
it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE, " Rec List
it_pdfdata LIKE solix OCCURS 0 WITH HEADER LINE. " Attachment data
DATA: it_doc_att LIKE sodocchgi1. " Attri of new doc
DATA: BEGIN OF it_pdfout OCCURS 0, " PDF in 255 length
tline TYPE char255,
END OF it_pdfout.
Sales doc and Customer
DATA: BEGIN OF i_vbeln OCCURS 0,
vbeln LIKE vbpa-vbeln, " Sales Document
adrnr LIKE vbpa-adrnr, " Customer
END OF i_vbeln.
Sender Address no and SMTP address
DATA: BEGIN OF i_addrs OCCURS 0,
addrnumber LIKE adr6-smtp_addr,
smtp_addr LIKE adr6-smtp_addr,
END OF i_addrs.
Convert OTF to PDF
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
IMPORTING
bin_filesize = pdf_size
TABLES
otf = otf_data
lines = it_pdf.
Make each line 255 characters
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
TABLES
content_in = it_pdf
content_out = it_pdfout.
Create the PDF File
CLEAR it_pdfdata.
REFRESH it_pdfdata.
it_pdfdata[] = it_pdfout[].
LOOP AT it_pdfout.
MOVE it_pdfout-tline TO it_pdfdata-line.
APPEND it_pdfdata.
CLEAR it_pdfdata.
ENDLOOP.
DESCRIBE TABLE it_pdfdata LINES pdf_itab_size.
Text in the mail.
it_mailtxt-line = 'ORDER ACKNOWLEDGEMENT'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--1'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--2' &
' This is a test mail, Line Number--2'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3' &
' This is a test mail, Line Number--3'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4' &
' This is a test mail, Line Number--4'.
APPEND it_mailtxt.
it_mailtxt-line = ' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5' &
' This is a test mail, Line Number--5'.
APPEND it_mailtxt.
DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
Document Number for Output
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
input = vbdka-vbeln
IMPORTING
output = l_vbeln.
Attributes of new doc
CONCATENATE 'Order' space 'Acknowledgement' space l_vbeln
INTO it_doc_att-obj_descr SEPARATED BY space.
it_doc_att-sensitivty = 'F'.
it_doc_att-doc_size = mailtxt_size * 255.
Create Pack to text in mail body.
CLEAR it_mailpack-transf_bin.
it_mailpack-head_start = 1.
it_mailpack-head_num = 0.
it_mailpack-body_start = 1.
it_mailpack-body_num = mailtxt_size.
it_mailpack-doc_type = 'RAW'.
APPEND it_mailpack.
Create Pack to PDF Attach.
it_mailpack-transf_bin = 'X'.
it_mailpack-head_start = 1.
it_mailpack-head_num = 1.
it_mailpack-body_start = 1.
it_mailpack-body_num = pdf_itab_size.
it_mailpack-doc_type = 'PDF'.
CONCATENATE l_vbeln '.pdf' INTO it_mailpack-obj_name.
CONCATENATE 'Order Ack' space l_vbeln INTO it_mailpack-obj_descr.
it_mailpack-doc_size = pdf_itab_size * 255.
APPEND it_mailpack.
*Get email addresses based on Sales document.
SELECT vbeln adrnr INTO TABLE i_vbeln
FROM vbpa
WHERE vbeln = vbdka-vbeln AND
parvw = nast-parvw.
IF NOT i_vbeln[] IS INITIAL.
SELECT addrnumber smtp_addr INTO TABLE i_addrs
FROM adr6 FOR ALL ENTRIES IN i_vbeln
WHERE addrnumber = i_vbeln-adrnr AND
smtp_addr NE space.
ENDIF.
IF i_addrs[] IS NOT INITIAL.
LOOP AT i_addrs.
it_reclist-receiver = i_addrs-smtp_addr.
it_reclist-express = 'X'.
it_reclist-rec_type = 'U'.
it_reclist-notif_del = 'X'. " request delivery notification
it_reclist-notif_ndel = 'X'. " request not delivered notification
APPEND it_reclist.
CLEAR: i_addrs.
ENDLOOP.
ENDIF.
Call FM to send email
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = it_doc_att
put_in_outbox = 'X'
TABLES
packing_list = it_mailpack
object_header = it_mailhead
contents_txt = it_mailtxt
contents_hex = it_pdfdata
receivers = it_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorizationfiltered= 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. " MAIL_OBJECT
Regards,
AjithHi Ajith !!
Please refer this link :
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Here a spool output is converted into PDF and then sent as an email.
I think instead of using FM to change the width, try the logic mentioned in the link.
Also instead of FM CONVERT_TO_OTF use :
1. CONVERT_OTFSPOOLJOB_2_PDF
I hope this should solve the problem.
I had referred the same program from the link and it worked absolutely fine. Also check the adobe acrobat version, i guess old version doesnt support SAP, though not very sure.
Best regards,
Prashant -
How Can I Disallow Sending a PDF Document via Email?
http://www.tek-tips.com/viewthread.cfm?qid=1528701&page=1
nha khoa.com/showthread.php?t=145
I'm using Adobe Acrobat 8 Standard.
I've gotten the test document setup in such a way that at least the typical person could not print it, send it as an email attachment, nor save the file within Adobe Reader 8.
However, if that same person were to open the file with Foxit PDF reader, they could email it as an attachment (though they can't do the others).
What I want to know is if there is a way to specifically disallow a pdf file from being sent as an attachment from within the pdf application? For Adobe, I just had to check the box next to "hide menu bar" and "hide tool bars", but leave "hide window controls" unchecked.
But of course, Foxit reader, and I'd imagine others, don't recognize the code for the display defaults. So for those, I'd need something else. I did not see an option under security for disabling email. Is there any way to do so?
The PDF files will be shared via a SharePoint site. So if there is some other better way of locking them down via SharePoint, that'd be fine as well.
I'll post more detail if need be. Thanks for any suggestions.
"If to err is human, then I must be some kind of human!" -MeThere's no way to prevent someone attaching a PDF to an email (or any other file-level operation on it) - to view a PDF it MUST be downloaded to the client's computer, and once there it's a regular file just like any other. There is no "streaming" concept within PDF.
You can secure the PDF so only certain people can open it (for example using certificate policies or even DRM) but they can still move the file about - it's only at the stage of opening it where the security control starts.
And you're correct - non-DRM 'permissions' security on a PDF is largely just smoke and mirrors for anyone who can open the file, as removing your print/edit/display preferences is a 10-second job. The only real case of a PDF being "uncrackable" is if the document has a very long OPEN password and the user doesn't know what it is. If they can get as far as seeing the pages on their screen, they can do pretty much anything with it. -
Unable to send PDFs as email attachments
I have become unable to send PDFs as email attachments when using Firefox.
Depending on the PDF, I either get the message “There was an error opening this document. The file is damaged and could not be repaired.” or it opens as a blank document. This occus when opening the file with both Adobe Reader and Acrobat Pro. The problem seems to be isolated to PDFs. (I am able to send Word files. If a PDF is zipped before attaching, it can be opened without problem.) This occurs on both an institutional email account and personal (Yahoo) email account. This problem is isolated to Firefox (does not happen in Chrome).
I have reset Firefox to default settings, as well as reinstalling.
Thank you.Update Adobe® Acrobat® Plug-in for Web Browsers, Version 10.1.13 to version 11.
Also please update all of your plugins and try again.
Does this happen when you open the pdf in pdf.js, it is possible to change the default viewer by:
* [[How to disable the built-in PDF viewer and use another viewer]] -
Problem sending .pdf with email in ECC 6.0
hi there,
we are upgrading from r/3 4.6.c to ECC 6.0.
i have the following problem: in many z-ababs we convert spool-files to pdf-files and send them with function SO_NEW_DOCUMENT_ATT_SEND_API1 via email.
well, this is working okay, BUT: the ending '.pdf' is missing in the filename:
in R/3 4.6.c it looks like the following:
zfl_reporting.pdf
Now it looks like this:
zfl_reporting
So the file is not recognized as pdf-file. You have to add a .pdf manually to open it.
We can't do this as we send the pdf-files thousands of times to our customers.
Any ideas ?
reg, Martinhi
Posted below is the sample code..
find the bolded ones...
REPORT ZMAIL_PDF NO STANDARD PAGE HEADING.
Data for mailing purpose
DATA: OBJPACK LIKE SOPCKLSTI1 OCCURS 2 WITH HEADER LINE.
DATA: OBJHEAD LIKE SOLISTI1 OCCURS 1 WITH HEADER LINE.
DATA: OBJBIN LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: OBJTXT LIKE SOLISTI1 OCCURS 10 WITH HEADER LINE.
DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
DATA: DOC_CHNG LIKE SODOCCHGI1.
DATA: TAB_LINES LIKE SY-TABIX.
Spool table
TABLES : TSP01.
Data required for creating spool
DATA: MSTR_PRINT_PARMS LIKE PRI_PARAMS VALUE 'LP01',
MC_VALID(1),
MI_BYTECOUNT TYPE I,
MI_LENGTH TYPE I,
MI_RQIDENT LIKE TSP01-RQIDENT,
REP LIKE PRI_PARAMS-PLIST.
Internal table for capturing data into PDF format
DATA: MTAB_PDF LIKE TLINE OCCURS 0 WITH HEADER LINE.
File name
DATA : MC_FILENAME LIKE RLGRAP-FILENAME.
SELECTION SCREEN
PARAMETERS : P_REPID LIKE SY-REPID,
P_LINSZ LIKE SY-LINSZ DEFAULT 132,
P_PAART LIKE SY-PAART DEFAULT 'X_65_132'.
START-OF-SELECTION.
<b> CONCATENATE 'C:\'
P_REPID
'.PDF'
INTO MC_FILENAME.</b>
MOVE SY-REPID TO REP.
Get print parameters
PERFORM GET_PRINT_PARAMS.
Send output of the required program to Spool
SUBMIT (P_REPID) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS MSTR_PRINT_PARMS
VIA SELECTION-SCREEN AND RETURN.
Get the the spool number that is just created
PERFORM GET_SPOOL_NUMBER USING SY-REPID SY-UNAME
CHANGING MI_RQIDENT.
Convert Spool to PDF & download the same
PERFORM SPOOL_2_PDF.
Upload downloaded PDF file for mailing
PERFORM UPLOAD_PDF_FILE.
Send mail with PDF attachment
PERFORM SEND_MAIL.
FORM get_spool_number *
Get the most recent spool created by user/report *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid
f_uname
into lc_rq2name separated by '_'.
select * from tsp01 where rq2name = sy-repid
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
*& Form send_mail
text
--> p1 text
<-- p2 text
form send_mail.
Creation of the document to be sent
DOC_CHNG-OBJ_NAME = 'TEST'.
DOC_CHNG-OBJ_DESCR = 'TEST MAIL WITH PDF ATTACHMENT'. "mail subject
OBJTXT = 'Test mail with PDF attachment'.
APPEND OBJTXT.
CLEAR OBJTXT.
APPEND OBJTXT.
APPEND OBJTXT.
OBJTXT = 'Please double click the attachment to verify'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Creation of the entry for the compressed document
CLEAR OBJPACK-TRANSF_BIN.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
OBJHEAD = 'Sample PDF attachement'. "
APPEND OBJHEAD.
Creation of the entry for the compressed attachment
OBJPACK-TRANSF_BIN = 'X'.
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 1.
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
<b> OBJPACK-DOC_TYPE = 'PDF'.</b>
OBJPACK-OBJ_NAME = 'TEST'.
OBJPACK-OBJ_DESCR = 'Test.PDF'.
OBJPACK-DOC_SIZE = TAB_LINES * 255.
APPEND OBJPACK.
Completing the recipient list
For sending mail to Internet Address
RECLIST-RECEIVER = '[email protected].
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
CASE SY-SUBRC.
WHEN 0.
WRITE :/ 'MAIL SENT....'.
WHEN 1.
WRITE :/ 'TOO MANY RECEIVERS'.
WHEN 2.
WRITE :/ 'DOCUMENT NOT SENT'.
WHEN 4.
WRITE :/ 'NO SEND AUTHORIZATION'.
WHEN OTHERS.
WRITE :/ 'ERROR OCCURED WHILE SENDING MAIL'.
ENDCASE.
endform. " send_mail
*& Form GET_PRINT_PARAMS
FORM GET_PRINT_PARAMS.
call function 'GET_PRINT_PARAMETERS'
exporting destination = 'LP01'
copies = 1
list_name = rep
list_text = 'LIST ..... TO SAP-SPOOL'
immediately = 'X'
release = 'X'
new_list_id = 'X'
expiration = 1
line_size = 132
line_count = 65
layout = 'X_PAPER'
sap_cover_page = 'X'
cover_page = 'X'
receiver = sy-uname
department = 'System'
no_dialog = 'X'
importing out_parameters = mstr_print_parms
valid = mc_valid.
ENDFORM. " GET_PRINT_PARAMS
*& Form SPOOL_2_PDF
FORM SPOOL_2_PDF.
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
exceptions
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
others = 12.
call function 'WS_DOWNLOAD'
exporting
bin_filesize = mi_bytecount
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = mtab_pdf
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. " SPOOL_2_PDF
*& Form UPLOAD_PDF_FILE
FORM UPLOAD_PDF_FILE.
call function 'WS_UPLOAD'
exporting
<b> filename = mc_filename</b>
filetype = 'BIN'
tables
data_tab = OBJBIN
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. " UPLOAD_PDF_FILE
**reward if helpful
regards,
madhumitha
Maybe you are looking for
-
User-Exit or BADI for creating TO using TR in WM
Dear Experts, I am preparing Transfer Order using Transfer Request through transaction code LT04. Now when I am doing Putaway (either background or foreground), system itself evaluates and suggests destination bins as per SAP standard logic. For me t
-
Can't install Lightroom 5.7 on Mac
I have Lightroom on both Mac and PC. The upgrade to 5.7 from 5.6 worked fine on PC but not on Mac. When I get a popup or go to upgrade on the help menu, I click on upgrade but the link takes me to a 5.6 download which I already have installed.
-
SAN Port-Channel between Nexus 5000 and Brocade 5100
I have a Nexus 5000 running in NPV mode connected to a Brocade 5100 FC switch using two FC ports on a native FC module in the Nexus 5000. I would like to configure these two physical links as one logical link using a SAN Port-Channel/ISL-Trunk. An IS
-
Just realized that I can't turn off Bluetooth on my iBook. If I go to the menu bar, the "Turn Bluetooth Off" item is dimmed. The "Turn Bluetooth Off" button in System Preference is also dimmed. What's going on here? Can anyone help me out?
-
Is this a dice or is it just Gibberish?
I know this post must appear often, but im working on a school project and wanted to see if this Die i made will work in the boardgame i'm sapposed to create: import java.util.Random; public class Die private int faceValue; private int side