Mail Adapter - Attachment - orig msg + converted after mapping

Hello,
can somebody give me a little bit adivce. I have to send an email where the original message will be in the attachment and the message that will be the output of the message mapping.
=> getting the converted one into the mail body is not a problem but how can I access the other one in order to attach it?

Hi Marco,
Kindly go through the below mentioned Blog, I think this will help you.
/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Regards,
Sarvesh
****Reward Points, if found helpful.

Similar Messages

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • Sender mail adapter - attachment name

    Hi there
    We have configured a sender email adapter to receive text/csv attachments and save them to a file system. What we are having a problem with is reading the attachment name. So we are using Dynamis Configuration to create the file name using the subject line - Which is not ideal. Ideally we would like to use the same name as the origianl attachment but haven't found any way of doing that. We even tried using Content-type in the Variable Header (XHeaderName1) suing variable transport binding but it doesn't show up in the Dynamic Config part of the SOAP message.
    Is there any way of reading the name of the file attachment? We are on PI release 7.0.
    Any help would be appreciated.
    Cheers
    Salil

    Hi Vitor
    There are 2 scenarios that I can think of -
    1. You are saving the email attachment as a file. In that case use step 3 in the earlier reply to get the attachment name and save the file witht that name.
    2. You are sending the XML straight to a receiver using HTTP, IDOC, JDBC etc. in which case you would need the attachment name much earlier that step 3. For that I guess you would have to write another adapter module on the sender mail adapter(at Position 3 where position1 = payloadswap bean, 2 = custom module to get the attachment name) and add an xml tag to your incoming message. These adapter modules are really powerful and are like user exits in ABAP. In that case you would have to change the Data Type in the Integration repository to reflect that extra tag. Here is some code from a module we wrote to totally change the structure of the xml coming in. The key thing to remember is this module is that you can read the whole message byte by byte. There might be smarter ways of doing it (like using the SAP XML parser factory class) but since I'm not a Java programmer I stuck to the basics. Here's the code( you could also look at the example given in sap help where they remove (or add I'm not sure) CR(carriage return) from CRLF (CR Line feed).
    Created on Aug 8, 2007
    To change the template for this generated file go to
    Window>Preferences>Java>Code Generation>Code and Comments
    package jdbcPackage;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    @author Salil.Mehta Soltius NZ Ltd
    To change the template for this generated type comment go to
    Window>Preferences>Java>Code Generation>Code and Comments
    public class jdbcClass implements SessionBean, Module {
         private SessionContext myContext;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              //        put your code here
              try {
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   XMLPayload payload = msg.getDocument();
                   String payEnc = payload.getEncoding();
                   byte[] payByte = payload.getContent();
                   byte[] payByteOut = new byte[payByte.length];
                   byte[] payByteTemp = new byte[payByte.length];
                   int i;
                   int j;
                   int actualCount = 0;
                   char xmlTagFound = ' ';
                   char endXmlTagFound = ' ';
                   char tagFound = ' ';
                   System.arraycopy(payByte, 0, payByteTemp, 0, payByte.length);
                   // Step 1 - Conversions 
                   // convert   "&lt; to <"    and     "&gt; to >"
                   // convert   &quot; to "
                   // This will remove any carriage returns and line feeds
                   // and the <XML* and </XML* tags plus the <row> and </row> tags
                   for (i = 0; i < payByte.length; i++) {
                        // convert   &lt; to <    and     &gt; to >
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'l') {
                                  if (payByteTemp[i + 2] == 't') {
                                       if (payByteTemp[i + 3] == ';') {
                                            payByteTemp<i> = '<';
                                            payByteTemp[i + 1] = '\n';
                                            payByteTemp[i + 2] = '\n';
                                            payByteTemp[i + 3] = '\n';
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'g') {
                                  if (payByteTemp[i + 2] == 't') {
                                       if (payByteTemp[i + 3] == ';') {
                                            payByteTemp<i> = '>';
                                            payByteTemp[i + 1] = '\n';
                                            payByteTemp[i + 2] = '\n';
                                            payByteTemp[i + 3] = '\n';
                        if (payByteTemp<i> == '&') {
                             if (payByteTemp[i + 1] == 'q') {
                                  if (payByteTemp[i + 2] == 'u') {
                                       if (payByteTemp[i + 3] == 'o') {
                                            if (payByteTemp[i + 4] == 't') {
                                                 if (payByteTemp[i + 5] == ';') {
                                                      payByteTemp<i> = '"';
                                                      payByteTemp[i + 1] = '\n';
                                                      payByteTemp[i + 2] = '\n';
                                                      payByteTemp[i + 3] = '\n';
                                                      payByteTemp[i + 4] = '\n';
                                                      payByteTemp[i + 5] = '\n';
                        // This will take in the initial xml declaration from the Byte array
                        // And we also don't want the stuff after the xml declaration till
                        // we reach the first <row> tag     
                        if (xmlTagFound == ' ') {
                             if (payByteTemp<i> == '>') {
                                  xmlTagFound = 'X';
                             payByteOut[actualCount++] = payByteTemp<i>;
                             if (xmlTagFound == 'X') {
                                  payByteOut[actualCount++] = '\r';
                             continue;
                        if (xmlTagFound == 'X') {
                             if (payByteTemp<i> == '<') {
                                  if (payByteTemp[i + 1] == 'r') {
                                       if (payByteTemp[i + 2] == 'o') {
                                            if (payByteTemp[i + 3] == 'w') {
                                                 if (payByteTemp[i + 4] == '>') {
                                                      xmlTagFound = 'Y';
                                                 } else {
                                                      continue;
                                            } else {
                                                 continue;
                                       } else {
                                            continue;
                                  } else {
                                       continue;
                             } else {
                                  continue;
                        // Carriage return and line feed
                        if ((payByteTemp<i> == '\r') || (payByteTemp<i> == '\n')) {
                             continue;
                        // <XML_*> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == 'X') {
                                  if (payByteTemp[i + 2] == 'M') {
                                       if (payByteTemp[i + 3] == 'L') {
                                            tagFound = 'X';
                                            endXmlTagFound = ' ';
                                            continue;
                        // </XML_*> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == '/') {
                                  if (payByteTemp[i + 2] == 'X') {
                                       if (payByteTemp[i + 3] == 'M') {
                                            if (payByteTemp[i + 4] == 'L') {
                                                 tagFound = 'X';
                                                 endXmlTagFound = 'X';
                                                 continue;
                        // <row> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == 'r') {
                                  if (payByteTemp[i + 2] == 'o') {
                                       if (payByteTemp[i + 3] == 'w') {
                                            if (payByteTemp[i + 4] == '>') {
                                                 tagFound = 'X';
                                                 continue;
                        // </row> tag
                        if (payByteTemp<i> == '<') {
                             if (payByteTemp[i + 1] == '/') {
                                  if (payByteTemp[i + 2] == 'r') {
                                       if (payByteTemp[i + 3] == 'o') {
                                            if (payByteTemp[i + 4] == 'w') {
                                                 if (payByteTemp[i + 5] == '>') {
                                                      tagFound = 'X';
                                                      continue;
                        if ((payByteTemp<i> == '>') && (tagFound == 'X')) {
                             tagFound = ' ';
                             continue;
                        if (tagFound == ' ') {
                             if (endXmlTagFound == 'X') {
                                  continue;
                             payByteOut[actualCount++] = payByteTemp<i>;
                   byte[] payByteExp = new byte[actualCount];
                   System.arraycopy(payByteOut, 0, payByteExp, 0, actualCount);
                   payload.setContent(payByteExp);
                   msg.setDocument(payload);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
              return inputModuleData;

  • Problem Mail-Adapter attachment with specified name

    Hi,
    We have the following scenario:
    We have some EDIFACT-suppliers which we have to connect over Mail-adapter.
    We have to fullfill several specifications by sending the mail.
    So we have to create a specific filename for the EDI-attachment and the subject. Therefore I used the adapterspecific attribute THeaderSUBJECT, which we set in Mapping. This works fine.
    Now the problem: We have to send only the payload-document as attachment of the mail with the same name as the subject of the mail. So we can't use the keep-attachment flag because then all attachments of this message would be sent in the mail.
    How is it possible to send only the payload as attachment without any other documents and with specified filename in the attribute THeaderSUBJECT?
    Has anybody an idea how to solve this problem?
    Regards
    Thorsten

    Hi,
    I have found a solution.
    In a new module I copy the original paload to the payload of a new message object without attachments.
    After calling this module I call the standard module MessageTransformBean to transform the payload into the attachment of the message.
    Here the code of my module:
    String fileName = msg.getMessageProperty("http://sap.com/xi/XI/System/Mail","THeaderSUBJECT");
    // Generate new message object
    Context ctx = new InitialContext();
    ConnectionFactory cf = (ConnectionFactory) ctx.lookup(com.sap.aii.af.ra.ms.api.ConnectionFactory.JNDI_NAME);
    MessageFactory factory = cf.createMessageFactory("XI");
    Message msgnew = factory.createMessage(msg.getFromParty(),msg.getToParty(),msg.getFromService(),msg.getToService(), msg.getAction());
    msgnew.setConversationId(msg.getConversationId());
    msgnew.setDeliverySemantics(msg.getDeliverySemantics());
    msgnew.setCorrelationId(msg.getMessageId());
    msgnew.setMessageProperty("http://sap.com/xi/XI/System/Mail","THeaderSUBJECT",fileName);
    String contentType = new String("text/plain;name="" + fileName + """);               
    // Copy original message to the new message
    XMLPayload payload = (XMLPayload)(msg.getDocument());
    payload.setContentType(contentType);
    payload.setDescription("file");
    payload.setName(fileName);
    msgnew.setDocument(payload);
    Now it works like it should work.
    Regards
    Thorsten

  • Sender Mail Adapter Attachment

    Hi All
    The mail I get from the 3rd party has a body and attachment. I have done the TRANSORM module as described in some of the forums, and then the Plain2XML.
    On sxmb_moni I see the MailMessage and MailAttachment-1, where the MailMessage is in XML format and MailAttachment in normal text. What should I do to completely ignore the MailMessage(body of the mail) and just send MailAttachment to the receiver.
    I have tried to split the message to two receivers, but because the attachment message does not transform to xml, it gives me a mapping error. Is there anyway I can either ignore the body and just send the attachment to the receiver without doing JAVA code.
    Thanks in advance
    Clinton

    Hi Jin
    Thanks for your answer.
    This is how I am using the module within the Sender Mail Adapter.
    localejbs/AF_Modules/PayloadSwapBean           TRANSFORM
    localejbs/AF_Modules/MessageTransformBean     Plain2XML
    TRANSFORM     swap.keyName     Content-Description
    TRANSFORM     swap.keyName     Content-Disposition
    TRANSFORM     swap.keyValue     attachment;filename="MailAttachment-1.xml"
    TRANSFORM     swap.keyValue     MailAttachment-1.xml
    Plain2XML     Transform.Class          com.sap.aii.messaging.adapter.Conversion
    Plain2XML     Transform.ContentType     text/xml;charset=utf-8
    Plain2XML     xml.conversionType     SimplePlain2XML
    Plain2XML     xml.documentName     MT_TEBA_Contractor_Details
    Plain2XML     xml.documentNamespace     http://lonmin.co.za/TEBA_to_SAP
    Plain2XML     xml.fieldNames          ENG_TYPE,INDUST_NO,COMPANY_NUMBER,SURNAME,INITIALS,NAME,REGISTERED,MALE,EXPERIENCE,RACE,MARITAL,DEPENDENTS,BIRTH_DATE,LANGUAGE,EDUCATION,SPOUSE,RELIGION,OFFICE,SERIAL_NO,REG_YEAR,SERV_START,SERV_EXPIRE,SERV_PER,LAST_CHANGE_DATE,LAST_CHNAGE_TIME,ID_DOC,ID_EFF_DATE,ID_EXP_DATE,PASSPORT,PASS_EFF_DATE,PASS_EXP_DATE,COUNTRY,DISTRICT,ADDR1,ADDR2,ADDR3,POSTCODE,PHONE,BI_1733_NO,REASON
    Plain2XML     xml.fieldSeparator     |
    Plain2XML     xml.processFieldNames     fromConfiguration
    Plain2XML     xml.structureTitle     Details
    Using it like this it does not do the swap correct and it still put the data within the body as xml, and leave the attachment as txt.
    Can you see something wrong here.
    Thanks
    Clinton

  • Mail Adapter - attachment file?

    Hi,
    I use the Mail Adapter (XIPAYLOAD) in order to send an email from XI to a Mail Server (Lotus Notes); but content of my email is inside an attachment file.
    If I choose "keep attachement", then I have an attachement file with "xxxx<b>.xml</b>".
    e.g: [email protected]
    If I don't choose "keep attachment", then I have an attachement file with "xxxx<b>.dat</b>".
    e.g: att4a5o8.dat
    Is there a solution to have the content directly in the email and not inside an attachement?
    And is it possible to change the file name?
    Regards
    Mickael.

    Use the Option 'Use Mail Package'. In this case the message will be sent out inside the mail.
    The mail package is a special message type you have to provide to the mail adapter. You have to do a mapping from your message to the mail package message type.
    Here is a sample XSLT for creating a mail package out of any XML Message:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output method="xml" indent="yes" />
      <xsl:template match="*">
        <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
          <Subject>Hallo</Subject>
          <From>[email protected]</From>
          <To>[email protected]</To>
          <Content><xsl:copy-of select="/"/></Content>
        </ns:Mail>
      </xsl:template>
    </xsl:stylesheet>
    Regards
    Stefan

  • 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 and fault msg

    hai
         in case of error messages while mapping , how it can be captured and how it can be send through mail adapter .
        whether we can use fault msg for the above requirement. what is the use of fault messages?

    Tamil,
    The best thing would be create alerts for both the mapping and adapter alerts. If there is any mapping failure then an email will be send to you. With adapter alerts if there any errors on adapters it will send you a mail. You dont need a fault message for it.
    Check this weblogs for creating alerts:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--step-by-step
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    ---Satish

  • XI - Sender mail adapter - attachment as payload

    Hi,
    My scenario is Email -> XI-> ...
    I am trying to send an email with an attachment. I want to XI process only the attachment as the payload.
    How do I do ? What is the communication channel configuration ?
    Thanks,
    Nicolas.

    Hi Nicolas,
    just have a look at my weblog:
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    it describes step by step what you want;)
    Regards,
    michal

  • Mail adapter attachment

    HI Guys,
           While i am sending mail as an attachment in mail adapter, taken Transport protocall  'XIpayload' and click as attachment.
    So i am getting attachment in 'XML' format but i need it in CSV format. Can you help me to change it to CSV format -mail attachemnt. Thanks.
    Regards,
    vasu

    Hi Vasudeva,
    You can check this document for the same:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c73884a3789
    Also you can use Payload swap bean. Check this document and help on this:
    https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/d0964d7c-e66e-2910-24bb-ac535e4a5992&overridelayout=true
    http://help.sap.com/saphelp_nw04/helpdata/EN/2e/bf37423cf7ab04e10000000a1550b0/content.htm
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    But I didnot find MIME type/subtype for csv file, in this url:
    http://www.iangraham.org/books/html4ed/appb/mimetype.html
    Using this url only he has send as word or excel. See this blog:
    /people/community.user/blog/2006/09/07/email-reporting
    https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    But instead as in abhishek thread try to create the xls file and then name it as .csv. Worth giving a try.
    Regards,
    ---Satish

  • Mail adapter- Attachment file name of scheme ddmm

    Hi ,
    I am working on File to Mail scenario.
    I checked on SDN, but I could not find exact solution.
    My requirement is :
    I need to mail HTML report file as attachment.
    To generate attachment file, I have done XSL mapping.
    Attachment file name should be : yyyymmdd.htm
    Mail text should be: This is autogenerated mail, please do not reply.
    Mail subject: SAP XI report ddmmyyy
    Please provide your inputs.
    Best Regards,
    Divyesh

    Hi Henrique,
    Thanks a lot for your response.
    Your answer is very helpful.
    I tried your code.
    I am getting error in RWB:  here I am including audit Log:
    2009-04-02 17:39:41 Success MP: Entering module processor
    2009-04-02 17:39:41 Success MP: Processing local module localejbs/CreateAttachment
    2009-04-02 17:39:41 Success MP: Processing local module localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    2009-04-02 17:39:41 Success Mail: message entering the adapter
    2009-04-02 17:39:41 Success Mail: Receiver adapter entered with qos ExactlyOnceInOrder
    2009-04-02 17:39:41 Success Mail: calling the adpter for processing
    2009-04-02 17:39:42 Error Mail: call failed; java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Success Mail: sending a delivery error ack ...
    2009-04-02 17:39:42 Success Mail: sent a delivery error ack
    2009-04-02 17:39:42 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Exception caught by adapter framework: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>
    2009-04-02 17:39:42 Error Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.io.IOException: Missing mandatory element <sap:Manifest><sap:Payload><sap:Name>.
    2009-04-02 17:39:42 Success The message status set to WAIT.
    Can you please provide me help on this?
    Best Regards,
    Divyesh

  • Email attachment name in sender mail adapter to the receiver file adapter

    HI ,
    Ths is regarding email to file scenario. I am trying to create file (in rceiver file adapter) with the same name as the email attachment that i read from mail sender adapter. I want ro use adapter module for this. I could find from blogs that there is module - GetAttachmentName - available that i can use for this in sender mail adapter.
    Can you please let me know what whetehr i neeed to mention any module key and parameters for this.
    I assume , i need to do following steps :Please confirm.
    1. i can use this module - after payload swap module and before standard mail adapter module in sender mail adapter
    2. select ASMA option in advanced tab in sender mail adapter
    3. In receiver file adapter select ASMA option in advanced tab in sender mail adapter
    4. Also select file name option in ASMA in sender mail adapter
    Thanks,
    Vamsi

    Hi Vamsi,
    your scenario is also described here: Re: sender mail adapter - attachment name
    If you use the Module getAttachmentName, which is described here,
    http://wiki.sdn.sap.com/wiki/display/XI/AdapterModulePI7.0GetAttachmentName
    your scenario should work as you described it.
    You just need to make sure that the Attachment Name that you read in the first place, is mapped to the Filename Attribute of the
    Fileadapter (http://sap.com/xi/XI/System/File/FileName).
    regards,
    Daniel

  • Mail_Receiver: Send Mail with attachment

    Hi everybody,
    I need some help. I want to send a mail with attachment.
    for this I have imported SAPs xsd for the mail adapter.
    I wonder how to map the target fields?
    The following causes five! attachments in SXMB_MONI and the adapter throws
    java.lang.IllegalArgumentException: can't parse argument number
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
             <Subject>SubjctName</Subject>
             <From>mailadress</From>
             <To>mailadress</To>
             <Content_Type>text/plain; charset=&quot;ISO-8859-1&quot;</Content_Type>
             <Content_Description>
                <attachment filename="filename.txt">This should be the content of the attachment</attachment>
             </Content_Description>
             <Content>Constant</Content>
          </ns1:Mail>
       </ns0:Message1>
    </ns0:Messages>
    How do I have to foll the target fields?
    Thanks regards
    Mario

    Hi
    the following links may help you :
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/b4a6490a08cd41a8c91759c3d2f401/content.htm
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    Also reffer to the below mentioned thread;
    Regarding mail sent with an excel attachment
    Regard's
    Chetan Ahuja

  • MessageTransformBean bean Question Receiver Mail Adapter

    localejbs/AF_Modules/MessageTransformBean Local EnterpriseBean transform1
    localejbs/AF_Modules/MessageTransformBean Local EnterpriseBean transform2
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EnterpriseBean mail
    Module Config:
    transform1 Transform.ContentDisposition attachment;filename="sample.csv"
    transform1 Transform.ContentType text/plain; name="sample.csv"
    transform2 Transform.ContentDescription file1
    transform2  Transform.ContentDisposition inline
    Email body is coming fine but the attachment Name not getting changed to "sample.csv"
    What am I doing Wrong. Experts any advice please ?.

    Hi,
    have a look into this thread where similar issue is discussed
    Re: Mail adapter- Attachment file name of scheme ddmm
    If the requirement is just to have the dynamic name for your email attachment, it can be done using mail package. check this wiki
    http://wiki.sdn.sap.com/wiki/display/SI/DynamicEmailAttachmentnameforReceivedMails
    we have to choose the options 'use mail package' and 'keep attachments' in the receiver email adapter.
    regards,
    francis

  • 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
    Sujan

    Hi,
    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

Maybe you are looking for

  • Wi-Fi authentication issues since update to android 5.0.2

    Hi Everyone, after updating my Xperia Z3 Compact to Android 5.0.2 version I can no longer connect to my wi-fi domestic network. Does anybody know how to help me, please? I must admit that Xperia customer care is not working properly.. Thanks in advan

  • Touch can not be read from or written to

    After upgrading to iTunes 7.7.1 and iPod 2.0, I can not sync at all anymore. I get an error window telling me that my sync failed because my iPod Touch can not be read from or written to. I applied the "5 Rs" troubleshooting tips, to no avail. (5 Rs

  • How to get disc repair with recovery disc assistance

    how do i get my mac to work. i have make a usb recovery disc. witch the mac mini recognize. after that it opens the disc utilty function. get to the disc info. but i can gt the repair function to work or to verify..... please need help. if aal fail t

  • Unstable server ENV after upgrade to Forte 30M2.

    We are running Forte 3M2 clients and server in our test environment with clients on NT and server on Solaris 2.6. Eversince the upgrade from 3L to 3M we have been having an unstable environment that does not remain alive for > 10 mins. These are the

  • Trouble with Smart Albums

    I'm trying to create a smart album from within one of my projects.  The criteria I'm trying to use is the "Image Location" found in the IPTC data.  The image city is "Seattle", but when I try to create the smart album, it comes up empty.  No matter w