Attachment name N/A in message tracking

Hi all,
We are having an issue with our C370. When doing message tracking, we are getting for some mails (not all), N/A instead of attachment name, but mail is having an attachment inside.
What could be happening?
Thank you and regards

On the ESA, message tracking, at the Attachments shows N/A, but there were attachments --- this shows for all mails, and we need to be able to show that an attachment was on the mail.
This can be corrected with creating a incoming content filter – or, on the CLI of the appliance, creating a message filter.
However, the information will only be logged when Stellent is initiated during the processing of the mail. In other words, if the configuration of the policy does not have any content filter enabled, or trigger the message filter, the attachment information will not be logged.
The work around is to create a message filter or content filter that will only add informative log such as attachment filename or presence of attachment in mail headers.
A message filter like the one below will be sufficient to add the attachment filename to the mail header:
Add_attachment_header:
If (attachment-filename == "^.+$")
 Insert-header("X-Attachment-filename", "$filenames");
A content filter example:

Similar Messages

  • Attachment Name of emails from Message Tracking Logs

    Hi,
    I have been able to get NDR from message tracking logs in Exchange 2010 using Exchange Management Shell. Is it possible to include the file name of the attactment of the emails from the report generated?
    Regards,
    Emansky
    All the best, Eman Lacuata

    Hi,
    No that is not possible. 
    Message tracking will never include names of attachments.
    Martina Miskovic - http://www.nic2012.com/
    Agree.
    Refer to:
    Managing Message Tracking
    http://technet.microsoft.com/en-us/library/bb124375(EXCHG.80).aspx
    Note: Content specific to Exchange 2010 SP1 will be available at a later date.   
    Best Regards Fiona Liao E: [email protected]

  • Mail - Is it possible to change length of attachment name displayed in message??

    Mail messages show that there is an attachment both in the header and in the body of the message.
    If the file name is more than a few characters long, the name gets shortened.
    Is there a way to force Mail to display the entire file name (all characters)? 
    I use Macs in business, and I need to maintain records of incoming/outgoing correspondence and it is often important to have a record showing exactly what was attached to a given email message.  My file names always include the date (YYYMMDD) so every file name is unfortunately always going to be well over 10 characters long.
    I save the Mail messages as PDFs and while the existing behavior is better than Outlook (printed or PDF'ed messages don't show any reference to attachments at all) it would be excellent if I could get the entire file name to display.
    Does anybody know if this can be done?
    Thanks!

    ignore my idiotic question - I dont know why I didnt just drag them like I've been doing ever since Apple Mail existed!

  • How to get message/rfc822 attachment name by using JavaMail

    Hi,
    I am fetching incoming mail which has message/rfc822 attachment. i.e: ".msg" (mime message) is attached to this incoming mail. When I try to get name of this message/rfc822 attachment, I am getting null. Body part for this message attachment doesn't contain attachment name? Is this known issue? Is there any solution for this? How to get attached message name?
    I am using javax.mail.part.getFileName() for getting bodypart's filename.
    Thanks,
    Shilpa

    This is not unusual. An attached message need not have a filename,
    especially if it wasn't stored in a file but rather was just attached to the
    new message from within the mailer that composed the new message.
    Some mailers will set a filename anyway, but there's no requirement
    that they do that.

  • Email sender cc: how to work on messages with different XI attachment names

    I am currently facing the following problem:
    I have to integrate a scenario using email as communication protocol (both in and outbound).
    On the outbound way I know what I am getting, so this is no problem.
    On the inbound way though I am facing one huge problem:
    I am using a module that needs the source attachment name to do its job.
    But as I am receiving emails, this source attachment name can be "MailMessage" if someone sends the content inlined or "MailAttachment-1" if someone sends the content attached.
    As I am using one channel to poll a mailbox where basically both these situations can occur, I am looking for a means to use either MailMessage OR MailAttachment-1, depending on what is present.
    So far I only know of ways to hard code the source attachment which will cause the cc to fail forever if a wrong message hits the inbox.
    I have thought of a workaround, polling the messages from the mailbox without using any module chain, sending them to a file receiver and picking them up again with a file sender that has "archive errorneous messages" set. But this does not look like a nice solution to me at all.
    Any ideas how to solve that are highly welcomed!
    Thanks and cheers!
    Stefan

    Hi Francesco,
    two follow-up questions:
    Can your module cope with an attachment that is not there (as mentioned I might receive messages with "MailMessage" OR "MailAttachment-1" set - never both...)?
    Just out of curiousity: is there a possibility to process more than one attachment in the Integration Engine (routing, mapping, ...) from one XI message?
    Cheers!
    Stefan

  • Messaging tracking logs filename format changed in Exchange Server 2013 sp1

    Hi,
    I have noticed that the file name format is changed for exchange server 2013 sp1.
    Now it will have hh attached to it like
    MSGTRKMSyyyymmddhh-n.log;
    MSGTRKMDyyyymmddhh-n.log:
    MSGTRKyyyymmddhh-n.log.
    So the "hh" will goes from 00 to 23 for single day.
    So Lets say at 24 april 2014 first fill is created @7.30 AM, so the first file name will be
    MSGTRK2014042400-1.log. Now exchange server will create new file every hour by incrementing hh part of file name. Now the last file i.e
    MSGTRK2014042423-1.log will be created on 25 April 2014 at 6.30 AM.
    I am not able to understand why exchange server is creating the file with old date on next day ( with 24 April on file name time stamp on 25 April).
    And also how it will be decided to create the first file @ 7.30 AM.
    Can anyone explain to me about this ? Why it is happening like this?
    Thanks
    Sandeep Gupta

    Hi Sandeep,
    This could related to the time difference. What’s the time zone of your server? In my lab, many files in the last day were created in the next day. For example, files in 20140410
    were created on 20140411.
    Also, as you mentioned, the file name format is as:
    MSGTRKMSyyyymmddhh-n.log;
    MSGTRKMDyyyymmddhh-n.log:
    MSGTRKyyyymmddhh-n.log.
    However as I know, the format is like
    MSGTRKyyyymmdd-m.log, it will not have “hh”(you mean hours) in the behind and the file is not created every hour but create a new file when the old is full. So please capture some screenshots of the message tracking files
    and the date/time information of the file to verify.
    Title: Message Tracking
    Link:
    http://technet.microsoft.com/en-us/library/bb124375(v=exchg.150).aspx
    Regards, Eric Zou

  • Need to get the Mail attachment name as it is to the receiver file adapter

    I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
    Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
    Any help would be appreciated.
    VJ

    Oops pressed the send key. Take two.
    This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
    SAP NetWeaver Developer Studio
    SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
    Build id: 200901152336
    APPLICATION.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
    <display-name>MailPOP_EAR</display-name>
    <description>EAR description</description>
    <module>
    <ejb>MailPOP_EJB.jar</ejb>
    </module>
    </application>
    APPLICATION-J2EE-ENGINE.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
    </reference>
    <fail-over-enable mode="disable" />
    </application-j2ee-engine>
    EJB-J2EE-ENGINE.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
    <ejb-j2ee-engine>
    <enterprise-beans>
    <enterprise-bean>
    <ejb-name>GetMailAttachment</ejb-name>
    <jndi-name>GetMailAttachment</jndi-name>
    <session-props/>
    </enterprise-bean>
    </enterprise-beans>
    </ejb-j2ee-engine>
    EJB-JAR.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <description>EJB JAR description</description>
    <display-name>EJB JAR</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>GetMailAttachment</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>sample.GetMailAttachment</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    SENDER MAIL ADAPTER modules
    1 AF_Modules/PayloadSwapBean Local EB 1
    2 GetMailAttachment Local EB 2
    3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
    1     swap.keyName          payload-name
    1     swap.keyValue          MailAttachment-1
    RECEIVER FILE MODULES
    1     localejbs/AF_Modules/DynamicConfigurationBean     Local Enterprise Bean     1
    2     localejbs/CallSapAdapter                    Local Enterprise Bean     2
    1     key.0          write http://sap.com/xi/XI/System/File FileName
    1     value.0          message.interface
    VARIABLE FILENAME SUBST WITH ASMA TURNED ON
    fName     message:interface_name
    JAVA SOURCE
    package sample;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.lib.mp.module.Module;
    import com.sap.aii.af.lib.mp.module.ModuleContext;
    import com.sap.aii.af.lib.mp.module.ModuleData;
    import com.sap.aii.af.lib.mp.module.ModuleException;
    import com.sap.engine.interfaces.messaging.api.Message;
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    import com.sap.engine.interfaces.messaging.api.TextPayload;
    import com.sap.engine.interfaces.messaging.api.XMLPayload;
    import com.sap.aii.af.service.cpa.Channel;
    @ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
    @stateless
    <code>GetMailAttachment</code>
    @SuppressWarnings("unused")
    public class GetMailAttachment implements SessionBean, Module {
         private static final long serialVersionUID = 7612238514043673502L;
         private SessionContext myContext;
         private MessagePropertyKey myFileName;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
    @throws CreateException
         public void ejbCreate() throws CreateException {
         public void getMessageProperty(MessagePropertyKey FileName) {
              myFileName = FileName;
    @param moduleContext
               Contains data of the module processor that might be important
               for the module implementation such as current channel ID
    @param inputModuleData
               Contains the input XI message as principal data plus eventual
               set supplemental data
    @return ModuleData Contains the (changed) output XI message. Might be the
            response message if the module is the last in the chain.
    @exception ModuleException
                   Describes the cause of the exception and indicates whether
                   an retry is sensible or not.
         @SuppressWarnings("deprecation")
         public ModuleData process(ModuleContext moduleContext,
                   ModuleData inputModuleData) throws ModuleException {
              try {
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   TextPayload payload = msg.getDocument();
                   String contentType = payload.getContentType();
                   // Content Type could be something like
                   // text/plain;charset="UTF-8";name="file.txt"
                   contentType = contentType.replaceAll("\"", "");
                   int i = contentType.lastIndexOf("=") + 1;
                   String fileName = contentType.substring(i);
                   msg.setMessageProperty(myFileName, fileName);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
              return inputModuleData;
    JAVA ERRORS
    2009-02-04 11:41:14     Information     Mail: calling the module processor for channel LMK_Common_Mail_Sender
    2009-02-04 11:41:14     Information     Swap: swapping by payload-name ? MailAttachment-1
    2009-02-04 11:41:14     Information     Swap: successfully swapped
    2009-02-04 11:41:14     Information     Mail: message leaving the adapter (call)
    2009-02-04 11:41:14     Information     The application tries to send an XI message asynchronously using connection AFW.
    2009-02-04 11:41:14     Information     Backward validation is enabled
    2009-02-04 11:41:14     Error     Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
    2009-02-04 11:41:14     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException

  • Setting dynamic attachment name in mail adapter

    Hi experts,
    I have a mail adapter that send e-mails from ECC to several address.
    I have configured dynamically the FROM and TO field using the code showed below in message mapping:
    public String SetMailParameters(String Mail_address_to, Container container){
       //write your code here
      String valueFrom = "my_address";
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key1 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail",  "THeaderFROM");
    DynamicConfigurationKey key2 = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/Mail",  "THeaderTO");
    conf.put(key1, valueFrom);
    conf.put(key2, Mail_address_to);
      return  "";
    In communication channel I have checked ASMA and variable transport binding (using XHeaderName1 and 2), mail package is not checked.
    It works fine!
    My question is:
    I need to dynamically configure also the Attachment name: is it possible?
    I've tried adding the code below:
    DynamicConfigurationKey key3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key3,Attachment_name);
    and also
    Transform.ContentDisposition      attachment;filename=<FileName>
    in Message TransformBean in communication channel, but it doesn't work!!!
    Any idea?
    Thanks
    Fabio Boni

    Hi,
    thanks a lot!!
    ASMA and variable transport binding must be checked or not?
    it raise an error in runtime workbench message monitoring:
    2010-09-02 17:41:15 Success Mail: calling the adpter for processing
    2010-09-02 17:41:15 Error Mail: call failed; com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {'}Content_Disposition at state 1
    2010-09-02 17:41:15 Success Mail: sending a delivery error ack ...
    2010-09-02 17:41:15 Success Mail: sent a delivery error ack
    2010-09-02 17:41:15 Error Mail: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {'}Content_Disposition at state 1
    2010-09-02 17:41:15 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1
    2010-09-02 17:41:15 Error Exception caught by adapter framework: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1
    2010-09-02 17:41:15 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: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found {}Content_Disposition at state 1.
    This is my message in message monitoring:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Content_Disposition>"attachment; filename="MyFileName.txt"</Content_Disposition>
      <Content>ZLF;0001000079;Dealer Motors UK</Content>
      </ns1:Mail>
    In message mapping with target message mail package I've linked Content_Disposition with the constant
    "attachment; filename="MyFileName.txt"
    If I cancel this relation the mail arrives correctly.
    One other thing: when I took mail.xsd from SAP the fields Content_Disposition and Content_Description weren't in, so I added them manually in XSD.
    thanks
    Edited by: Fabio Boni on Sep 2, 2010 5:42 PM
    Edited by: Fabio Boni on Sep 2, 2010 6:06 PM

  • 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&gt;Preferences&gt;Java&gt;Code Generation&gt;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&gt;Preferences&gt;Java&gt;Code Generation&gt;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;

  • Mail Attachment Name

    Hi,
    I am using File to Mail scenario. There is no mapping, it uses dummy Interfaces. I have Adapter Module at the Receiver in Mail to dynamically get the filename and set it as the attachment name.
    Following is the module code. The problem with the code is I get 2 attachments in the mail, One with proper file name as desired and the 2nd attachment as "Untitled.xml". Need to get rid of this Untitled.xml. Note: Keep attachments is Checked as I need the file in attachment.
    Message msg = (Message) inputModuleData.getPrincipalData();     
                   XMLPayload xmlpayload = msg.getDocument();
                   String strfileName = msg.getMessageProperty("http://sap.com/xi/XI/System/File", "FileName");
                   byte by[] =  xmlpayload.getText().getBytes();
                   xmlpayload.setName(strfileName);
                   xmlpayload.setContentType("text/xml");
                   xmlpayload.setContent(by);
                   msg.addAttachment(xmlpayload);
                   inputModuleData.setPrincipalData(msg);

    Create an UDF and mention the key and the value of the file name you wish
    public void DynamicFilename(String[] a,String[] b,ResultList result,Container container){
      //write your code here
    AbstractTrace trace = container.getTrace();
    String strDirectory=" ";
    String strFileName="";
    try
         Map map= container.getTransformationParameters();
         //This is for generating the file Direcotry Dynamically
         DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get
    (StreamTransformationConstants.DYNAMIC_CONFIGURATION);
         DynamicConfigurationKey key = DynamicConfigurationKey.create( "http://sap.com/xi/XI/System/File", "Directory");
         DynamicConfigurationKey key1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File",
    "FileName");
    strDirectory= "/xxx/xxx/xx";
    strFileName= b[0] + b[2] + b[1]+ ".XML";
    trace.addWarning("strDirectory " +strFileName);     
    conf.put(key, strDirectory);
    conf.put(key1, strFileName);
    result.addValue(b[0]);
    catch(Exception ex)
    trace.addWarning("Catch Block " );
    Edited by: Sainath Chutke on Jan 16, 2009 10:19 AM

  • Mail Attachment with attachment name = mail subject name

    Hi,
    I am using the mail adapter and today I am using hard codes attachment names using the MessageTransformBean. I have read the blog /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution about dynamic filenames but how do I get the eMail subject as a viriable to create the attachment?
    Thanks
    Juergen

    Juergen my weblog was the simplest suggestion to your issue - you can put the mail subject anywhere in
    message get it (and remove) in the adapter module
    you can also try to get the
    Adapter-Specific Message Attributes from the adapter module 
    http://help.sap.com/saphelp_nw04/helpdata/en/43/09b16006526e72e10000000a422035/content.htm
    but I'm not sure it the second solution works with adapter modules - but you can do an easy check
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Override default send from email id and attachment name in email delivery

    How to override the default send from email ID and attachment name to send an outbound document using Email Transport protocol in Oracle Integration B2B ?. I've seen that "[email protected]" and subject of the email message were used as send from email ID and attachment name respectively

    Ramesh,
    I set the send from email ID as Generic Identifier for host and send to email ID as Generic Identifier for trading partner and used it in the agreement. How ever still the email message is generated with "[email protected]" as send from email ID.
    However I noticed that the "FROM" field in the wire message is updated with the correct send from email ID which I used as the Generic Identifier for host.
    Please advise.

  • Attachment Name in Content Type

    Hi All,
    I am doing a scenario where I receive messages from ABAP - SRM system through proxy(which isXI sender adapter) . The message contains set of attachments as well . I have certain manipulations to do before sending the attachments to the receiver system which is a third party . The attachments are taken into one of the fields of the target message as base encoded string and sent to the third party. For certain manipulations I need the attachment names . I tried to get the attachment name from runtime by using the method getContentType but it doesnt solve my purpose. But is there a way I can put in the attachment name in content type so that I can get the attachment name using getContentType method.
    I am dealing with a scenario where in I will be strictly using ABAP stack from the sender side ( no java adapters) .
    Can anyone guide me in this case as I am stuck with no ideas .
    Regards
    Nishant Kumar Singh

    Hello Nishant,
    You can acccess names, contents and encoding of the attachments within a message mapping via the Global Container Object
    of the Message Mapping API (Check out the mehtod "getInputAttachments() " of global Container in the official SAP Javadoc: http://help.sap.com/javadocs/pi/SP3/xpi/index.html).e.
    Best regards
                   Sebastian

  • Change attachment name using mail adapter

    Hi All,
    I have a problem changing the attachment name in my scenario. I use Mail scenario to send a pdf Attachment from R/3 to email address. Everything working fine except the attachment name that becoming untitled.pdf and untitled.txt.
    Communication Channel setting :
    message protocol : xipayload
    transport protocol : smtp
    checked use mail package
    checked keep attachment
    I have use MessageTransformBean in my receiver adapter, but no luck. It was produce an error.
    anyone have an idea to solve my problem?
    thx,
    Robby

    Hi,
    You need to go to the Module tab of the Mail adapter receiver communcation channel and give the parameter as Transform.contentDisposition and its value as attachment ( since you needed the output to be sent as an attachment) and give the name of the attachment as you required.
    Please see the help page : [http://help.sap.com/saphelp_nw04/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm] for more details and more options of the parameters.
    Regards,
    Kalpana.

  • Problem: Original Attachment Name from SOAP Sender changes to attachment-1

    Hi everybody,
    we have a scenario where a SOAP sender receives a xml message describing several documents. Each document has a mime type and a file name, size, md5 checksums etc as attributes.
    The documents are send as attachments with the same Web service in SWA(SOAP with attachment style).
    The web service calls an ABAP proxy provider class in a R/3 backend.
    The ABAP proxy class will save the attached documents for further processing and must use the original document names.
    At the soap communication channel monitoring(Java Stack) we still see the original attachment names in the message content tab.
    At the Integration Server(sxmb_moni) the attachment name changes to attachment-1, attachment-2 and so on.
    Using the method
    IF_AI_ATTACHMENT ->GET_DOCUMENT_NAME
      in the provider ABAP proxy class returns the name attachment-1.
    We can see that there is a mapping of the new attachment-1 name to the old, original name in the manifest section of this message on the Integration server.
    Is there a way to access the manifest section at a provider ABAP proxy class?  Or otherwise a PI configuration setting to preserve the original attachment names.
    Thanks a lot,
    Heiko
    => PI 7.1 SP9

    Hi Stefan,
    (I was hoping you would find that thread ...)
    I see a good reason why the attachment names are changed as the PI message protocol sends the main document as an attachment as well. So no problem with that because the information of the mapping old to new names still exists in the manifest part and is visible at the sxmb_moni.
    We see a manifest part like this (Sorry cant post the whole xml doc as the formatting for longer messages isn't working in the forum)
    <SAP:Payload xlink:href="cid:4cc43edd-839f-423f-b7c6-7e44294d663a_sig.p7m">
      <SAP:Name>attachment-1</SAP:Name>
      <SAP:Description>attachment</SAP:Description>
      <SAP:Type>ApplicationAttachment</SAP:Type>
    </SAP:Payload>
    The (red) cid entry is the original file name. This manifest is from the sxmb_moni in the r/3 backend. So all the information is there..  The question is how to retrieve this information .. Any idea?
    Best Regards,
    Heiko Bergmann

Maybe you are looking for

  • Removing scroll bar from Nav Panel & Work Area layout

    Hi Guys, I have a requirement to remove the scroll bar which appears between nav panel and Work Area in 'Nav Panel and work area layout'. I would like it to be as a single page as we get in narrow: wide layout. Well I could just do it by using a narr

  • New iPod Software Fixes Sound Output Bug?

    I have speakers and an FM transmitter for my iPods that connect via the dock port. My nano frequently refuses to output sound and I have to do a reset each time I plug it in. I've heard that its a common bug and that new accessories will not have pro

  • How to find out if installed maxdb is 64 or 32 bit

    is there any command or ways to find out if the installed maxdb is 64 or 32 bit ? I cant seem to find this information

  • Report Writers/Managers

    We are putting our first Forte project together and note that there is a significant "batch" reporting requirement. Our site's background is MVS COBOL based development. Very typical reporting stuff....and lots of it !! We currently use CA-VIEW and C

  • I need install certisign certificate in my macbook pro

    Hi, I have a reader card of the certisign and I need install in my macbook pro, how I make it? Reader USB. Is for access Receita federal Brasil site. Best regards, Paulo Junior.