Dynamic mail subject in File2Mail Scenario

We are doing File2Mail scenario. We r sending 5 files in 5 mails with 5 diff subjects by MAIL adapter.
Can anyone guide me how to send 5 files as attachment in one single mail with different mail subjects :
File names are - Employee_Leave,Base,Super,Loss,Profit.

Hey,
     you can use dynamic addressing wherein you can provide the mail related information in your mapping.
for example the to, from, subject and content.
so you can map these fields form the input structure or you can have a constant to map it.
refer to this blog it will really help.
/people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
the only differerence in your case is that you need file as attachment so mark the keep attachment field.
it will ask you for a mail structure.
use this structure as your target structure.
<?xml version="1.0" encoding="utf-8" ?>
- <!--
SAP takes no position regarding the validity or scope of any intellectual property or
other rights that might be claimed to pertain to the implementation or use of the
technology described in this document or the extent to which any license under such
rights might or might not be available; neither does it represent that it has made any
effort to identify any such rights.
Copyright © SAP 2003-2004. All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative
works that comment on or otherwise explain it or assist in its implementation may be
prepared, copied, published and distributed, in whole or in part, without restriction of
any kind, provided that the above copyright notice and this paragraph are included on all
such copies and derivative works. However, this document itself does not be modified in
any way, such as by removing the copyright notice or references to SAP.
This document and the information contained herein is provided on an u201CAS ISu201D
basis and SAP DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  -->
- <xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30" xmlns:xi="http://sap.com/xi/XI/Mail/30" xmlns:xs="http://www.w3.org/2001/XMLSchema">
- <!--
Mail
  -->
- <xs:element name="Mail">
- <xs:annotation>
  <xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
  </xs:annotation>
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Subject" type="xs:string" minOccurs="0" />
  <xs:element name="From" type="xs:string" minOccurs="0" />
  <xs:element name="To" type="xs:string" minOccurs="0" />
  <xs:element name="Reply_To" type="xs:string" minOccurs="0" />
  <xs:element name="Content_Type" type="xs:string" minOccurs="0" />
  <xs:element name="Date" type="xs:dateTime" minOccurs="0" />
  <xs:element name="Message_ID" type="xs:string" minOccurs="0" />
  <xs:element name="X_Mailer" type="xs:string" minOccurs="0" />
- <xs:element name="Content" minOccurs="0">
- <xs:annotation>
  <xs:documentation>any type</xs:documentation>
  </xs:annotation>
  </xs:element>
  </xs:sequence>
  <xs:attribute name="encoding" type="xs:string" />
  </xs:complexType>
  </xs:element>
- <xs:element name="MailReceipt">
- <xs:annotation>
  <xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
  </xs:annotation>
- <xs:complexType>
- <xs:sequence>
  <xs:element name="Server" type="xs:string" />
  <xs:element name="Format" type="xs:string" />
  <xs:element name="UseMailPackage" type="xs:boolean" />
  <xs:element name="Encoding" type="xs:string" />
  <xs:element name="Subject" type="xs:string" minOccurs="0" />
  <xs:element name="From" type="xs:dateTime" minOccurs="0" />
  <xs:element name="To" type="xs:string" minOccurs="0" />
  <xs:element name="Date" type="xs:dateTime" minOccurs="0" />
  </xs:sequence>
  </xs:complexType>
  </xs:element>
  </xs:schema>
reward points if useful.
regards,
        Milan.

Similar Messages

  • Dynamic mail subject in mail adapter

    Hi.
    Two different interfaces are using the same mail adapter. Is it possible to change the subject of the email (that gets generated by the receiver mail adapter) depending on whcih interface gets triggered?
    Thanks.
    Anuradha.

    Anuradha
    You can change the subject through mapping. For different interface you can send different subjects.
    Please refer
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm
    Regards
    Raj

  • Dynamically pass subject via mail adapter without using mail package

    Hi,
    We have requirement to pass the Dynamic variable as Mail subject
    we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
    Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
    Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
    Could you please let me know, how to handle this requirement using module configuration?
    Also suggest the correct configuration to use ASMA and Variable transport binding.
    Regards
    Venky

    Hi Venky,
    Please have a look at the links below. They should help you.
    Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Adapter-Specific Message Attributes in the Message Header  -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    Regards,
    Jannus Botha

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

  • How to run business services as dynamically generated Subject?

    Hi experts,
    I have configured a business service which puts a message on a JMS queue in a weblogic container other than ALSB's weblogic container.The queue is configured with a security policy [say a 'MessagePublisher' role], so that only users with role of 'MessagePublisher' can send message to that queue.
    We have different partners SFTPing messages(xml/csv/excel format) to us, of which only few of them would have a role of 'Message Publisher'. I have configured a proxy to read these files from a directory, however sender of some of these messages may not have a role of 'Message Publisher'.
    I am expecting the senders' credentials to be appended to the message by some process on SFTP server. How can I generate a 'Subject' within a proxy using these credentials and do a run as on the business service, so that only users with the role of 'MessagePublisher' succeed in sending message to the queue.
    I probably can configure my business service to run as a user account who has the relevant role, but I do not want to hard code the UserAccount within business service and obtain a user account using sender's credentials.
    Is ALSB not supposed to be used as suggested above?Would highly appreciate any thoughts on this..
    Regards.

    The JMS business service can use only a static service account. I think this has an undesirable implication that the business service cannot be invoked as a dynamically generated subject.
    Only way I know of to enforce role based access control in this scenario is to have an extra proxy service in front of JMS business service. Enforce access control over this extra proxy service.
    To invoke this extra proxy service with credentials embedded embedded in the message, I think you need to look at "custom authentication" option under message level security. I am not sure how this would work. May be someone here can explain that.

  • File attachment at File2Mail scenario

    Hi All,
    I'm trying to config a File2Mail scenario, I want the file read by the file adaptor will be send as mail attachment (with csv suffix). Last thing, the attached file name should be identical to name of the source file read by file adaptor.
    Plz advise / provide useful links
    Best Regards
    Uri

    in the mail adapter make sure that keep attachments option is checked.
    Also to solve the file name issue ref: The specified item was not found.

  • Alert management with custom mail subject

    Hello,
    I defined a business process, with a control step that throws an alert with a specific message "Error in &MessageTypeFound& " ( &MessageTypeFound& being a container element filled in in a previous step ).
    When I look at the e-mail that the alert manager sent, I can see the alert, with the variable properly filled in, so the result in the mail-body is: "Error in WMMBXY".
    Now, as a mail subject, I want the same message. In the Alert Category Definitions, I need to fill in the title and this will be used as mail subject.
    To be able to use variables in this title, I need to define container elements in the alert category definition. How can I pass the Business Process variable ( &MessageTypeFound& ) to this container for the alert definition ? (So I can use this container element for my dynamic variable in the subject of the alert mail)
    Any ideas are welcome !
    Thanks

    Hi Frederik,
    Unfortunately the functionality you want is simply not available ... or well it is but its not implemented very good by SAP.
    The workflow step that generates an alert does has a container element 'SHORTTEXT' which can hold placeholders and which is translated into the title of the alert message/mail.
    However, the field is defaulted with the text 'Process &_WORKITEM.WORKITEMID&' when being executed via BPM ...
    I tried to overwrite it by setting my own 'SHORTTEXT'container element within the BPM but that does not work ...
    Regards,
    Steven
    ( Tried everything on SP14 ... maybe something changed in SP15 ... )

  • Change outgoing mail subject

    Hi Guru's,
    I need to change the subject of the outgoing standad mail template dynamically by the comlaint id which i get it through the refernce field of the mail.
    or is there any way through which the refernce id can be copied in the mail subject.
    Thanks,
    regards,
    akshay ruia.

    settings - mail - account - outgoing mail server

  • Receiver Mail Adapter Error ( Dynamic mail address to be used)

    Hi EveryBody,
    I am getting an error in the RWB (Communication Channel Monitoring) as Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error: invalid XIMailAdapter channel 'a089879fd0b63a4b92ca72d4a4af2ec4'.Mail is not send to the receiver.I have tried using USE MAIL PACKAGE as base64 and NONE.
    Can somebody help me out in the configuration.

    Hi,
    have u refered the below weblog of michal:
    Mail Adapter (XI) - how to implement dynamic mail address
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Thnx
    Chirag gohil.

  • Purchase order by e-mail: changing the e-mail subject

    Hello all,
    We are sending are purchase orders to the vendors by e-mail.
    I would like to know how can I change the e-mail subject to a subject of my choice (for instance the PO number, etc.).
    Thanks for your help,
    Sivan

    Hi,
    You can  change the e-mail subject to a subject of your choice by following way.
    If you want to send a purchase order as (external) mail, for example, to a
    vendor, you have to maintain the mail title in the condition record for the
    output type (for example in Transaction MN05) on the 'Communication method' tab
    page. Enter the mail title in the 'Text for cover page' field. You cannot
    maintain an additional mail text.
    Hope this will help u,
    Deepak

  • Supplier Remittance mail subject changes

    Hi Gurus
    In Supplier Remittance Advice Subject which is based on Messages in Application Developer IBY_FD_SRA_EMAIL_SUBJ  Separate Remittance Advice: payment reference number - &PMT_REF_NUM
    This needs to be changed to <operating_unit> P_card PAYMENT NOTIFICATION  Paper Document Number - &PMT_REF_NUM
    how can we get Operating unit name dynamically in subject as similar to &PMT_REF_NUM.
    Thanks
    Kamalakar.G

    The Subject line is part of the email headers. It is plain text. It does not have styles (fonts, etc.) associated with it. You cannot control how headers will be displayed to the recipients.

  • Dynamic Mail Adapter Config

    Hi All,
    We're trying to use a dynamic mail direction in the mail adapter checking the Mail Package option as it's mentioned in: /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address (excellent blog).
    But we have a mapping error in the SXMB_MONI:
    RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages
    In the mapping we have one source message with the content of the mail and the direction, and two different structures for target. One with the mail package structure and the other with the target content.
    Do you have any idea why we're having this mapping error?
    Thanks in advance!

    I'm trying to use the dynamic adress for mail adapter. So I've created an external object from the file mentioned in https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1361. [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    Then I've done a multimapping, first message with the mail payload and the second with the contents of the mail.
    In configuration, I've checked the Mail Package option and execute the interface.
    Sender adapter and mapping was right, but there is an error in the mail adapter as follows:
    error occured: [2006-05-29T14:38:31Z] unable to call the mailer; com.sap.aii.messaging.srt.BubbleException: Failed to call the endpoint [null "null"]; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found MM57_V01_COM_MONTH_MAIL_FILE at state 1
    Any idea about this?
    Thanks in advance!!!!

  • Dynamic Mail Adapter using message split

    Hi,
    My requirement is like this:
    one flat file will come
    Sample Structure:
    Email_address   Custom_ID        Status             Comments   
    Many records will be there in that
    Sample data:
    som @ xi.   1234       approved        blablabla
    ram @ por   1236       approved        blablabla
    par @ mdm  1237      approved       blablabla
    vin @ gp      12348     rejected        blablabla
    Pi needs to pick the 1st record and construct an email with following information:
    email address: som@xi
    Likewise every record needs to be sent as email, and club the records in one mail if the mail address is same.
    How to go by!
    I have read the Micheals Blog:
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    And gone through the SAP note and downloaded the XSD.
    The XSD is may works only for one record, also occurance in XSD is (1,1).
    if Any other approach Please suggest me.

    I also tried that it is saying
    " Cannot load schema with the target namespace http://sap.com/xi/XI/Mail/30 to namespace http://blabla.com/IMG/INF2199"

  • SO_NEW_DOCUMENT_ATT_SEND_API1 issue related to length of MAIL SUBJECT

    Hello Experts,
    when i am using 'SO_NEW_DOCUMENT_ATT_SEND_API1' FM to send an external mail in HTML format, i want the lengh of MAIL SUBJECT almost 70 character. But it is allowing me to display only
    50 characters ( lenght of field OBJ_DESCR ).Can i accomodate heading more than 70 characters.
    Regards,
    Rushikesh

    try
    Check this SAP note
    Note 698087 - User-defined mail title without length restriction
    CL_BCS->SET_MESSAGE_SUBJECT
    Bhanu

  • Mail subject modification for smart-form SMIV

    Hi Experts,
    We have implemented ServiceDesk in Solution Manager 7.1 SPS 08 & are using automatic notifications to be generated as alert emails to the customer key users / service desk support team / message processors etc.
    We are using Actions under transaction SPPFCADM, which is using smart-form AI_CRM_IM_SHORT_TEXT_LINK_FORM for the email content.
    We need to modify the notification mail subject as follows - 
    Current Mail Subject – 80000xxxxxx : <Incident Description>
    Required Mail Subject – 80000xxxxxx : <Incident Description> : <Incident Status>
    Can you please suggest, how this can be achieved? What modifications are needed in smart form for the same?
    Best Regards,
    Tanmeya

    Hi Tanmeya,
    Go through the following Links, here u can find example with step
    by step.
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    https://scn.sap.com/thread/499311

Maybe you are looking for

  • OWB 11gR2 - Internal ERROR: Can not find the ACL containter

    OWB 11gR2 - Internal ERROR: Can not find the ACL containter ======================================= I am using OWB 11gR2 (11.2.0.1) on Win XP 32 bit. I have 3.23 GB RAM. OWB design center is ver slow on my desktop. We have our OWB repository is on Un

  • Brand New Ipod Touch-Can't Get Music under "music"

    This is my very first Apple product EVER! Got a brand new Ipod touch generation 4.  Downloaded two albums on Itunes, then synced it with my Ipod touch. When I go to use my Ipod, I got to the "music" icon, but i have NO music. I go to the "more" optio

  • Error message in subscreen

    Hi, I have used 4 tabstrips inside one main screen and created 4 subscreens for those 4 tabs. Now when i show an error message using  MESSAGE SXXX , it just shows the message in info format and continues with the further code. If i use the format MES

  • Sample Servlet Project Please...

    Dear All, Can u please send me a sample code using JSP,SERVLET & JAVABEAN with DB Connection Code. with only one attribute called USERNAME. While submitting, it will have to store in the DB and Display the username in the another JSP. It will make me

  • Incorrect file name within folder

    I have saved a series of Captivate v4 projects in a folder. I have saved the projects with their relevant names. I have updated the project info details on each project to correctly reflect the name of the project chapter etc. Can anyone explain why