Proxy to Mail Adapter issue
Hi Experts,
I have a requirement like a control report is comming from SAP through proxy to XI and I need to send that control report as an attachment in excel format from XI to the 3rd party by the mail adapter.Also in the mail body I have to send the information what is there in the excel.
Now as I have not worked before in mail adapter I want to know how can I send the report as an attachment in a mail adapter that too in excel format format and how can I do the mail body?
Thanks and Regards
Atanu Mazumdar
AFAIK there is no standard solution in PI to convert the xml message sent by proxy as an xls attachmet. You may have to plugin adapter modules to your receiver email com channels to achieve this. first step would be to convert the xml to flat structure using MessageTransformBean, you could then use the payloadswapbean to convert the payload to an attachment and name it with a .csv extension(which can be opened in excel). If you are looking at xls file creation, you could chk the links http://wiki.sdn.sap.com/wiki/display/XI/CODE-CreateanExcelFileviatheJExcel+API , /people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
Thanks
Saravana
Similar Messages
-
Receiver Mail Adapter Issue.
Hi All,
I am running an interface from proxy to email using the inbound mail adapter. The email adapter is resutling in the following exception:
failed to send mail: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
Could any one please throw some light into this issue?
Thanks a ton! in advance.
Thanks,
Manohar Dubbaka.Hi,
Thanks for the quick response.
I am trying to send an attachment using the email. I am using
Transport Protocol as : SMTP
Message Protocol as : XIPAYLOAD
Adapter Engine as : Integration Sever
URL as: smtp://10.1.1.11
Configure User Authentication as : Check
Content Encoding as: base64
Keep Attachments as : Check
And also using the Adapter Framework modules as:
AFT_Modules/StrictXml2PlainBean Local Enterprise Bean 1
AF_Modules/MessageTransformBean Local Enterprise Bean 3
AF_Modules/PayloadSwapBean Local Enterprise Bean 2
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterpriese Bean mail
I am converting the XML message into comma separated text file using the following transformation
1 Record.beginSeparator "
1 Record.endSeparator "\r\n
1 Record.fieldSeparator ","
1 singleRecordType Record
3 Transform.ContentType text/plain;name="MGFSPECS.TXT"
2 swap.keyName content-type
2 swap.keyValue text/plain
This mail adapter was working fine, earlier. I am not sure, why this is resulting in issues ?
Truly, appreciate any kind of help in gettint this resolved.
Thanks
Manohar Dubbaka -
Hi All,
We are getting this error in Sender Mail adapter.
"exception caught during processing mail message; java.net.ConnectException: A remote host refused an attempted connect operation"
It is a (Lotus Notes) Mail to File scenario.
Used POP3, and gave the URL as POP:// ** .
I have tried pinging the server and getting a good response.
I have also tried the OS01 ans it returned a response : Program Terminated.
I am not sure if the POP3 port is enabled.
Are there any check points we are missing ?
Please throw some light on this as we need to solve this asap ..
Yashwanth
Edited by: YashwanthSVK on Aug 2, 2011 7:18 PMShabarish is right.
This seem a connectivity issue. Try to ping Mail server from your PI System and check pop3 port.
This document can be helpful for you:
http://wiki.sdn.sap.com/wiki/display/XI/SMTPConfigurationinSAPXI -
Mail adapter issue with mail attachment
Hi all,
I have a scenario mail to file and i have a problem.
Is it possible, in a sender adapter mail to use the option keep attachment and mail package at the same time ?
So,is it possible to use the module payloadswapbean and XMLanonymizer in a sender adapter mail in order to suppress a namespace from the attachment in it ?
Is the option mail package useful if i am using payloadswapbean module ?
from what i see, It seems that the XMLanonymizer doesn't work for sender mail adapter with attachment. I've tested the configuration on a sender adapter file and works fine.
Anyone already tested it ?
Thanks,
Jean-Philippe
Edited by: Jean-Philippe PAIN on Feb 9, 2010 5:29 PMHi Stefen,
Thanks for the answers.
The question is, whether the payloadswapbean is useful at all in a sender mail scenario.
I don't understand this one ! Isn't mandatory in sender adapter mail scenario if you want to read your mail attachment ?
Yes. If you configure the payloadswapbean correct, the XMLanonymizer works on the attachment.
It is not easy to set the payloadswapbean in a correct way. IPost your parameters here, when it does not work for you.
Ok. Maybe my configuration is wrong, please tell.
Processing sequence :
localejbs/AF_Modules/PayloadSwapBean => 0
localejbs/AF_Modules/XMLAnonymizerBean => 1
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean =>mail
module configuration :
swap.keyName =>Content-Disposition
swap.keyName => Content-Description
swap.keyValue=>MailAttachment-1
swap.keyValue=>attachment;filename="MailAttachment-1.xml"
anonymizer.acceptNamespaces =>http://namespace ''
anonymizer.quote => ''
I am on PI 7.1 version and when i am looking in the monitoring(sxmb_moni), it doesn't seems working.
Thanks,
Jean-Philippe
Edited by: Jean-Philippe PAIN on Feb 10, 2010 10:36 AM -
Dear All,
I am facing a problem in my Scenario . I have configured sender mail adapter and the mail gets picked from the Mail Box.
But the problem is in the content field i get something like '=20'. I analysed it and checked that whenever a space or a enter key is pressed when writing a mail then in XI it gets converted to =20.
The problem is when the data goes to target system CRM it goes as =20.
Can anyone let me know how can we take care of the same.The problem is with the Content field which gives characters =20 .
Format as below
<xim:Mail xmlns:xim="http://sap.com/xi/XI/Mail/30">
<Subject>test</Subject>
<From>test123@test</From>
<To>test12233</To>
<Content_Type>text/plain;charset="us-ascii"</Content_Type>
<Date>2008-09-22T09:47:40Z</Date>
<Message_ID></Message_ID>
<Content>=20Dear CRM team=20=20Please find below mails kindly check =20Regardsxyz=20=20.</Content>
</xim:Mail>Hi! Amit,
This is Amar Srinivas Eli. Give me your E Mail ID so that I will send you one document regarding FIle To Mail Scenario Adapter which I did a test scenario successfully and also I hope it will be useful to you.
Also please make sure as
Transfer Protocol SMTP
Message Protocol XI PAYLOAD
Also select the option in radio button as Keep Attachments
Regards
Amar Srinivas Eli...
Note: Kindly POints if useful.... -
I am trying FILE-TO-MAIL ADAPTER senorio
I have file contains following data(more than one row data in file)
emailaddress,subject, content
I used receiver Data type
https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
If text file is only one record it is sending mails as mail defininition is 1..1 in ximail30_xsd
I changed the mail definition in ximail30_xsd to 0...unbounnd and recreate the external definition andcreated interface based on external definition.
I am getting validation error.
please advice me.Hi,
><i>I changed the mail definition in ximail30_xsd to 0...unbounnd and recreate the external definition andcreated interface based on external definition.</i>
Maybe you can consider using MultiMapping to send the multiple Mails out of XI.
/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible
Is this what you want?
Regards
Bhavesh -
Receiver mail adapter - Payload as a Text attachment
Hi,
In my proxy to mail adapter scenario, when i want to send payload to email as a Text email, where i need to content conversion in XI (XML to Txt file)
when i send payload, currently i am receiving as a XML file.
I try to follow like Rushikesh Deshmukh XI thread: Text Attachment in Mail Adapter in XI forum(topic)
I have having following config
Processing Sequence
localejbs/CreateAttachment Local Enterprise Bean XML2Plain
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration
XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion
XML2Plain Transform.ContentType text/plain;charset=utf-8
XML2Plain xml.Header1000.fieldFixedLengths 100,10,10,30,30,80,80,20,10,10,20,20,30,10,18,240,10,30,18,10
XML2Plain xml.Header2000.fieldFixedLengths 100,30,40,240
XML2Plain xml.addHeaderLine 0
XML2Plain xml.conversionType StructXML2Plain
XML2Plain xml.recordsetStructure Header1000,Header2000
Please suggest some solution."
Could you tell me exactly where i need to do all these setting and
do i need import localejbs/CreateAttachment Local Enterprise Bean XML2Plain...I mean shall i add same in my processing sequence
give in detail ? (in Receiver mail adapter Communication channel, advanced mode additional parameters)
I tried to follow this also
http://help.sap.com/saphelp_nw04/helpdata/EN/4e/c153426da9bd30e10000000a155106/frameset.htm
but i could not find much info on this help.sap.com reg. req.
Thanks
PrabaharanHi
f i create like this Receiver CC (module Tab)
number: 1
Module Name: localejbs/CreateAttachment
Module Type: Local Enterprise Bean
Module Key: mail
is it enough? do i need any other setting like this
Did you deployed CreateAttachment on PI server. As this is not a standard SAP module this is a custom module?
mail as module key is already used by XIMAILAdapterBean use some other key for CreateAttachment
Settings are fine for the Module
Processing Sequence
localejbs/CreateAttachment Local Enterprise Bean XML2Plain
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local Enterprise Bean mail
Module Configuration
XML2Plain Transform.Class com.sap.aii.messaging.adapter.Conversion
In this:
Module Key: XML2Plain
Parameter Name: Transform.Class
Parameter Value: com.sap.aii.messaging.adapter.Conversion
is it right?
Processing sequence is fine
XML2Plain Transform.ContentType text/plain;charset=utf-8
XML2Plain xml.Header1000.fieldFixedLengths 100,10,10,30,30,80,80,20,10,10,20,20,30,10,18,240,10,30,18,10
XML2Plain xml.Header2000.fieldFixedLengths 100,30,40,240
XML2Plain xml.addHeaderLine 0
XML2Plain xml.conversionType StructXML2Plain
XML2Plain xml.recordsetStructure Header1000,Header2000
can i anyone explain how to these settings?
Is this key valid to provide inputs to the module check with the code for this module
This looks like valid for MessageTransformBean ro StrictXMLtoPlainBean
Thanks
Gaurav
Edited by: Gaurav Bhargava on Oct 15, 2008 5:34 AM -
File name issue in mail adapter attachement.
HI all,
i built a scenario proxy to mail in which the data will be sent as attachement to the mail id coming from proxy it self.
I added the transform bean and xi mail adapter bean correctly..
The scenario is working fine without errors...
however the issue is. i have given the file name in for module key :
Transform = Transform.ContentDisposition = attachement;filename="xyz.csv"
but while testing the attachement is coming as "untitled.txt"
i need the attachement to be named as "xyz.csv" only.
where went wrong ...please give ur inputs.
Thanx.Hi Kiran
Then there is no need to use Transformation bean for this
In Mapping map the mail package Content_type field with
text/plain;name="xyz.csv"
and select mail package and keep attachments in receiver mail adapter
This will work
Thanks
Gaurav -
Mail Adapter: original Attachment filename retrieval in Proxy
Hi,
I have a Sender Mail Adapter, and the receiver is a proxy, where I need to get the attachment and its details.
When I execute
attachment_filename = l_attachment->GET_DOCUMENT_NAME( ).
it simply returns Attachment-1 etc.
How do I get the original attachment filename?
I am on SP16.
Regards,
Puloma.HI
Please refer tihs thread for mail attchments
Re: Handling attachments of mail
Scenario to pick the mail with its attachments into XI\Re: Infrastructure required for Mail Adapter -
Mail adapter and MessageTransformBean module configuration issue
Hi All,
I am trying to use module configuration in Receiver Mail adapter. Below is my configuration. (We are using SAP PI 7.11)
Parameter/General tab:
Message Protocol : XIPAYLOAD
Use Mail package option is selected.
Content Encoding = none
Module tab:
Processing Sequnce:
AF_Modules/MessageTransformBean : XSLT
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean : mail
Module Configuration:
XSLT Transform.Class com.sap.aii.af.sdk.xi.adapter.XSLTConversion
XSLT Conversion.XSLTFileName /tmp/GL_POST_RESPONSE_EMAIL.xsl
XSL works outside of PI . However, when i test with a message, I am seeing following errors in Runtime workbench:
Please let me know what could be wrong in the above configuration
23.03.2011 15:24:39 Information MP: processing local module localejbs/AF_Modules/MessageTransformBean
23.03.2011 15:24:39 Information Transform: using Transform.Class: com.sap.aii.af.sdk.xi.adapter.XSLTConversion
23.03.2011 15:24:39 Error Transform: Transformer Conversion1.0.0610 Error initializing XSLT Mode:; caused by javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
23.03.2011 15:24:39 Information Transform: transforming the payload ...
23.03.2011 15:24:39 Error Transform: failed to execute the transformation: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable templates
23.03.2011 15:24:39 Error MP: exception caught with cause com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable 'templates'
23.03.2011 15:24:39 Error Adapter Framework caught exception: Error converting Message
23.03.2011 15:24:39 Error Delivering the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message; nested exception caused by: java.lang.NullPointerException: while trying to invoke the method javax.xml.transform.Templates.newTransformer() of an object loaded from local variable 'templates'.Hi All,
Issue has been resolved. There was some minor issue in the XSL. The XSL Stylus studio was not reporting this as an error. However PI's XSL engine was reporting that error. This error message was not showing up in runtime workbench. However, when i looked at the default trace, there were few more errors. After fixing the XSL, I am able to received the email
Thanks
-Pradeep -
Hi All,
I wanted to know if it is possible to specify/configure a proxy server for a sender mail adapter communication channel (similar to SOAP adapter)?
Thanks,
Sumant.specify/configure a proxy server
It should not be mandatory to use the proxy server. That usually depends upon the landscape.
Do I need to deploy any certificates on the XI server?
Again, this is not mandatory. Only if you need to configure S/MIME based communication, you need to enter certificate entries in keystore.
Regards,
Prateek -
Receive CSV attachment via Mail Adapter and process into ABAP proxy
Hi,
I have the following scenario:
1. Receive e-mail with CSV attachment
2. Process through Mail adapter (KeepAttachments = Yes in order to retain the CSV attachment)
3. Receive into ABAP proxy (with CSV attachment)
The next step is to read the attachment in the ABAP proxy and process the CSV attachment data into CRM.
The CSV attachment contains the data I wish to process - the body of the e-mail will not contain this information.
The problem I have is reading the attachment data in the proxy - not sure of the methods/class to call - anyone got any ideas ?
Another question is this the best way to do this and process the CSV attachment data ?
I know I could use the PayloadSwapBean to switch the payload to the attachment but then I am stumped with how the attachment is processed through PI 7.1 - how do you transform the CSV format payload into XML so PI will be able to process it through mapping.
Either option is viable - an answer to either question would be great.
1. How do you read the attachment data in an inbound ABAP proxy ?
2. How do you transform the CSV attachment data after the PayloadSwapBean from CSV to XML ?
Kind regards
Colin.Hi Colin
As you are not interested in processing the body of email. Swap the payload to the attachment using the PayloadSwapBean
Change the content from CSV to XML using MessageTransformBean. Now pass this information to Proxy. You dont need to deal with attachments in proxy.
It is not possible to read attachment in server proxy because the class and interface you create will not have data type which can refer to an attachment processing interface in ABAP.
Thanks
Gaurav -
Mail adapter = XI = CRM (using Proxy)
Hi All,
I have to pull several mailboxes using a sender mail adapter. The mails are automatically generated, containing:
mailfrom, mailto, subject, body and 1 attachment.
I need to save the data (mailfrom,mailto,subject,body,filename) into a table in SAP-CRM and I need to store the file on the application server.
I can successfully map the mailinfo (mailfrom,mailto,subject,body) using the ximail_30.xsd; the problem comes with the attachment.
When the message comes in I got 2 payloads (MailMessage en MailAttachment-1 (base64))
My question now is, how do I have access (in XI or a step further in the Proxy) to the Attachment (filename and content) so I can map it to a structure (XI) or save it within the Proxy, without converting it in XI.
thanks in advance,
Andre.Michal,
Thanks for your response.
I saw your weblog, but I wonder, if I swap the payload, I'll be missing the rest of the mail (like mailfrom, mailto, subject and content) ?
I just can't believe that I can't access the 2nd payload in the message...
thanks again and regards,
Andre. -
Conversion Agent - Mail Adapter integration issue
Hi Experts,
I have a Conversion Agent Serializer for generating a text file on the receiver side.
The Serializer works perfectly with the File Adapter on the receiver
side and generates the text file.
Now I have a requirement to send this file as an attachement in an email.
When I include the Serializer Module in the File Adapter
(Receiver), the email is not triggered.
The Communication Channel Monitoring shows the following:
2007-04-29 07:34:55 Success Message successfully received
by messaging system. Profile: XI URL:
http://bibox01:50000/MessagingSystem/receive/AFW/XI Credential (User):
PIISUSER
2007-04-29 07:34:55 Success Using connection
Mail_http://sap.com/xi/XI/System. Trying to put the message into the
receive queue.
2007-04-29 07:34:55 Success Message successfully put into
the queue.
2007-04-29 07:34:55 Success The message was successfully
retrieved from the receive queue.
2007-04-29 07:34:55 Success The message status set to DLNG.
2007-04-29 07:34:55 Success Delivering to channel:
FIle_Mail
2007-04-29 07:34:55 Success MP: entering
2007-04-29 07:34:55 Success MP: processing local module
localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean
2007-04-29 07:34:55 Success TransformationName:
TravelexBAI_Serializer
2007-04-29 07:34:56 Success CM_Transformation_succeeded
2007-04-29 07:34:56 Success MP: processing local module
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
2007-04-29 07:34:56 Success Mail: message entering the
adapter
2007-04-29 07:34:56 Success Mail: Receiver adapter entered
with qos ExactlyOnce
2007-04-29 07:34:56 Success Mail: calling the adpter for
processing
2007-04-29 07:34:56 Success Mail: call completed
2007-04-29 07:34:56 Success Mail: continuing to response
message 4ee64c80-f5d0-11db-8932-000bcdcf4920
2007-04-29 07:34:56 Success Mail: sending a delivery ack
2007-04-29 07:34:56 Success Mail: sent a delivery ack
2007-04-29 07:34:56 Success MP: leaving
2007-04-29 07:34:56 Success The message was successfully
delivered to the application using connection
Mail_http://sap.com/xi/XI/System.
2007-04-29 07:34:56 Success The message status set to DLVD.
The Audit log above states that the Serializer was executed successfully
and the the Mail Adapter was called.
The Message Content shows the Payload being generated correctly. But the
Email is still not triggered.
Could someone please provide some help with pinpointing the issue over here.
Michael, are you there??
Thanks & Regards,
ShobhitHi Ahmad,
The mail adapter works perfectly fine when I remove the Conversion Agent module from it. And the Conversion Agent module works perfectly fine with the File Adapter on the receiver side. So that authenticates that both the objects (Mail Adapter - receiver & Conversion Agent Serailizer module) are configured correctly as individual objects.
I have used the following parameters in the receiver mail adapter:
PARAMETERS
Transport Protocall: SMTP
Message Protocall: XIPAYLOAD
URL: smtp://xyz.com
Content Encoding: Base64
Keep Attachments: <TICKED>
MODULE
Processing Sequence==>>
Module Name: localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean
Type: Local EJB
Module Key: 1
Module Configuration==>>
Module key: 1
ParameterName: TransformationName
Parameter Value: <SerializerServiceName>
Regards,
Shobhit -
Proxy (XI) Adapater vs Mail adapter
Hello All
Is it possible to configure an XI sender communication channel with a Receiver mail adapter communication channel.
I have read the blogs and the forums regarding mail and proxy adapter ?
Have someone performed this scenario yet ?
Please let me know and send me specific details regarding it .This is what I want :
The secario will use xi adapter and mail adapter.
The xi adapter will be the sender and the mail adapter will be the receiver.
With my abap proxy I will read the information of two fields and I will send this
this information by mail to the mail adapter.
Many thanks
Maybe you are looking for
-
When my daughter was small, I set up a single iTunes account that we both could use. Now, years later, she has amassed thousands of songs and apps that I have no interest in. Is there a way to set up a separate iTunes account for her and move her mus
-
[Solved] Network doesn't work after hibernate?
Hello! This is my first legit Linux install so excuse me if I'm a bit slow. I installed Arch last night and everything went smoothly. However, after I tested out hibernate on my machine, the network doesn't seem to work. Just prior to the hiberna
-
Lock NOT set for: Archiving the data from a data target
Dear Expert, I try to archive one of my info cube, when i start to write the Archive file the Free Space in the Archive folder not enough and it make the process error. Then i try to changes the Archive folder to another path with enough free space.
-
Hi, I have a application where i need to display Name for all the service application. Specifically i need to get the size of user profile service application and Managed metadata service application name. Please guide me. :) Thanks and Regards: Sanj
-
DW8 text not visible in design view
I have imported a site from DWMX(6?) to DW8. In DWMX everything is visible in design view. In DW8 the text is NOT visible in design view unless I switch off rendering using CSS (Display Styles Off), but displays fine in a browser. If I switch off ren