Not renaming attachment xml file name in receiver mail adapter

Hi,
I receive SOAP from GRC and need send to Partner an email.
I have  SOAP to MAIL scenario where an xml file is picked up and transformed and zipped into the target format in XI which has to be sent as an attachement in an email on the receiver side.
I am getting the mail with the attachement. But I would like to rename the attachment as the name "NFE.XML" and the ZIP File as the name "nfe.zip"
I am using MAIL adapter with Modules above.
Number  Module Name                                                                          Module Type                       Module Key
1             AF_Modules/PayloadSwapBean                                           Local Enterprise Bean        Transform
2             AF_Modules/MessageTransformBean                                  Local Enterprise Bean        ContentType
3             AF_Modules/PayloadZipBean                                                Local Enterprise Bean        zip
4             sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean    Local Enterprise Bean        mail
Module Configuration :
Module Key                           Parameter Name                Parameter Value
Transform                             swap.keyName                 payload-name
Transform                             swap.keyValue                 NFE
ContentType                         Transform.ContentType    application/xml; name="NFe.xml"
zip                                         zip.filenameKey                ContentType
zip                                         zip.mode                           zip
I  am using transport protocol  "XIPAYLOAD" and set  "KEEP ATTACHMENTS"
I have with result example above :
Name from ZIP              :  PayloadName.zipu200E(4KB)u200E
Name from attachment :  PayloadName
Regards,
Ricardo

Hi Shobhit,
The module tab of your mail adapter will look like this.
Processing Sequence
Module Name                                                            Type                                      Module Key
localejbs/AF_Modules/MessageTransformBean   rename LocalEnterpriseBean     
sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  mail     Local EnterpriseBean     
Module Configuration
   Module Key               Parameter Name             Parameter Value
      rename      Transform.ContentDescription                      File
      rename  Transform.ContentDescription  attachement;filename="yourfilename.ext"                                                          
      rename            Transform.ContentType                 application/text;name="yourfilename.ext"
Thanks
Amitanshu

Similar Messages

  • Renaming attachment file name in receiver mail adapter

    Experts,
    I have a file to mail scenario where an xml file is picked up and transformed into the target format in XI which has to be sent as an attachement in an email on the receiver side.
    I am getting the mail with the attachement. But I would like to rename the attachment as the name of the picked up file.
    I am using Adapter specific message attributes on both sides but the attachment is named as untitled.xml.
    Please advise. Can this be achieved by using the swap bean or the message transform bean?
    Regards,
    Shobhit

    Hi Shobhit,
    The module tab of your mail adapter will look like this.
    Processing Sequence
    Module Name                                                            Type                                      Module Key
    localejbs/AF_Modules/MessageTransformBean   rename LocalEnterpriseBean     
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  mail     Local EnterpriseBean     
    Module Configuration
       Module Key               Parameter Name             Parameter Value
          rename      Transform.ContentDescription                      File
          rename  Transform.ContentDescription  attachement;filename="yourfilename.ext"                                                          
          rename            Transform.ContentType                 application/text;name="yourfilename.ext"
    Thanks
    Amitanshu

  • How can i get message id as file name in Receiver Mail Adapter

    Hi All,
               We are working on file to mail scenario. Client requirement is " Attached file name should be the message id" How can we achieve this.
    Thanks & Regards,
    Purshothamm

    Hi,
    To have the file name as message id, I think the below blogs can help you…
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    /people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
    Regards,
    Vijay N

  • How to use XML Anonymizer Module for receiver mail Adapter?

    Hi All,
             I would like to know how to use XML Anonymizer Module for receiver mail adapter so as to change the namespace to http://sap.com/xi/XI/Mail/30 from my original namespace? Thank you all in advance?

    Hi,
    This may help u:
    Replacing one namespace with another using XML Anonymizer Module
    Thanks
    Amit

  • How to keep same sender file name for receiver mail attachement

    Hi,
      i am working with File to Mail scanario. There i want to pick a flat file from native file system and then send it as email attachment. Now i am able to send the file but the flat is getting converted as an xml file. is there any method to keep the same sender file name and type for receiver mail attachment. i am not using any mail package. i am using XI payload and keep attachments.
    Thanks in advance.
    -Siva

    Hi,
    Yes,With out using the mail package u can send the Mail Attachments to the receiver side,
    In that case no need of Integration Repository objects.
    Chck this links.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/community.user/blog/2006/09/07/email-reporting
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    If u dont get ur requirement then let me know ur Mail id i will send u a Doc.
    Regards,
    Phani
    Reward points if Helpful

  • Submit Form as XML / Rename attached XML file

    Hello,
    I am using the followig script to submit a form:
    var Mailto = "[email protected]";
    var mySubject = "This is the subject";
    var myMessage  = "Please find attached my file.";
    var Mail = "mailto:" + Mailto + "?Subject=" + mySubject + "&Body=" + myMessage;
    event.target.submitForm({
    cURL: Mail,
    bEmpty: true,
    cSubmitAs: "XML"
    Unfortunately I cannot change the name of the attached XML file. It is automatically the PDF filename.
    Has anybody an idea how to change the attachement name?
    Many thanks.
    Regards,
    ra_be

    The attachment filename will always be the name of the PDF. The only way to change is to save the PDF under a different name before you email it.
    Paul

  • Dynamic attachment name in receiver mail adapter for 1 attachment?

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

    Hi,
    seems to be a tricky thing....
    The sender interface (file) picks up an xml file and a pdf document.
    The receiver wants to get the xml file as a txt file and the pdf, both sent together by mail.
    We are following this thread:
    "Sending multiple attachments winthin a single Receiver Mail adapter in required format".
    So far we are able to generate the txt file and send it together with the pdf to the recipient.
    The txt file gets its name from the payload of the xml file.
    Unfortunately the pdf should be renamed to the same name as the txt file.
    And here we are stuck.
    We generate the filename for the txt file in the mapping to the mail message (as usual ximail30.xsd).
    But for the pdf we are only able to set a static name in the channel module page using
    Transform.ContentDisposition.
    Any ideas how to solve this are really welcome!!!!
    (Solutions that do not talk about using a new module to be written are prefered.)
    Regards
    Dirk

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • 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

  • Excel file(.xls) as attachment and Body(Signature) via Receiver Mail Adapter

    Hi PI Experts,
    I have a requirement File(.txt) - PI(7.4) - mail (.xls attachment and signature in the body). Can anyone pls help me with the best approach to send excel file as mail attachment and signature in the body.
    Thanks,
    Sri

    Hi
    You can try this approach
    1. use mail package and java mapping to populate the mail package.
    inside the java mapping do the following
    a. read the text file and convert it to excel and then set it as additional attachment.
    b. map the signature and body with the field 'content' of mail package.
    2. on the receiver mail adapter check both mail package and keep attachment options.
    Hopefully this will work.
    Reference links
    excel write : Excel and Java - Read and Write Excel with Java - Tutorial
    set attachment: How to save MainDocument as additonal attachment in sender channel?

  • Variable substitution not working for dynamic file name in Receiver File CC

    Hi Experts,
    I am doing the scenario of Proxy sender to File receiver and my purpose is to Create the text file
    as per the filename available in Source Message payload.
    I am using the Variable Substitution method for this as shown below.
    Source Message Structure:-
         <Row>            -
    having Cocurence 1.1
             <Filename>     -
    having Cocurence 1.1
             <Item>            -
    having Cocurence 1.Unbounded
              <Field1>
              <field2>
             <Item>
             <Item>
              <Field1>
              <field2>
                <Item>        
         <Row>
    Target structure is same as the source structure and i have mapped the Filename field of the Source
    with the Target structure Filename.
    In ID the following is the File receiver CC Configuration.
    File Name Scheme:- %Dyn_filename%
    In Advance tab, I have selected the Enable option and added one row as Variable name %Dyn_filename%
    and Reference as payload:Row,1,Filename,1
    In testing I am getting the Error as 'variable Dyn_filename is not found in Message payload'.
    Please suggest me.
    Regards,
    Jagesh

    Hi Pooja,
    Hi Pooja,
    Thanks for your valuable reply..
    I  tried with the same. but still Filename is appearing in Output file.Giving you some details regarding my Receiver File Configuration settings.
    Target Message Type:-
              <MT_Target_Struct>
                    <Row>----
    1.1 occurence
                            <Filename_test>----
    1.1 occurence
                            <ITEM>----
    1.unbounded occurence
                                  <Field1>
                                  <Field2>
                            <ITEM>
                            <ITEM>
                                  <Field1>
                                  <Field2>
                            <ITEM>
                    <Row>
              <MT_Target_Struct>
    Recordset structure:-  Row,Filename_test,ITEM
    Row.fieldSeparator----
    >'nl'
    Filename_test.fieldFixedLengths----
    >0  (Zero)
    Filename_test.fixedLengthTooShortHandling----
    >Cut
    ITEM.fieldSeparator----
    >,
    ITEM.endSeparator----
    >'nl'
    I want only ITEM node to be written in the output file.
    Please suggest.
    Regards,
    Jagesh

  • Dynamic attachment name in receiver mail adapter

    Hi  all,
    i am doing a receiver mail scenario (PI 7.1). my requirement is like this :
    Receiver file need to be send in receiver mail attachment and attachment name should be dynamic
    format for the attachment name should be like this
    R+value from a particular field in payload +Timestamp
    for example my file name should be like this  R001_510815021009062532.xml  
    which is     R+ 001_510815 + 021009062532 + .xml
    can anybody suggest me how to go for this requirement? is ther any UDF or should i go for adapter module developement?
    Thanks
    sandeep sharma
    Edited by: sandeep sharma on Oct 13, 2009 8:55 AM

    Hi K Fatima,
    I read your solution.I have a similar requiement but I need to send the entire output payload as an attachment,so I am using XSLT to send the payload as an attachment.
    I am creating the file name through dynamic configuration in XSLT but the name of attachment is not as required but its any random generated name:
    *code used:*
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" />
    <xsl:output indent="yes" />
    <xsl:param name="inputparam"/>
    <!-- mail parameters -->
    <xsl:template match="*">
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
    <xsl:variable name="new-value" select="Shipment/InternalShipmentNum"/>
    <Subject>Mail</Subject>
    <From>xyz</From>
    <To>abc</To>
    <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
        <xsl:variable name="dynamic-value"
            select="dyn:get($dynamic-conf, $dynamic-key)" />
        <xsl:variable name="new-value"    
            select="concat($dynamic-value, 'subfolder\')" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, $new-value)" />
    <!--Content type -->
    <Content_Type>application/xml</Content_Type>
    <!Content Description>
    <Content_Disposition>attachment;filename "<xsl:copy-of select="$new-value"/>"</Content_Disposition>
    <!--Content Disposition -->
    <Content_Description><xsl:copy-of select="$new-value"/></Content_Description>
    <Content>
    <xsl:copy-of select=".">
    <xsl:apply-templates/>
    </xsl:copy-of>
    </Content>
    </ns:Mail>
    </xsl:template>
    </xsl:stylesheet>
    Please suggest ! I need the value in "Shipment/InternalShipmentNum" as name of attachment.
    Thanks in advance!
    Indu Khurana

  • Variable file name through Receiver mail Communication channel

    I need to send a file through receiver communication channel   with the following name ( YYMMDD schema)  . The YYMMDD is current date .  I know how to create these file names throug FCC ( file communication channel) , I tried in the same manner to create this file through Receiver Mail CC , but it did not work  .  If you have any ideas , can you please share with me ?
    ABC_MMYYDD.TXT
    Thanks.
    Ritvik

    Hi Ritvik,
    Also, Please look at this link and see if it helps you. It is generating variable file name through a UDF
    Re: Problem in dynamically file name generation procedure
    Best Regards

  • Set xml file name

    Dear,
    I want to set the name of the xml sended by mail.
    I use a botton for this, cane help me to set the name of this file before attachement !
    Thanks

    I know that, but i need to set the xml file name sent by mail with information typed in a text field.
    For exemple un have a PDF file named : myPdf.pdf
    And each user of this pdf file will type in a text feld his name so the xml file should be named : brain.xml and not myPdf.xml
    Thanks

  • Swapping attachment to content on Receiver Mail Adapter

    Hi Experts,
    Can I move my attachment data to content on receiver mail adapter ? I am not using Mail package or mapping. I tried using Payloadswapbean on receiver adapter but adapter generated email with attachment only with and without Payload swap bean module.
    Please let me know if it is possible without using Mail Package.
    Thanks,
    Ankit

    Hi there,
    If you want to use attachment in content, then you need to collect the entire mail content in BPM. From there you can use Payloadswap bean on receiver adapter.
    The reason behind using BPM is that the attachment is maintained only in Integration Directory. First the mapping converts the source into mail and then just before moving to receiver the attachment gets added to the mail(i.e. after mapping). So if a BPM is used then all the mail content with attachment will get transported to BPM first and then to the receiver with the above change (Payloadswap bean i.e transferring the attachment to content).
    Best Regards,
    Souvik

Maybe you are looking for

  • IPhone 3GS not recognized in itunes and xcode on imac i7

    I've got an issue where my iphone 3GS is no longer recognized by my iMac i7 in either itunes or xcode. Iphoto does see my iphone. If I hook it up to my macbook it works fine. Is anybody aware of something strange as far as imac i7 and iphone is conce

  • Error message "The file is damaged..." when open a PDF-File in the Portal

    Dear Experts, We converted a Word-File into a PDF and loaded it with the help of SAP Knowledge Workbench into the Portal. When we try to open the file we receive the following error message from the Adobe Reader: "The file is damaged and could not be

  • Javascript is not working correctly in the jsp

    Hello experts, i have problem with javascript. Actually i am written a javascript function isInteger(s) for checking wether the entered string is numberic or not. But its not wroking(can't display alert message). Means it not calling the function. If

  • Not showing in Itunes (different)

    Hello, I have read the other posts regarding this issue however I have a different problem I am not seeing the ipod in Itunes (ver 7) However my computer recognizes it, and the updater recogizes it, firmware wersion 1.2 In Itunes when I run Diagnosti

  • External speaker not working anymore

    I just got an iPhone 4 yesterday. The external speaker was fine until I hooked it up the earbuds. I removed the earbuds and now I cannot hear anything from the external speaker. I can't hear my phone ring. I can make a call, but can't use the speaker