File attachement in mail adapter
Hi ,
I need to send users an error report which I have captured in the form of a file. Is it possible to attach this file as an attachement via mail adapter. I have been reading that the payload can be sent as attachment by specifying the interface namespace and interface name. But my requirement is to trigger the mail once the file has been completely written and not for every message. The reason being I could have 3000 records in the file and I dont want to send 3000 MAILS out but just 1 mail for the entire 3000 records...
Thanks,
Teresa
Hi Teresa,
I hope, I understand you right.
When you use the file-adapter for sending the file, you can without mapping send this file out to a mail receiver as attachment, there is nothing special to do.
Regards
Stefan
Similar Messages
-
Can XI Message be mapped to a flat file attachment in Mail adapter
Hi guys,
I have a requirement, where I have ECC system seding a XI message to XI.
Now XI has to convert this to a flat file may be tab delimited and send this as an attachment in email using receiver mail adapter.
I want to avoid BPM and make it simple.
Appreciate any help on this topic.
Regards
SujanHi,
Here are some mapping examples.
/people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
/people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
/people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
/people/venkataramanan.parameswaran/blog/2006/12/12/java-mapping-to-handle-flat-files-in-sap-xi
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
/people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi
Vishal -
Sending File as attachment using Mail adapter with naming convention
Dear All,
I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name to one of the folders at FTP and also to my customer at his email id.
I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
Regards,
NJwhat you need to do:
1) Select ASMA in Sender and receiver File CC...already done
2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
so your entire Content-Type node will have something like text/plain; name="abc.ok"
SAP Note has reference on how to do this:
https://service.sap.com/sap/support/notes/856599
From the note:
Q: How can I set the file name of a mail attachment?
Regards,
Abhishek. -
Sending a File (XML or TXT) as attachment to Mail Adapter
Dear all,
In a scenario I'd like to pull a file by using 'File Adapter' and send it (without content change) as attachment to an Email recipient.
Is their any possibility to send a file by using Mail Adapter?
Do you have any similar solution in place, if so could you please share your experiences with me?
FYI, we are using XI 3.0, SP14.
I'll appreciate your time.
Regards,
K. AfsaliHi Afsali,
//Is their any possibility to send a file by using Mail Adapter
it is possible.
There are a few steps to it though. You will have to convert the file you pick up into an XML file as XI can process only XML data.
After you are done with it, you will have to import a WSDL for sending mails. this WSDL is available on SAP Marketplace and it will have all details like from, to subject,and content. To get this WSDL just check this link,
https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
Just do the mapping of the respective fields and the information mapped to the content field will be passed as the content of the mail.
Just check thise links out,it will surely help you
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
Regards,
Bhavesh
Message was edited by: Bhavesh Kantilal -
File attachment in mail missing
I am using iphone to read my corporate emails. I received an email with attachment 8MB and was asked to download full message. Once I downloaded the full message, the attachment was missing and a text message (See attached file: filename.zip) was replaced. If I forward the email, the recipient did not received the attachment, even if I chose Include attachment option. Where did the attachment goes? How do I solved this problem?
Hi Jagesh,
The content type of the Pdf has to be identified, in order to conver the pdf successfully, You need to perform the conversion usign the PayloadSwapBean the Module tab. You use this when you want to receive attachment using Mail adapter. You need to configure few steps in Module Configuration
There you need to mention your MIME header paramenters Content-Type, Content-Description.
How this can be configured and how process with PayloadSwapBean check the below link
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
Module Processor
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm
Regading MessageTransformBean, Migrating Dispatcher Classes
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
Regards,
Prasanna -
Require PDF File attachment in Mail
Hi Experts,
I am doing the Proxy-XI-Mail scenario. I am sending the Mail related data like Content, Content_Type from R/3 to XI and configured the Mail receiver adapter.
R/3 coding:-
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT_TYPE = 'application/pdf;name="filename.pdf"'
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-CONTENT = G_CONTENT
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-FROM = From_Mail.
G_ALERT_INPUT-MT_R3REQUEST_MAIL_SEND-MAIL-TO = To_Mail.
and then calling the client proxy
ID Mail Receiver configu:-
Selected Use Mail Package option
Content encoding base64
Keep attachment option is also selected.
I am geeting the Filename.pdf in mail as attachment.
Problem is:- I am not able to open the attached PDF File and error is:- 'Adobe Reader could not open filename,pdf because it is either not a supported file type ot because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded'
I think some conversions may be required to convert the XML Payload data into PDF file format for the Mail receiver adapter.
Please suggest
Thanks & Regards
JageshHi Jagesh,
The content type of the Pdf has to be identified, in order to conver the pdf successfully, You need to perform the conversion usign the PayloadSwapBean the Module tab. You use this when you want to receive attachment using Mail adapter. You need to configure few steps in Module Configuration
There you need to mention your MIME header paramenters Content-Type, Content-Description.
How this can be configured and how process with PayloadSwapBean check the below link
http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm
Module Processor
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cd/5af7c0c994e24fb0d0088443513de2/content.htm
Regading MessageTransformBean, Migrating Dispatcher Classes
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm
Regards,
Prasanna -
Having Some unknown characters in my file of Receiver Mail Adapter
Hi All,
I have a unique problem, I am having special characters( #S@u201D E" E$ u201Däu201Där 4TåE$R D0u201CC3 u0192 c@u201DÔôETÄPu201Du201Eu20220u201D 3@u201C ó ró# u20ACu201C ó# ó# u2019 ) in text file of Receiver Mail Adapter.I am providing you a part my input text file
1747021 000070 0001 Production Baseline ZTAN 100A 0039 2204229-1 50 PLANT3002 Honeywell Aerospace Bournemouth - R 3212774 NOZZLE HIS M22 12/31/2008 01/05/2009 1.000 1.000 1.000 01/05/2009
1745558 000100 0001 Production Baseline ZTAN 100A 0039 801137-1 80 304030 LUFTHANSA TECHNIK AG 45111378001 WHEEL HIS M22 12/30/2008 01/12/2009 3.000 3.000 3.000 01/12/2009 COOP Legacy Notes - Note Type: 07N UPDATE AS OF 11/8 SH AVS Legacy Notes - Note Type: AB 1. A QTY OF 53 NEW PARTS WERE PURGED ON 3-5-99 PER KAREN MOSS' REQUEST. PARTS ARE SUSPECT OF BEING DAMAGED DUE TO BEING STORED IN ASRS IN A METAL TO METAL SITUATION.
1740335 000100 0002 Production Baseline ZTAN 100A 0039 3176647-4 80 341734 SAUDI ARABIAN AIRLINES CORP 8233950 VALVE, CONTROL Jaroslav Kral M18 12/24/2008 12/31/2008 1.000 1.000 1.000 01/23/2009 COOP Legacy Notes - Note Type: 07N D PARTS NEED TO CHEC WITH LUPE WIN ISSUIN COOP Legacy Notes - Note Type: POG REPLCS 3176647-3 AS A MANDATORY CHANGE. 3399100-11 V17138 (TAKES -4 TO -11) 3399100-11 V17139 (TAKES -9 TO -11) 3399100-10 V17140 (TAK
1734808 000100 0002 Production Baseline ZTAN 100A 0039 3883240-6 80 300168 IBERIA LAE 48017888601 CONTROL FUEL HIS M13 12/20/2008 01/10/2009 1.000
1.000 1.000 04/29/2009 AVS Legacy No
Can any one help me out?Hi Stefan,
I am Using Transport Protocol as IMAP4
Message Protocol as XIPayload
Connection Parameters to Mail Server
URL -
.mycompany.com
Mail Attributes
Use Mail Package
content Encoding base64
Keep attachments
I have Used the following Modules
Processing Sequence
Module Name Module Type Module Key
localejbs/AF_Modules/PayloadSwapBean Local Enterprise Bean Payload
localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean Transform
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration
Module Parametername Parameter Value
Payload swap.KeyName content-type
Payload swap.KeyValue text/xml
Transform Transform.ContentDescription MyReport.txt
Transform Transform.ContentDisposition attachment
Transform Transform.Contenttype text/xml -
In iphone4, How and where to save a file attached in mail
hey, i have started using iPhone. presently using iPhone4. How and where can i save files attached in mail.
Photos attached to an email can be saved to the Camera Roll in the Photos app on your phone. Tap and hold on a photo in the email until you get a choice to Save Image.
Other documents require a suitable app.
PDFs can be saved in the free iBooks app available in the App Store.
Word docs can be saved in Pages or other apps that support text files.
Etc.
To save a document tap on the doc. You will either be able to view the contents or get a choice to open in some other app, -
Unzip attachment in Mail adapter or/ File Adapter
Hi everyone,
I need to get flat file from .zip attachment that comes with mail? Is it possible to get it with Mail adapter, unzip it and then make conversion? All steps in the Integration engine?
Another option can be get .zip with File adapter, but again how to unzip it?
Thanks,any help appriciated as I am doing my first XI project.
Nataliya>
Buffy76 wrote:
> Thanks a lot, guys. Unzipping is clear now.
>
> Prateek, it would be great if you can you point to "how-to" file or example for MessageTransformBean.
>
> Regards,
>
> Nataliya
ref this https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05 -
How To Send A Text Attachment Through MAIL Adapter
Hi Experts,
I Did A Scenario that is By using file adapter at the sender side and PI as a middle ware i have sent one text file to database
Now here my question is
I have to send the same text file which i have sent database... my using Mail Adapter
Simply File to Mail Scenario
FILE PI MAIL
But I have to send the same text file which i sent to database... by using mail adapter... Here all the configuration are done ... And the channels are working properly... only thing here is..to send same text file using mail adapter..
It will be good if any one can explain step by step..
Regards
aravindhHi Rajendra,
Tanq for connecting me ... This Blog helped me a lot ....And it is a useful answer to me..
For this file to mail scenario we have got .txt as an attachment ... Its fine ... But her my Client is asking me to add CONTENT in the mail... Content in the sense..
Example of content...
Hi,
Please find the attachment
Regards,
sap pi,
They need in the form of like this... To add content in the mail What i have to do...DO i need to add more configurations if it is what are they...
Please solve the issue.. It is appreciated some one can explain me step by step or .. By sending me screen charts..
Thanks in advance....
Regards
vinay -
PDF attachment in mail adapter
Hi
I am reading mailbox using mail adapter. But i cannot read the PDF attachment in that mail. I use "PayloadSwapBean" in the module, but it is packing the mailbody to the text file, but they is no sign of PDF attachment. How to read the attachment.
Regards
AndyHi Anandan,
You can use Java/ABAP proxies to do this job for you..
Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
/people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher -
How to access attachement in mail adapter
Hello,
i receive mails with an xml file attached with the mail adapter. Within the integration engine i can see that the adapter creates a message with two parts in the payload "MailAttachement-1" and "MailMessage". When i configure a file writer for my message i only get the content of the "MailMessgage" part (which contains only the sender, subject, mailtext ... and not the data i need (= "MailAttachement-1")). I tried several settings within the mail adapter configuration (user Mail Package, keep Attachements) -> no success.
How can i get access to the "MailAttachement-1" within the mapping?
Thanks
PeterHi,
If you want only the header data of the file (expecting you are having other data also) then it is not possible to do so without mapping. What I would suggest is to do the mapping for header and use this in ID.
So configure two receivers one for mail and another with file. In the receiver determination for the mail you use mapping and for file you dont use mapping at all. This would resolve your issue.
Regards,
---Satish -
Send a XML file using the mail adapter
HI ,
I have to send an incoming xml message as a attachment in the mail using mail adapter .
how can I achieve this .
Thanks
NikhilHi Nikhil,
Just check with this blog-
/people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
Creating mails with attachments from flat text files
Hope this helps..
Regards,
Moorthy -
Design: Downloading attachement using Mail adapter
Hi Experts
I am currently building an interface which requires attachment to be downloaded in XI box. Is this possible using sender mail adapter. Could someone validate the feasibility of the design.
Requirement in Brief
A bank is sending a file through e-mail as an attachment to a file system and XI has to move the file to target system using FTP adapter. Now we want automation on source end. Instead of manually downloading the file to file system we want file to be direcly posted to target system.
So few questions with regard to requirement:
1) Can I download the file from mail in XI and then post the downloded attachement to Target system.
Could someone please provide me with the steps for downloading the file to XI??
Regards
Abhishek MahajanHey
Please have a look at the following blog
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
Thanx
Aamir -
How to send a text file attachment through mail in ECC 6.0
Hi Friends,
As per the requirement, I need to send a ALV report result as text file attachment to user in ECC 6.0 . I know how to do in 4.6C version. But the same code is not working here in ECC 6.0.
Generally to get the data in new row in the text file we use below code in 4.6c.
data: c_value type x value ' 0D '.
concatenate c_value itab-line into itab-line.
By using above code, we get each row of the itab in a new line in text file.
Same code is not working in ECC6.0 as it is not supporting to concatenate bytes with characters. Getting the error like " field c_value should be diclared as type C or I or N or T or P"
Even I have used function module NLS_STRING_CONVERT_TO_SYS to convert hexa to char. It is converting the value' 0D' to ' # '. But it is not working.
Could you please suggest me that how can get each row of itab as a new line in text file in ECC 6.0.
Itab value:
abcdefdfldjfñlkdsjfñldsjfdsñljñla
fdsljfñldskjfldsñkjfñldsjfñldsajñld
vcxusfcxusfcusafcxusafcusafcdsauc
Actual result currently coming in text file:
abcdefdfldjfñlkdsjfñldsjfdsñljñlafdsljfñldskjfldsñkjfñldsjfñldsajñldvcxusfcxusfcusafcxusafcusafcdsauc
Expected result in text file:
abcdefdfldjfñlkdsjfñldsjfdsñljñla
fdsljfñldskjfldsñkjfñldsjfñldsajñld
vcxusfcxusfcusafcxusafcusafcdsauc
Please do the needful.
Thanks
Kumarhi,
Try this function Module
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1 '
*example code
******* Create Message Body Title and Description****************
i_objtxt = 'test with 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'.
wa_doc_chng-expiry_dat = sy-datum + 10.
wa_doc_chng-obj_descr = 'smartform'.
wa_doc_chng-sensitivty = 'F'.
wa_doc_chng-doc_size = v_lines_txt * 255.
**** Main Text*****************************
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.
**** Attachment (pdf-Attachment)*************
i_objpack-transf_bin = 'X'.
i_objpack-head_start = 1.
i_objpack-head_num = 1.
i_objpack-body_start = 1.
i_objpack-body_num = v_lines_bin.
i_objpack-doc_type = 'PDF'.
i_objpack-obj_name = 'smartform'.
concatenate i_objpack-obj_name i_objpack-doc_type into
i_objpack-obj_descr separated by '.'.
* I_OBJPACK-OBJ_DESCR = 'test'.
i_objpack-doc_size = v_lines_bin * 255 .
append i_objpack.
* Länge des Attachment ermitteln
clear i_reclist.
i_reclist-receiver = 'email address'.
i_reclist-rec_type = 'U'.
i_reclist-express = 'X'.
data: tab_lines like sy-tabix.
describe table i_objbin lines tab_lines.
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 When Sending the File', sy-subrc.
else.
write:/ 'Mail sent'.
endif.
Maybe you are looking for
-
How do I get the lyrics on iTunes to show up on my iPhone 4 iOS 6?
I put lyrics in the lyrics section of the songs on iTunes but when I sync it to my iPhone they won't show up. Is there something I have to do to make them show up or are lyrics disabled on iOS 6. I they can be put on my iPhone then could you tell me
-
Exception while creating a DataBase Connection (Unix)
Hello Friends, I am Trying to create a DataBase Connection using OCI in java on UNIX Platform, but it gives an error message: Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc9 in java.library.path at java.lang.ClassLoader.loadLib
-
hi everyone, is it possible, to export and import a web dynpro successfully from one NWDS to another? i tried exporting to file-system and checked everything. as i imported it, mostly everything was missing. no views, models etc. how do i have to exp
-
Thank you very much. If you can please, atach a file by Labview 8.0 or oldest version.
-
Video changing its framerates at random.
Hi, I have a video that I'm trying to do a project with. However, the person that sent me the video is kinda noobish and I am unsure as to how it has been encoded and what not. The file itself is in mpeg format and seems to have been captured from an