How to send word file as attachment in an email
Hi All,
I have a scenario where the a word document is sent using a file adapter and mail adapter puts it as an attachment and sends it to designated email group.
Now the issue is the attachment that I am getting is text file, but i want it to be a word format file.
Pls advice..
Xier
Hi,
Just give this a shot.
In the file adapter.
Set Additional File(s) .
and follow this document how to send additional file, rules and naming conventions and parameters.
http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
Itz simple.
<b>Cheers,
*RAJ*</b>
I
Similar Messages
-
How to send txt file as attachement in email
Hi Experts ,
How to send txt file as attachement in email .
which function module i useHi,
Try to use this one
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
Hope it can solve your problem!
Good luck!
Tao -
How to Sender PDF file as attachment in Payload?
Hi Experts,
After I done some of PI scenarios, I'm stuck with one of my requirement... In requirement, "Web service" will send request to "SAP ECC 6" in order to get PO document print out in PDF file by call smartform or any form printing as usual.
In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
I try to search and read some of document and blog, some said I can attach file as Payload attachment, but no clear solution or guide to do so.
Here is example blog that I found, I really useful
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
Please suggest me in my case,
Thanks in advance...
Cheers,
TerryHi,
>>In my understand, I'm using SOAP adapter as sender and RFC adapter in receiver side, in RFC function, I will call form and generate PDF file by using normal ABAP function, but here, how can I send PDF file as response message of SYNC call from web service.
as per my blog you can attach PDF to a message only if you use abap proxy on ECC and not RFC
the code is just copy and paste from my blog:
/people/michal.krawczyk2/blog/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments
so there is nothing spectacular there
Regards,
Michal Krawczyk -
How to send zip file as attachment through email
Hi All,
I am having a requirement that I need to download the internal table data into .txt file and I need to zip the text file. And this zip files needs to send to the customer through email.
I am able download the data into .txt and able to zip the file. But I am not able send the .zip file through email.
I know that we can send .xls, .txt, .csv and also .ppt, .doc file types we can send as an attachement through abap program. But I don't know about .zip files. Is there any possibilty to send .zip file as an attachment thorugh email.
Can any one help me how to send a .zip file thorugh email as an attachment.
Regards,
vinodhi Vinod,
Can you please tell me how you have zipped the file.
I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
What I need on the whole is just to reduce the size of the file.
form ZIP_FILE .
DATA: lt_data TYPE TABLE OF x255,
lt_textdata TYPE TABLE OF x255.
DATA: ls_data LIKE LINE OF lt_data.
DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
*DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
DATA: lv_file_length TYPE i.
DATA: lv_content TYPE xstring.
DATA: lo_zip TYPE REF TO cl_abap_zip.
CREATE OBJECT lo_zip.
Read the data as a string
clear lv_content .
OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
READ DATASET lv_dsn1 INTO lv_content .
CLOSE DATASET lv_dsn1.
lo_zip->add( name = 'sample.TXT' content = lv_content ).
lv_content = lo_zip->save( ).
*clear lv_content .
Conver the xstring content to binary
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_content
IMPORTING
output_length = lv_file_length
TABLES
binary_tab = lt_data.
OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT lt_textdata INTO ls_data.
TRANSFER ls_data TO lv_dsn3.
ENDLOOP.
CLOSE DATASET lv_dsn3.
IF sy-subrc EQ '0'.
MESSAGE s999(zfi_ap_gl) WITH text-t10.
ENDIF.
Can you please help.
Thanks Aravind -
How to send pdf files from local dir through emails attachments
I have some pdf documents in some directory, I want to send those pdf's as an attachment throu emails to the concerned person.
Please let me know how to attach the files and send through email.
Thanks.You are using Forms 4.5, which is a client/server configuration. When you create a pdf file, the file has to be written to a directory that is accessible from your PC. D:\ is acessible, /tmp/ not (that is a directory on some Unix server). If you want to write files to a Unix server, you have to set up Samba and map a drive from your PC to he Unix directory.
Since you are creating multiple pdf files, you will have to wait until all reports are finished and mail them afterwards. You can create a batch script to mail the files. -
Unable to send Word document as attachment to an email
I have recently installed Microsoft Office Standard on my new laptap which runs Windows 7 Professional. When i am in Word and trying to send the document as an email attachment, I received an error dialogue box with the message "Word couldn't send
email because of MAPI failure: "Unspecified error"." I clicked on the help button and have tried all the steps but no avail.
The work around is to open Outlook and create an email with an attachment. This works BUT I would like to be able to use Word as it was designed. Anyone have a similar issue and suggested correction?
Thanks!Here is a simple solution sure to work.
1. Start
2. Search for Winword
3. Right Click Winword and choose properties ( I instead would choose open file location just to know where the rest of windows programs can be found. Once there, right click Winword again and choose properties.
4. Click compatabilty tab
5. Check run as administrator at the bottom
6. Apply
7. Do the same for all Office programs If so desired (on the same file location where you found winword just look for Excel, Powerpoint, etc. and make sure the file you choose is an application type file)
Jic, it is not obligatory to apply the above solution for to all Office programs. You can do it just to the ones you want to send email from. If you only need Word to have this functionality just do it for Winword and thats it. -
How to send audio files as attachments?There is no attachment option in mail and no share option in MUSIC
i have some voice samples in Music file .how to share those files? or plz tel me where to store the voice samples
-
How to send image file through mail without any attachment
Plz tell me how to send image file through mail without any attachment ( i mean not converting that image into pdf or any format ) i want to send that text or image through mail .
Hi Sandeep,
I think you can setup the type of email in Shared office Settings in transaction S016.
There is an option called <Preset document classes>
You choose this pushbutton to branch to the maintenance screen for the document classes that are directly displayed to users in the Business Workplace for selection when they use the Create function. The name under which the documents are displayed can also be maintained.
http://help.sap.com/saphelp_nw70/helpdata/en/6c/69c30f418d11d1896e0000e8322d00/content.htm
Haven't tried it though.
Regards,
Siddhesh -
How to send a file as an attachment using mailx
Hi
Can any one tel me how to send a file as an attachment using mailx command in shell script.
Thanks,
Suman.Wrong forum where to ask such questions.
Check this one link:
http://www.unix.com/shell-programming-scripting/18370-sending-email-text-attachment-using-mailx.html?t=18370#post70254 -
How to send a file to a web service
I am developing a web service application which needs to accept a CAD model as input. Would any one tell me how to send a file from a client application to service provider.
thanks in advanceYou can use mime encoding inside your SOAP request, something like this:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<data>
<file>
<name>filename.zip</name>
<content>FVberI0XlJincJEGmcbVyMOGpdWGl1bYB2r1y2vYicHqq0WYuergigzYB20GvMLZ
Ag9YicHozwLSieOUieDLzgrLCZKncI9dCMvHDg9YicGPdqOVu3vIAMvJDcaOkq0kl0TLExDVCMrZ
DwfSifnVzNr3yxjLkq0kl1rPDgXLicHdB252zxj0zwqGzNjVBsbmyxnLCKPLDcbqq0WPdqOVqxv0
l1jVB3qGmIaWifiGl0LUzM8GmsaWifiGpJ4ncNn0yxj0EhjLzG0kndyYzxiGpdWGl1nPEMuGmJyG
mdaWndiZmYaWmdaWmcbUdqOWmdaWmda0ndi1idaWmdaWig4ncNrYywLSnG0kjsvft0yncG==
</content>
</file>
</data>
</soap:Body>
</soap:Envelope>This can even be accomplished from within Pl/Sql. Otherwise you can use the WS-Attachment feature which is (I think) not yet supported by Oracle.
Regards,
Michiel -
How to send XML file to https server using POST
Hi, I am having an requirement, that I have to connect to https server and I have to pass an input XML file as a response server will give me output XML file.
The certificate validation part is over, I am using FileInputStream to read the XML file and attaching this to connection.getOutputStream(); but server is throwing me DTD does n't match.
Can any body tell me how to send XML file, I have to use any DOM parser to send the XML file, suggest me and give me sample code.
Thanks,Can anybody give me the solution
-
How to send SMARTFORMS output as attachment through?
how to send SMARTFORMS output as attachment through e-mail?
after executing SMARTFORMS how to send that output via e-mail.
Help me.
thanks
surya.
Moderator Message: Please search for available information first
Edited by: kishan P on Nov 7, 2010 7:19 PMhi Vinod,
Can you please tell me how you have zipped the file.
I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
What I need on the whole is just to reduce the size of the file.
form ZIP_FILE .
DATA: lt_data TYPE TABLE OF x255,
lt_textdata TYPE TABLE OF x255.
DATA: ls_data LIKE LINE OF lt_data.
DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
*DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
DATA: lv_file_length TYPE i.
DATA: lv_content TYPE xstring.
DATA: lo_zip TYPE REF TO cl_abap_zip.
CREATE OBJECT lo_zip.
Read the data as a string
clear lv_content .
OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
READ DATASET lv_dsn1 INTO lv_content .
CLOSE DATASET lv_dsn1.
lo_zip->add( name = 'sample.TXT' content = lv_content ).
lv_content = lo_zip->save( ).
*clear lv_content .
Conver the xstring content to binary
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = lv_content
IMPORTING
output_length = lv_file_length
TABLES
binary_tab = lt_data.
OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
LOOP AT lt_textdata INTO ls_data.
TRANSFER ls_data TO lv_dsn3.
ENDLOOP.
CLOSE DATASET lv_dsn3.
IF sy-subrc EQ '0'.
MESSAGE s999(zfi_ap_gl) WITH text-t10.
ENDIF.
Can you please help.
Thanks Aravind -
Please tell me How to send excel file content to MAILBOX
Hello ,
Can anybody tell me how to send Excel file data to MailboxHi,
Check this sample code.
INITIALIZATION .
CLASS cl_abap_char_utilities DEFINITION LOAD.
gf_etb = cl_abap_char_utilities=>horizontal_tab. "For horrizontal tab
gf_cr = cl_abap_char_utilities=>cr_lf. "For enter
gf_lf = cl_abap_char_utilities=>newline. "For new line
Declaration
DATA: lwa_hd_change TYPE sood1,
lt_objcont TYPE STANDARD TABLE OF soli,
lwa_objcont TYPE soli,
lt_receivers TYPE STANDARD TABLE OF soos1,
lwa_receivers TYPE soos1 ,
lt_att_cont TYPE STANDARD TABLE OF soli,
lwa_att_cont TYPE soli,
lt_packing TYPE STANDARD TABLE OF soxpl,
lwa_packing TYPE soxpl,
lf_sent TYPE sonv-flag,
lf_size TYPE i.
CONSTANTS: lc_obj(11) TYPE c VALUE 'BOMSouthco',
lc_desc(20) TYPE c VALUE 'BOM Download',
lc_lang(1) TYPE c VALUE 'E',
lc_raw(3) TYPE c VALUE 'RAW',
lc_net(1) TYPE c VALUE 'U',
lc_mail(4) TYPE c VALUE 'MAIL',
lc_xls(3) TYPE c VALUE 'XLS',
lc_ext(3) TYPE c VALUE 'EXT'.
Passing values to the strutures used in SO_OBJECT_SEND function module
lwa_hd_change-objla = lc_lang.
lwa_hd_change-objnam = lc_obj.
lwa_hd_change-objdes = lc_desc.
lwa_hd_change-objlen = 255.
lwa_objcont-line = text-t29.
APPEND lwa_objcont TO lt_objcont.
CLEAR lwa_objcont.
lwa_receivers-recextnam = text-t31.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
lwa_receivers-recextnam = text-t30.
lwa_receivers-recesc = lc_net.
lwa_receivers-sndart = lc_mail.
lwa_receivers-sndex = 'X'.
lwa_receivers-sndpri = 1.
lwa_receivers-mailstatus = 'E'.
APPEND lwa_receivers TO lt_receivers.
CLEAR lwa_receivers.
Passing values for the attachment file
LOOP AT gt_output INTO gwa_output.
CONCATENATE gf_lf gwa_output-matnr gf_etb gwa_output-idnrk gf_etb
gwa_output-type gf_etb gwa_output-menge gf_etb
gwa_output-meins gf_etb gwa_output-comp gf_etb
INTO lwa_att_cont-line.
APPEND lwa_att_cont TO lt_att_cont.
CLEAR lwa_att_cont.
ENDLOOP.
CHECK lt_att_cont IS NOT INITIAL.
DESCRIBE TABLE lt_att_cont LINES lf_size.
lwa_packing-transf_bin = ' '.
lwa_packing-head_start = 1.
lwa_packing-head_num = 0.
lwa_packing-body_start = 1.
lwa_packing-body_num = lf_size.
lwa_packing-file_ext = lc_xls.
lwa_packing-objlen = lf_size * 255.
lwa_packing-objtp = lc_ext.
lwa_packing-objdes = lc_desc.
lwa_packing-objnam = lc_obj.
APPEND lwa_packing TO lt_packing.
CLEAR lwa_packing.
CHECK gf_error IS NOT INITIAL. "Check if unix file is written
FM to send email to the intended recipients
CALL FUNCTION 'SO_OBJECT_SEND'
EXPORTING
object_hd_change = lwa_hd_change
object_type = lc_raw
IMPORTING
sent_to_all = lf_sent
TABLES
objcont = lt_objcont
receivers = lt_receivers
packing_list = lt_packing
att_cont = lt_att_cont
EXCEPTIONS
active_user_not_exist = 1
communication_failure = 2
component_not_available = 3
folder_not_exist = 4
folder_no_authorization = 5
forwarder_not_exist = 6
note_not_exist = 7
object_not_exist = 8
object_not_sent = 9
object_no_authorization = 10
object_type_not_exist = 11
operation_no_authorization = 12
owner_not_exist = 13
parameter_error = 14
substitute_not_active = 15
substitute_not_defined = 16
system_failure = 17
too_much_receivers = 18
user_not_exist = 19
originator_not_exist = 20
x_error = 21
OTHERS = 22.
IF sy-subrc = 0.
MESSAGE s004 WITH text-t34.
ENDIF.
COMMIT WORK.
Reward if helpful.
Regards,
Ramya -
How to send .CSV file via email in Oracle10g/11g PL/SQL
Hi Guys,
Can any one let me know or suggest me how to send .csv file via email attachment using Oracle PL/SQL.
Thanks in advance!
Regards,
LRKA FAQ. Use UTL_MAIL (if attachment is 32KB less). Else use UTL_SMTP. Search this forum. Search using google.
-
How to send a file from FTP to external server
My requirement is to send a file from FTP to D3(External) server.
Now I am able to store the file in Appln server.
I want to send the file created by the program thru FTP to D3 server.
I know the username,Password,HostID,RFC destination details.
How to send the file from FTP to D3.
If u have any program,Plz send it...
I dont want the function modules name...I want the example code ....
Thanks in advance.Hi Sumi,
You could do it so that you create a .bat or .cmd script to your server which does your ftp transfer.
To do this you must use sm69 to create a external operating system command which you can call from FM SXPG_COMMAND_EXECUTE. To SXPG_COMMAND_EXECUTE you the file you need to transfer as a parameter.
What happens is that your abap program passes the file to windows batch script (.bat .cmd) which will then do the transfer for you.
Here's a sample of ftp-script for windows:
echo open IP_ADDRESS_TO_YOUR_SERVER > c:zftp_transfer.ftp
echo USERNAME>> c:zftp_transfer.ftp
echo PASSWORD>> c:zftp_transfer.ftp
echo put YOUR_FILE>> c:zftp_transfer.ftp
echo quit>> c:zftp_transfer.ftp
ftp -s:c:zftp_transfer.ftp
also take a look here for more details:
http://support.microsoft.com/?kbid=96269
Ok, this might be a bit trivial but if your server is unix/aix etc.. Instead of using batch script you must do a shell script.
Regards,
Ville
Maybe you are looking for
-
UCCX 10 open and close over-ride
I am trying to find a way to into create a script to have it so that an supervisor can call a number and over-ride to close or open option. does anyone has a sample script to share? thanks
-
How do I get commands to display on a "full screen" display of a downloaded PDF file?
In recent months, more and more downloaded PDF files are displayed on my Mac Pro without the command line at the top of the page. This makes using & managing the documents difficult, and sometimes impossible. I can gain access to a limited number o
-
BAPI_PROJECT_MAINTAIN commit problem
Hi, I'm creating my projects thru BAPI_PROJECT_MAINTAIN which is working fine. After creation of project, I'm submitting one program to create the partners assingment to this newly created project. But for this I have to use the statement Wait upto 5
-
Data Access for Pick-Pocketers
I just got my iPhone4s stolen today. I do have Find My iPhone on it so I tried to locate/send message/lock it but it did not have 3G on and of course, the phone was turned off after being stolen. I do have passcode lock on the phone so I guess even w
-
Sample code for smartform required
Hi all, I need a sample code in smartform for the following said , I have a header(customer code address and basic info ion it) and detail table contains (bill details). I have to display this data in the smartform . In anew page for each customer.