Preview 6.0, no send file as email attachment?
Does anyone know where they put the send file command? I need to email pdfs from Preview all the time.
There used to be a "send file as email attachment" command under the edit menu. It's gone. Anyone have any suggestions?
Handsomfreddy wrote:
Sorry, I dont understand what you are referring to. Can you calify please "undo the changes."
Thanks,
Andy
Didn't you just post this (below)
Handsomfreddy wrote:
Very bizarrely Parallels had changed this Mail Preference to some weird Windows program [Disk Clean up or something equally random] thus preventing me from emailing anything from any program.
That's the change I am referring to.
Similar Messages
-
Send file as email attachment not working
any help would be greatly appreciated...
When I click "send file as email attachment" it will open outlook with the PDF attached but when I click send on the email, the email closes like it is sent but never actually gets sent (nothing in sent items and recipient never gets the email)
Adobe Acrobat 11 Pro (Creative Cloud Suite installed)
Outlook 2013Hi sandyw26405588,
Could you please try sending PDF as email attachment via another email apart from Outlook.
Are you able to send the file successfully?
Also, go under 'Help> Check for Updates' and ensure if you are using the latest version of Acrobat XI i.e. 11.0.10
Have you tried sending any other PDF via Outlook?
Let me know.
Regards,
Anubha -
OSB - send file in email attachment in SOAP attachment
Hi!
I would like to send a file in email in SOAP attachment.
I thought it would be a simple task, I will create a proxy service, which calls a business service. There is a routing action in proxy service to business service and after the rouiting there is a replace action, I replace the attachments variable with this:
<con:attachment xmlns:con="http://www.bea.com/wli/sb/context">
<con:Content-Type>application/pdf</con:Content-Type>
<con:Content-Transfer-Encoding>base64</con:Content-Transfer-Encoding>
<con:Content-Disposition>attachment; filename="Simple.pdf"</con:Content-Disposition>
<con:body>{$attachments/ctx:attachment/ctx:body}</con:body>
</con:attachment>
I received the email, but i cannot open the document, because it is corrupted...
Please, could someone help me?
I can't find out the solution.
Thanks!
ViktorHi Anuj!
Thanks for your answer again! :)
I tried the blog and I could send email with attachment. My problem is that I have to put the file content into the webservice body when i call the proxy service as a webservice. But I want to put the file into the SOAP attachment. So this is my scenario:
1. the service counsumer calls the proxy service webservice and the service consumer (client) put the file into the request SOAP attachment
2. the proxy service calls the business service
3. the business service sends the email with an attachment (and the file is into this attachment)
Could You help me?
Thanks! -
hey all
is it possible to send files thru email using a java program??? i tried using Runtime..... and executing outlook...but i could not figure out how to give filename and reciever's name at the command prompt...can anybody help me in this???
thanx in advance
bharthiThis is a good tutorial for javamail:
http://developer.java.sun.com/developer/onlineTraining/JavaMail/
The part about sending attachments is:
http://developer.java.sun.com/developer/onlineTraining/JavaMail/contents.html#SendingAttachments -
After update the Adobe I can't send files by email
Hi,
Thanks for writing to us . Do you see some error while sending files by email ? Please share the screenshot of error you see.
Thanks ,
Shefali -
I have a program which will generate a text file. Now, I would like send the file to an external email. How can I do that. Thanks!
Hi,
See the below code:
*& Report ZATTACH *
REPORT ZATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT <youremailaddress>.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
* Retrieve sample data from table ekpo
PERFORM data_retrieval.
* Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
* Populate message body text
perform populate_email_message_body.
* Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .xls documnet attachment'
'XLS'
'filename'
changing gd_error
gd_reciever.
* Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
* Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_XLS_DATA_TABLE
* Build data table for .xls document
FORM build_xls_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
*class cl_abap_char_utilities definition load.
*constants:
* con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
* con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
* Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
* Fill the document data.
w_doc_data-doc_size = 1.
* Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
* Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
* Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
* Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
* Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
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.
* Populate zerror return code
ld_error = sy-subrc.
* Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
* Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
* Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform.
" POPULATE_EMAIL_MESSAGE_BODY
Reward points if this helps,
Kiran -
How to convert sap script to pdf and send it as email attachment
hi,
my requirement is to convert a standard sales order form to pdf and send it as email attachment. get me some sample code for the same
thanks in advanceHi
See this sample code and after that use the fun module to send the mail
SO_NEW_DOCUMENT_ATT_SEND_API1
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
If you r using this function module check it once....
call function 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
others = 4.
Fehlerhandling
if sy-subrc <> 0.
endif.
or u can use the standard program RSTXPDFT4 to download the script into PDF format onto a particular location
follow this link for sample program.
http://searchsap.techtarget.com/tip/0,289483,sid21_gci1121833,00.html
check...
How to send smart form via email
/people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp
Regards
Anji -
Sending excel as email attachment
Hi All,
I am getting truncated with the header only upto 255 char length , and the field contents are ok more than 255 length it s taking.
I am using it_attach type standard table of solisti1 with header line.
the report code is given below
**& Report ZPBILL_INT1 **
REPORT zpbill_int1 .
*Declaration of type-pools.
TYPE-POOLS slis.
D A T A **
TABLES: zbill_inphdr,
zbill_inpdtl.
TYPES: BEGIN OF t_zbill_ipdtl,
cusnr TYPE zbill_inpdtl-cusnr,
svsnr TYPE zbill_inpdtl-svsnr,
revnr TYPE zbill_inpdtl-revnr,
sysnr TYPE zbill_inpdtl-sysnr,
sdate TYPE zbill_inpdtl-sdate,
filnm TYPE zbill_inpdtl-filnm,
zlsch TYPE zbill_inpdtl-zlsch,
clrfe TYPE zbill_inpdtl-clrfe,
revds TYPE zbill_inpdtl-revds,
prind TYPE zbill_inpdtl-prind,
svsds TYPE zbill_inpdtl-svsds,
quant TYPE zbill_inpdtl-quant,
adate TYPE zbill_inpdtl-adate,
trdat TYPE zbill_inpdtl-trdat,
mdate TYPE zbill_inpdtl-mdate,
trdval type zbill_inpdtl-trdval,*
exrate TYPE zbill_inpdtl-exrate,
birate TYPE zbill_inpdtl-birate,
cusds1 TYPE zbill_inpdtl-cusds1,
cusds2 TYPE zbill_inpdtl-cusds2,
cusstr TYPE zbill_inpdtl-cusstr,
cuspc TYPE zbill_inpdtl-cuspc,
cuscity TYPE zbill_inpdtl-cuscity,
cusctry TYPE zbill_inpdtl-cusctry ,
rect TYPE zbill_inpdtl-rect,
invno TYPE zbill_inpdtl-invno,
ldate TYPE zbill_inpdtl-ldate,
conty TYPE zbill_inpdtl-conty,
edate TYPE zbill_inpdtl-edate,
custa TYPE zbill_inpdtl-custa,
currc TYPE zbill_inpdtl-currc,
warrt TYPE zbill_inpdtl-warrt,
indrp TYPE zbill_inpdtl-indrp,
textc TYPE zbill_inpdtl-textc,
gstr TYPE zbill_inpdtl-gstr,
clrds TYPE zbill_inpdtl-clrds,
commty TYPE zbill_inpdtl-commty,
commyr TYPE zbill_inpdtl-commyr,
commmt TYPE zbill_inpdtl-commmt,
commop TYPE zbill_inpdtl-commop,
eposdoc TYPE zbill_inpdtl-eposdoc,
custp TYPE zbill_inpdtl-custp,
END OF t_zbill_ipdtl.
DATA: it_zbill TYPE STANDARD TABLE OF t_zbill_ipdtl
INITIAL SIZE 0.
ALV Data declaration.*
DATA : v_repid LIKE sy-repid.
ALV Function Module Variables*
DATA: gs_layout TYPE slis_layout_alv,
g_exit_caused_by_caller,
gs_exit_caused_by_user TYPE slis_exit_by_user.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv,
gs_print TYPE slis_print_alv,
gt_events TYPE slis_t_event,
gt_list_top_of_page TYPE slis_t_listheader,
g_status_set TYPE slis_formname VALUE 'PF_STATUS_SET',
g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
g_top_of_page TYPE slis_formname VALUE 'TOP_OF_PAGE',
g_top_of_list TYPE slis_formname VALUE 'TOP_OF_LIST',
g_end_of_list TYPE slis_formname VALUE 'END_OF_LIST',
g_variant LIKE disvariant,
g_save(1) TYPE c,
g_tabname_header TYPE slis_tabname,
g_tabname_item TYPE slis_tabname,
g_exit(1) TYPE c,
gx_variant LIKE disvariant.
DATA : gr_layout_bck TYPE slis_layout_alv.
DATA : wa_zbill TYPE t_zbill_ipdtl.
*Email related declarations
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
*DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
*WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF SOMLRECI1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
*t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*DATA IT_HEADER TYPE STANDARD TABLE OF SOLIX INITIAL SIZE 0 WITH
*HEADER LINE.
*data : begin of it_header occurs 0,
header(1023) type C,*
end of it_header.*
S E L E C T I O N S **
SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
SELECT-OPTIONS: s_cusnr FOR zbill_inpdtl-cusnr,
s_svsnr FOR zbill_inpdtl-svsnr,
s_revnr FOR zbill_inpdtl-revnr,
s_sysnr FOR zbill_inpdtl-sysnr,
s_sdate FOR zbill_inpdtl-sdate,
s_filnm FOR zbill_inpdtl-filnm,
s_prind for zbill_inpdtl-prind.
PARAMETERS: p_test AS CHECKBOX,
p_email AS CHECKBOX.
SELECTION-SCREEN END OF BLOCK b01.
*PARAMETERS: p_email TYPE somlreci1-receiver
Initialization **
INITIALIZATION.
v_repid = sy-repid.
start-of-selection **
START-OF-SELECTION.
PERFORM data_retrieval.
IF p_test = '' AND P_EMAIL = ''.
MESSAGE S038(ZMBILLING).
ELSEIF P_TEST = 'X'.
display the data in the form of ALV*
PERFORM display_data.
ELSEIF P_EMAIL = 'X'.
*Populate table with detaisl to be entered into .xls file
PERFORM build_xls_data_table.
*Populate message body text
PERFORM populate_email_message_body.
*Send file by email as .xls speadsheet
PERFORM send_file_as_email_attachment
TABLES it_message it_attach USING p_email
'Billing Details list'
'XLS'
'filename'
CHANGING gd_error
gd_reciever.
*Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
ENDIF.
*& Form data_retrieval
text*
FORM data_retrieval.
SELECT revnr sysnr sdate filnm cusnr
svsnr zlsch clrfe revds prind svsds
quant adate trdat mdate exrate
birate cusds1 cusds2 cusstr
cuspc cuscity cusctry rect
invno ldate conty edate custa
currc warrt indrp textc
gstr clrds commty commyr commmt
commop eposdoc custp
INTO CORRESPONDING FIELDS OF TABLE it_zbill FROM zbill_inpdtl
WHERE cusnr IN s_cusnr
AND svsnr IN s_svsnr
AND revnr IN s_revnr
AND sysnr IN s_sysnr
AND sdate IN s_sdate
AND filnm IN s_filnm
and prind in s_prind.
ENDFORM. " DATA_RETRIEVAL
**& Form build_xls_data_table
text*
FORM build_xls_data_table.
DATA: ld_store(50) TYPE c. "Leading zeros
DATA: wa_zbill-quant(20),
wa_zbill-custa(20),
wa_zbill-gstr(20).
wa_zbill-mxamt(20).*
*If you have Unicode check active in program attributes thnen you will
*need to declare constants as follows
CLASS cl_abap_char_utilities DEFINITION LOAD.
CONSTANTS:
con_tab TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_cret TYPE c VALUE cl_abap_char_utilities=>cr_lf.
CONCATENATE 'Customer code' 'Service Number' 'Revenue Type' 'Source
System Code' 'Date Source' 'File Name' 'Payment Code' 'Single Char Flag'
'Revenue Description' 'Processing Indicator' 'Service Description'
'Order Quantity' 'Date of Adustment' 'Trade Date' 'Mos Date'
'ExchangeRate' 'Billing Rate' 'Customer Name1' 'Customer name2'
'Customer adress' 'Customer postalcode' 'Customer city'
'Customer country' 'Billing amt without GST' 'GST Payable'
'Receipt number' 'Invoice Number' 'Listing Period'
'Contract Type' 'Entry date' 'Custody Code' 'Currency Code'
'Name of Warrant' 'Rights issue' 'No Of copies'
'GST Rate' 'Clearing Fee' 'Commodity type'
'Commodity year' 'Commodity month' 'Commodity Option Tpye'
'Quantity Transacted' 'Amendment Quantity' 'EPOS DOC type'
'Customer Type'
INTO IT_ATTACH SEPARATED BY con_tab.
CONCATENATE con_cret IT_ATTACH INTO IT_ATTACH.
*CONCATENATE con_cret it_attach INTO it_attach.
APPEND it_attach.
LOOP AT it_zbill INTO wa_zbill.
CONCATENATE wa_zbill-cusnr wa_zbill-svsnr wa_zbill-revnr
wa_zbill-sysnr wa_zbill-sdate wa_zbill-filnm wa_zbill-zlsch
wa_zbill-clrfe wa_zbill-revds wa_zbill-prind wa_zbill-svsds
wa_zbill-quant wa_zbill-adate wa_zbill-trdat wa_zbill-mdate
wa_zbill-exrate wa_zbill-birate wa_zbill-cusds1 wa_zbill-cusds2
wa_zbill-cusstr wa_zbill-cuspc wa_zbill-cuscity wa_zbill-cusctry
wa_zbill-rect wa_zbill-invno wa_zbill-ldate wa_zbill-conty
wa_zbill-edate wa_zbill-custa wa_zbill-currc wa_zbill-warrt
wa_zbill-indrp wa_zbill-textc wa_zbill-gstr wa_zbill-clrds
wa_zbill-commty wa_zbill-commyr wa_zbill-commmt wa_zbill-commop
wa_zbill-eposdoc wa_zbill-custp
INTO it_attach SEPARATED BY con_tab.
CONCATENATE con_cret it_attach INTO it_attach.
it_header = it_attach .*
*append it_header.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_XLS_DATA_TABLE
***& Form SEND_FILE_AS_EMAIL_ATTACHMENT
FORM send_file_as_email_attachment TABLES pit_message
pit_attach
USING p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
CHANGING p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
*ld_sender_address = SY-UNAME.
ld_sender_address_type = 'SMTP'.*
*fill the document data.
w_doc_data-doc_size = 1.
*populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
*Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
*( w_cnt - 1 ) * 255 + STRLEN( it_attach ).*
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-OBJ_NAME = ld_attfilename.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment = it_attach.
t_attachment[] = it_attach[] .
t_attachment = it_header.*
t_attachment[] = it_header[] .*
*Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
*CREATE attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
*t_packing_list-doc_size = t_packing_list-body_num * 255.*
APPEND t_packing_list.
*Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.*
t_receivers-rec_type = 'U'.
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.
*Populate zerror return code
ld_error = sy-subrc.
*Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "build_xls_data_table
regards
subbaHi ,
i'm saying check the field doc_size, umcomment it .change 255--->1025 .
w_doc_data-doc_size =
**( w_cnt - 1 ) * 255 + STRLEN( it_attach ).**
**t_packing_list-doc_size = t_packing_list-body_num * 255.**
for more details , check the documentation.
regards
Prabhu -
Send page by email attaching to Lotus as a link instead of a pdf attachment
Acrobat reader in internet explorer - Send page by email attaching to Lotus as a link instead of a pdf attachment any ideas? was working fine yesterday. Ive reset the Internet explorer settings , cleared cashe, was gonna try to reinstall next
I don't think that Adobe Reader is involved in any of this; it looks like a purely IE functionality.
-
In earlier versions of Acrobat Reader there was a handy mail button that I could use to email the document open at that particular time. With the current version, that button does not appear to be there. Is there some other way of sending a file by email from within Acrobat?
Please try the steps mentioned at: http://support.microsoft.com/kb/813745 and check whether the issue is resolved or not.
If not, then try starting the outlook in safe mode using (Outlook.exe /safe) and check the issue again.
Hopefully, these will resolve your issue. -
Convert SMARTFORM report to PDF and send as an email attachment
Hi
I am using the CONVERT_OTF function module to convert a SMARTFORM report in the "spool" to a PDF file. When I use the DOWNLOAD function module, the resulting file can be opened in acrobat.
I would like to email the report in PDF format as an attachment. I am using the function module SO_NEW_DOCUMENT_ATT_SEND_API1 to create an attachment however the attached file is not being created correctly and When try to open, it gives 'File is damaged and could not be repaired' error message. I believe that somehow I am not using the SO_NEW_DOCUMENT_ATT_SEND_API1 function module correctly.
Please help me to correct this
Thanks
Rohitha
see my code below,
I_OTF[] = W_RETURN-OTFDATA[].
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
IMPORTING
BIN_FILESIZE = V_LEN_IN
TABLES
OTF = I_OTF
LINES = I_TLINE
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
IF SY-SUBRC <> 0.
ENDIF.
LOOP AT I_TLINE.
TRANSLATE I_TLINE USING '~'.
CONCATENATE WA_BUFFER I_TLINE INTO WA_BUFFER.
ENDLOOP.
TRANSLATE WA_BUFFER USING '~'.
DO.
I_RECORD = WA_BUFFER.
APPEND I_RECORD.
SHIFT WA_BUFFER LEFT BY 132 PLACES.
IF WA_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
REFRESH: I_RECLIST,
I_OBJTXT,
I_OBJBIN,
I_OBJPACK.
CLEAR WA_OBJHEAD.
I_OBJBIN[] = I_RECORD[].
I_OBJTXT = 'PDF Attachment'.
APPEND I_OBJTXT.
DESCRIBE TABLE I_OBJTXT LINES V_LINES_TXT.
READ TABLE I_OBJTXT INDEX V_LINES_TXT.
WA_DOC_CHNG-OBJ_NAME = 'Smartform_to_PDF'.
WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
WA_DOC_CHNG-OBJ_DESCR = 'Smartform to PDF'.
WA_DOC_CHNG-SENSITIVTY = 'F'.
WA_DOC_CHNG-DOC_SIZE = STRLEN( I_OBJTXT ) + ( ( V_LINES_TXT - 1 ) * 255 ) .
CLEAR I_OBJPACK-TRANSF_BIN.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 0.
I_OBJPACK-BODY_START = 1.
I_OBJPACK-BODY_NUM = V_LINES_TXT.
I_OBJPACK-DOC_TYPE = 'RAW'.
APPEND I_OBJPACK.
I_OBJPACK-TRANSF_BIN = 'X'.
I_OBJPACK-HEAD_START = 1.
I_OBJPACK-HEAD_NUM = 1.
I_OBJPACK-BODY_START = 1.
DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
READ TABLE I_OBJBIN INDEX V_LINES_BIN.
I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
I_OBJPACK-BODY_NUM = V_LINES_BIN.
I_OBJPACK-DOC_TYPE = 'PDF'.
I_OBJPACK-OBJ_NAME = 'ATTACHMENT'.
I_OBJPACK-OBJ_DESCR = 'test'.
APPEND I_OBJPACK.
CLEAR I_RECLIST.
I_RECLIST-RECEIVER = 'my email address u2019.
I_RECLIST-REC_TYPE = 'U'.
APPEND I_RECLIST.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = WA_DOC_CHNG
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = I_OBJPACK
OBJECT_HEADER = WA_OBJHEAD
CONTENTS_BIN = I_OBJBIN
CONTENTS_TXT = I_OBJTXT
RECEIVERS = I_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.
WRITE:/ 'Error ', SY-SUBRC.
ELSE.
WRITE:/ 'Mail sent'.
ENDIF.Hi rohitha.wijewardena ,
Please find the below code which i followed and succeed ,
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_country = lv_dlv-land
pi_addr_key = lv_addr_key
pi_repid = sy-repid
pi_screen = lc_x
IMPORTING
pe_returncode = gv_retcode
pe_itcpo = lv_itcpo
pe_device = lv_device
pe_recipient = lv_recipient
pe_sender = lv_sender.
IF gv_retcode = 0.
*moving the data to composer and control parameters for output
MOVE-CORRESPONDING lv_itcpo TO lv_composer_param.
lv_control_param-device = lv_device.
lv_control_param-no_dialog = lc_x.
lv_control_param-preview = lc_x.
lv_control_param-getotf = lv_itcpo-tdgetotf.
lv_control_param-langu = nast-spras.
lv_composer_param-tdnoprint = space.
ENDIF.
*Getting the Smartform Function module using Standard Function module
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = lv_formname "Smartform Name
IMPORTING
fm_name = lv_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3
IF sy-subrc <> 0.
gv_retcode = sy-subrc.
PERFORM protocol_update.
PERFORM add_smfrm_prot.
ENDIF.
**Smartform function module to get the output
CALL FUNCTION lv_fm_name
EXPORTING
control_parameters = lv_control_param
mail_recipient = lv_recipient
mail_sender = lv_sender
output_options = lv_composer_param
user_settings = ' '
is_bil_invoice = lv_bil_invoice
gt_header = gt_header
IMPORTING
job_output_info = gv_job_output
TABLES
gt_item = gt_item
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
gv_retcode = sy-subrc.
PERFORM protocol_update.
PERFORM add_smfrm_prot.
ENDIF.
IF nast-nacha = lc_mail.
gt_otfdata[] = gv_job_output-otfdata[].
* Converting Smartform to PDF *
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = lc_pdf
max_linewidth = 10
IMPORTING
bin_filesize = gv_binfilesize
bin_file = gv_pdf_xstring
TABLES
otf = gt_otfdata[]
lines = gt_pdftab[]
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Sending PDF to Email using Class *
IF NOT lv_email IS INITIAL .
TRY.
gv_send_request = cl_bcs=>create_persistent( ).
gv_pdf_content = cl_document_bcs=>xstring_to_solix( gv_pdf_xstring ).
gv_document = cl_document_bcs=>create_document(
i_type = lc_pdf
i_hex = gv_pdf_content
i_length = gv_pdf_size
i_subject = lc_subject ). "Subject for Email
gv_send_request->set_document( gv_document ).
gv_recipient = cl_cam_address_bcs=>create_internet_address( lv_email ).
gv_send_request->add_recipient( gv_recipient ).
gv_sent_to_all = gv_send_request->send( i_with_error_screen = lc_x ).
COMMIT WORK.
IF gv_sent_to_all IS INITIAL.
MESSAGE i500(sbcoms) WITH lv_email.
ELSE.
MESSAGE s022(so).
ENDIF.
CATCH cx_bcs INTO gv_bcs_exception.
MESSAGE i865(so) WITH gv_bcs_exception->error_type.
ENDTRY.
ENDIF. -
Dear Experts,
How to send pdf file as email atachment, can some one give me some codings or links.
Thanks and REgards,
Thirukumaran. RMailing is possible when i open the pdf file it's giving the decoding error
i here with attached the codings for ur ref.
FUNCTION Z_HRFM_SEND_OFFERLETTER_MAIL.
*"*"Local Interface:
*" IMPORTING
*" VALUE(IV_APPLID) TYPE PERSNO
*" VALUE(IV_REPMGR) TYPE PERSNO
*" VALUE(IV_CONTROLMGR) TYPE PERSNO
*" VALUE(IV_REPFMGR) TYPE PERSNO
*" VALUE(IV_ACTION) TYPE MASSN
*" VALUE(JOIN_1000) TYPE DATS
*" VALUE(POSITION_1000) TYPE STEXT
*" VALUE(PLACE_1000) TYPE ORT01
*" VALUE(LOC_1000) TYPE ORT01
*" VALUE(GROSS_1000) TYPE NUMC7
*" VALUE(BASIC_1000) TYPE NUMC5
*" VALUE(CONV_1000) TYPE NUMC5
*" VALUE(FOOD_1000) TYPE NUMC5
*" VALUE(VAR_1000) TYPE NUMC5
*" VALUE(PERNR1_1000) TYPE PERSNO
*" VALUE(COMP_ADD) TYPE CHAR200
*" EXCEPTIONS
*" APPLICANT_NOT_FOUND
*" REPFORM_MGR_NOT_FOUND
*" REPMGR_NOT_FOUND
*" CONTROLMGR_NOT_FOUND
*" NO_EMAILID_FOUND
*" SENT
*" NOT_SENT
*& CREATION INFORMATION *
*& AUTHOR : thiruKumaran
*& CREATION DATE : 29.07.2009 *
*& TRANSPORT REQUEST: *
*& FUNCTIONAL SPEC# : *
*& TECHNICAL SPEC# : *
*& PURPOSE :
* Local Variable Declaration
data : EV_APPLNAME TYPE EMNAM,
EV_REPMGR_NAME TYPE EMNAM,
EV_CONTROLMGR_NAME TYPE EMNAM,
EV_CONTROLMGR_GEN TYPE CHAR2,
EV_REPMGR_GEN TYPE CHAR2,
EV_APPL_GEN TYPE CHAR2,
EV_REPFORM_GEN TYPE CHAR2,
EV_REPFORM_NAME TYPE EMNAM,
EV_STRAS TYPE STRAS,
EV_ORT01 TYPE ORT01,
EV_ORT02 TYPE ORT02.
DATA : l_APPname TYPE emnam,
l_evaluation_date TYPE begda,
l_extension_date TYPE begda,
l_emailid TYPE comm_id_long,
tab_lines TYPE sy-tabix,
fm_name TYPE rs38l_fnam.
data:/1BCDWB/FORMOUTPUT type FPFORMOUTPUT ,
/1BCDWB/DOCPARAMS type SFPDOCPARAMS ,
ie_outputparams type SFPOUTPUTPARAMS .
DATA : CONTENTS_HEX TYPE SOLIX.
* Structure Declaration
DATA : s_job_info TYPE ssfcrescl,
s_control_param TYPE ssfctrlop,
s_composer_param TYPE ssfcompop,
s_doc_data TYPE sodocchgi1.
* Internal Table Declaration
DATA : i_otfdata TYPE TABLE OF itcoo,
i_pdf TYPE TABLE OF solisti1,
i_pdfdata TYPE TABLE OF tline,
i_receivers TYPE TABLE OF somlreci1,
i_packing_list TYPE TABLE OF sopcklsti1,
i_message TYPE TABLE OF solisti1.
*& Work area declaration.
DATA : w_receivers LIKE LINE OF i_receivers,
w_packing_list LIKE LINE OF i_packing_list,
w_message LIKE LINE OF i_message.
CALL FUNCTION 'Z_HRFM_GET_OFFERED_DATA'
EXPORTING
IV_APPLID = IV_APPLID
IV_REPMGR = IV_REPMGR
IV_CONTROLMGR = IV_CONTROLMGR
IV_REPFMGR = IV_REPFMGR
IV_ACTION = IV_ACTION
IMPORTING
EV_APPLNAME = EV_APPLNAME
EV_REPMGR_NAME = EV_REPMGR_NAME
EV_CONTROLMGR_NAME = EV_CONTROLMGR_NAME
EV_CONTROLMGR_GEN = EV_CONTROLMGR_GEN
EV_REPMGR_GEN = EV_REPMGR_GEN
EV_APPL_GEN = EV_APPL_GEN
EV_REPFORM_GEN = EV_REPFORM_GEN
EV_REPFORM_NAME = EV_REPFORM_NAME
EV_STRAS = EV_STRAS
EV_ORT01 = EV_ORT01
EV_ORT02 = EV_ORT02
EXCEPTIONS
APPLICANT_NOT_FOUND = 1
REPFORM_MGR_NOT_FOUND = 2
REPMGR_NOT_FOUND = 3
CONTROLMGR_NOT_FOUND = 4
OTHERS = 5.
IF sy-subrc = 1.
RAISE applicant_not_found.
ELSEIF sy-subrc = 2.
RAISE repform_mgr_not_found.
ELSEIF sy-subrc = 3.
raise REPMGR_NOT_FOUND.
ELSEIF sy-subrc = 4.
raise CONTROLMGR_NOT_FOUND .
ENDIF.
*finding email id of applicant
SELECT SINGLE usrid_long INTO l_emailid FROM pb0105
WHERE pernr = IV_APPLID AND subty = '0010' AND endda = '99991231'."#EC *
IF sy-subrc <> 0.
RAISE no_emailid_found.
ENDIF.
* s_control_param-no_dialog = 'X'.
* s_control_param-getotf = 'X'.
* s_composer_param-tddest = 'LP01'.
* s_composer_param-tdnoprev = 'X'.
* Sending PDF by mail
CALL FUNCTION '/1BCDWB/SM00000046' "'ZHR_OFFER_FORM'
*"'/1BCDWB/SM00000046'
EXPORTING
/1BCDWB/DOCPARAMS = /1BCDWB/DOCPARAMS
APPLICANT_NAME = EV_APPLNAME
POSITION = POSITION_1000
JOINING_DATE = join_1000
REPFORM = EV_REPFORM_NAME
REPMGR = EV_REPMGR_NAME
CONTROLMGR = EV_CONTROLMGR_NAME
PLACE = PLACE_1000
APPLICANT_GENDER = EV_APPL_GEN
BASE_PLACE = loc_1000
REPMGR_GENDER = EV_REPMGR_GEN
REPFORM_GENDER = EV_REPFORM_GEN
CONTROLMGR_GENDER = EV_CONTROLMGR_GEN
GROSSS = gross_1000
BASIC = basic_1000
CONVEYANCE = conv_1000
FOOD = food_1000
VARIABLE = var_1000
CITY = ev_ORT01
DISTRICT = ev_ORT02
ADDRESS = ev_stras
C_DATE = sy-datum
APPLICANTID = pernr1_1000
comp_address = comp_add
IMPORTING
/1BCDWB/FORMOUTPUT = /1BCDWB/FORMOUTPUT
EXCEPTIONS
USAGE_ERROR = 1
SYSTEM_ERROR = 2
INTERNAL_ERROR = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*data : binary_tab.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = /1BCDWB/FORMOUTPUT-PDF
tables
binary_tab = I_PDFDATA.
REFRESH i_pdf[].
CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
EXPORTING
line_width_dst = '255'
TABLES
content_in = i_pdfdata
content_out = i_pdf.
DESCRIBE TABLE i_pdf LINES tab_lines.
****for mailing********
w_receivers-receiver = l_emailid.
w_receivers-rec_type = 'U'.
w_receivers-com_type = 'INT'.
APPEND w_receivers TO i_receivers .
s_doc_data-obj_name = text-001.
s_doc_data-obj_descr = text-001.
CLEAR w_packing_list-transf_bin.
w_packing_list-head_start = 1.
w_packing_list-head_num = 0.
w_packing_list-body_start = 1.
w_packing_list-doc_type = 'RAW'.
w_packing_list-body_num = tab_lines.
APPEND w_packing_list TO i_packing_list.
CLEAR w_packing_list.
w_packing_list-transf_bin = 'X'.
w_packing_list-head_start = 1.
w_packing_list-head_num = 1.
w_packing_list-body_start = 1.
w_packing_list-doc_type = 'PDF'.
w_packing_list-body_num = tab_lines.
w_packing_list-doc_size = tab_lines * 255.
w_packing_list-obj_descr = text-001.
w_packing_list-obj_name = text-001.
APPEND w_packing_list TO i_packing_list.
*& Writing mail message
concatenate 'Hi' EV_APPLNAME into l_APPname separated by space.
w_message = L_APPNAME.
APPEND w_message TO i_message.
w_message = text-009.
APPEND w_message TO i_message.
w_message = text-002.
APPEND w_message TO i_message.
w_message = text-990.
APPEND w_message TO i_message.
w_message = text-003.
APPEND w_message TO i_message.
w_message = text-990.
APPEND w_message TO i_message.
w_message = text-004.
APPEND w_message TO i_message.
w_message = text-005.
APPEND w_message TO i_message.
"Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = s_doc_data
put_in_outbox = 'X'
commit_work = 'X'
TABLES
packing_list = i_packing_list
contents_txt = i_message
* contents_bin = i_pdf
CONTENTS_HEX = I_PDF
receivers = i_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.
if sy-subrc = 0.
raise sent.
else.
raise not_sent.
endif.
* To send mail immediatly
IF sy-subrc = 0.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
AND RETURN.
ENDIF.
ENDFUNCTION.
can u give some suggestions,
Thanks and REgards,
Thirukumaran. R -
Playing a .wav file from email attachment
I am trying to play a .wav file that is attached to an email, and i get "The document conversion failed". Am I missing something? What do I need to do to be able to play .wav files that are sent to me via email?
I have the same request.
We have a new Panasonic phone system that sends out .wav voicemail files.
Our company's Curve's play the wav fine.
Our company's BOLDs ... DO NOT. -
Sending file as an attachment in the background
hi all,
i am having one XML file in the application server and i want to send this XML file as an attachment via email in back ground,
can any one help me in this???
Thnaks in advance.Check if below code can help you as reference:
PARAMETERS: p_mail TYPE ad_smtpadr OBLIGATORY.
DATA: i_mara TYPE STANDARD TABLE OF mara. " MARA Entries
DATA: l_text TYPE char255. " Text
DATA: l_lines TYPE i,
l_size TYPE sood-objlen.
" Size of Attachment
* Mail related
DATA: i_content TYPE soli_tab, " Mail content
i_attach TYPE soli_tab. " Attachment
DATA: l_send_request TYPE REF TO cl_bcs,
" E-Mail Send Request
l_document TYPE REF TO cl_document_bcs,
" E-Mail Attachment
l_recipient TYPE REF TO if_recipient_bcs,
" Distribution List
l_sender TYPE REF TO if_sender_bcs,
" Address of Sender
l_uname TYPE salrtdrcpt,
" Sender Name(SY-UNAME)
l_bcs_exception TYPE REF TO cx_document_bcs,
" BCS Exception
l_addr_exception TYPE REF TO cx_address_bcs,
" Address Exception
l_send_exception TYPE REF TO cx_send_req_bcs.
" E-Mail sending Exception
*Constants------------------------------------------------------------*
CONSTANTS: c_tab(1) TYPE c VALUE
cl_abap_char_utilities=>horizontal_tab,
" Tab Character
c_cr(1) TYPE c VALUE cl_abap_char_utilities=>cr_lf,
" Line Feed for End-Of_line
c_ext TYPE soodk-objtp VALUE 'XLS'. " XLS Extension
START-OF-SELECTION.
SELECT * FROM mara INTO TABLE i_mara UP TO 20 ROWS.
* Preparing body of the Mail
MOVE 'Mail Body' TO l_text.
APPEND l_text TO i_content.
* Preparing contents of attachment with Change Log
PERFORM prepare_attachment.
* Creates persistent send request
TRY.
l_send_request = cl_bcs=>create_persistent( ).
* Creating Document
l_document = cl_document_bcs=>create_document(
i_type = 'RAW'
i_text = i_content[]
i_subject = 'Material Details' ).
DESCRIBE TABLE i_mara LINES l_lines.
* Size to multiplied by 2 for UNICODE enabled systems
l_size = l_lines * 2 * 255.
* Adding Attachment
CALL METHOD l_document->add_attachment
EXPORTING
i_attachment_type = c_ext
i_attachment_size = l_size
i_attachment_subject = 'Material Details'
i_att_content_text = i_attach[].
* Add document to send request
CALL METHOD l_send_request->set_document( l_document ).
* Get Sender Object
l_uname = sy-uname.
l_sender = cl_sapuser_bcs=>create( l_uname ).
CALL METHOD l_send_request->set_sender
EXPORTING
i_sender = l_sender.
* E-Mail
TRANSLATE p_mail TO LOWER CASE.
l_recipient = cl_cam_address_bcs=>create_internet_address( p_mail )
CALL METHOD l_send_request->add_recipient
EXPORTING
i_recipient = l_recipient
i_express = 'U'
i_copy = ' '
i_blind_copy = ' '
i_no_forward = ' '.
*Trigger E-Mail immediately
l_send_request->set_send_immediately( 'X' ).
CALL METHOD l_send_request->send( ).
COMMIT WORK.
CATCH cx_document_bcs INTO l_bcs_exception.
CATCH cx_send_req_bcs INTO l_send_exception.
CATCH cx_address_bcs INTO l_addr_exception.
ENDTRY.
*& Form PREPARE_ATTACHMENT
FORM prepare_attachment .
FIELD-SYMBOLS: <lfs_table>, " Internal table structure
<lfs_con>. " Field Content
DATA: l_text TYPE char1024. " Text content for mail attachment
DATA: l_con(50) TYPE c. " Field Content in character format
* Columns to be tab delimeted
LOOP AT i_mara ASSIGNING <lfs_table>.
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE <lfs_table>
TO <lfs_con>.
IF sy-subrc NE 0.
CONCATENATE c_cr l_text INTO l_text.
APPEND l_text TO i_attach.
EXIT.
ELSE.
CLEAR: l_con.
MOVE <lfs_con> TO l_con.
CONDENSE l_con.
IF sy-index = 1.
CLEAR: l_text.
MOVE l_con TO l_text.
ELSE.
CONCATENATE l_text l_con INTO l_text
SEPARATED BY c_tab.
ENDIF.
ENDIF.
ENDDO.
ENDLOOP.
ENDFORM. " PREPARE_ATTACHMENT
Regards
Eswar -
Extension of excel file in email attachment is .excel instead of .xls
I have concurrent program and I'm trying to use the 'delivery option' to send the output as attachment in email. I defined a rtf template and can open the output from 'Output' button correctly. it can also send mail with attach, but the file name of the attachment is .excel which Excel cannot recognize. My question is , is there any setup to specify the file extension of excel output. I'm sure bursting can work correctly, I just want to try the delivery option. Thanks in advance.
Please see these links.
excel output in report builder reports
http://forums.oracle.com/forums/search.jspa?threadID=&q=excel+AND+XML&objID=f475&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein
Maybe you are looking for
-
Does anyone know how to print a text message from a bill?
Does anyone know how to print text messages from a phone bill or view them?
-
I have a table with the following structure..... CREATE TABLE "LFEE_UPLOAD" "UPLOAD_ID" NUMBER, "DDO_ID" VARCHAR2(12 BYTE), "EDT" TIMESTAMP (6) DEFAULT sysdate, "LUDT" TIMESTAMP (6) DEFAULT sysdate, "FILENAME" VARCHAR2(50 BYTE), "TYPE" VARCHAR2(100 B
-
Class Cast Exception in sessiong bean
Hi, I have created a session in servlet, then I forward to a JSP to display the bean. It results an error said that ClassCastException. Through my study, I found that the problem is there are different Class Loader, hence I disable the package in my
-
How can I find out what is wrong with swap image in a library
I had a DW8 site that used a library item on many pages with the calls to the macromedia swap image function. Everything was fine. I've now converted to CS5.5 and I find that: a) When the library item is changed, the updated pages don't have proper
-
When I ran the itunes Diagnostics Test for my new ipad, I had one test result that had a button in front of the test name, which was red. The test was in the Device Connectivity Tests Portion, under the Support Services Category, Titled " itunes Hel