Campaign automation sender e-mail

hi experts,
I have done the following,
In the CA UI page,
1) under the <i>Channels</i> tab, I select Channel as E-mail but as for the "<b><i>Sender E-mail</i></b>"  field, the number of words i want to type in seem to be limited, thus resulting in me not being able to type in the e-mail address for the sender. Why is this so?
2) Let's say the Campaign Element here is for "Survey Registration Mail", how will i define the TGs for it? I am supposing that it is supposed to be done by the client themselves? am i right?

Hi Noobie,
The sender email address has to be maintained at
IMGmp and cmpersonalized mail--maintain sender email address, here you to maintain the sender address and enter in the channel tab, then it will take full email address of the sender.
You no need to define TG separetly for survey registation mail, according to ur client requirement, who are the customer they want to contact, create them as TG, and assign it to the particular campaign element where your survery registration mail is attached.
once after G0-Live of the project, TG are created by end users only depending on their requirment.
Regards
Chandramohan
Reward points if it helps......

Similar Messages

  • Error in Campaign while sending e-mail

    Hi All,
    I have created the mktg and campaign scenerio and assigning the target group and in segment I hace done segment group to channel. But while sending the mail to the target group for checking the status is having error. Even if I cheked in Tcode SOST the status also coming in error. Can anybody answer me this.
    Second thing I want to maintain budget plan for this. And also I want to create lead from this campaign and to do campaign execution. Any body is having doc can u send it to my mail id at
    [email protected]    or
    [email protected]
    Thanx in Advance
    Saravana

    Hi Saravana,
    For your first question:e-mails ending in error -
    1. Check the communication method used for sending e-mails in the channel settings in your campaign.
    2. Check the scot configuration as whether the host assigned to the SMTP service is public i.e whether can you send the e-mails outside your network.To test this you can do channel test for the e-mail form you created for campaign. If the e-mails are not going out then check with your basis or system admin for the correct ip.
    3. Check what is the error on sost.
    4. Finally check the address in the BP for e-mail.
    Reward points if helpful
    Shridhar

  • Change sender WF-BATCH in campaign automation

    Hello.
    Within Campaign Automation process the sender of the generated e-mails is always WF-BATCH.
    It overwrites the settings from the campaign element where I specified a sender and an email address.
    I tried to adjust the name with SU01 by filling in first name, last name, email, but the sender remains 'WF-BATCH'.
    Is there a possibility to change the sender from 'WF-BATCH'
    thanks a lot,
    br MM

    Hi Deepak,
    I already did that customizing.
    The problem was that in case of an campaign automation the workflow user 'wf-batch' is taken automatically as the sender. It takes the alias from su01 as sender, this alias has to be deleted and the name and first name has to be filled in su01.
    thanks & regards
    Michael

  • I need to send an automated birthday greetings mail notification

    hi all .. I have a requirement like.. I need to send an automated birthday greetings mail notification on every morning.. so I need a general code...for that
    so pls any one help me thank you in advance

    package notification;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.DataSource;
    public class Notification{
        /** Creates a new instance of Notification*/
        public Notification() {
        public static void main(String[] args) {
            try {
                String sql = "Select name, email from users where DATEDIFF(NOW(),birthday)=0)";
                Class.forName("com.mysql.jdbc.Driver").newInstance();
                Connection conn = DriverManager.getConnection(
                        "jdbc:mysql://localhost/birthday?user=java&password=javajava");
                Statement stmt = conn.createStatement();
                ResultSet rs = stmt.executeQuery(sql);
                while (rs.next()) {
                    String theText = "Congratulations "+rs.getString("name");
                     new BirthdayMail("smtprelay.myserver.net", rs.getString("email"), "[email protected]", "Automatic notification", theText, "Birthday");
            } catch (SQLException ex) { // handle the error
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println(
                        "VendorError: " + ex.getErrorCode() + " " + ex.getMessage());
            } catch (Exception ex) { // handle the error
                System.out.println("Non-sql exception: " + ex.getMessage());
                ex.printStackTrace();
    * BirthdayMail.java
    package notification;
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class BirthdayMail {
         * Main method to send a message given on the command line.
        public static void main(String args[]) {
            try {
                String smtpServer=args[0];
                String to=args[1];
                String from=args[2];
                String subject=args[3];
                String body=args[4];
                send(smtpServer, to, from, subject, body, "");
            } catch (Exception ex) {
                ex.printStackTrace();
            System.exit(0);
         * Constructor.
        public BirthdayMail(String s1, String s2, String s3, String s4, String s5, String s6) {
            try {
                String smtpServer=s1;
                String to=s2;
                String from=s3;
                String subject=s4;
                String body=s5;
                String personal = s6;
                send(smtpServer, to, from, subject, body, personal);
            } catch (Exception ex) {
                ex.printStackTrace();
         * "send" method to send the message.
        public static void send(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));           
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                //log.info("Message sent OK.");
            } catch (Exception ex) {
                ex.printStackTrace();
        public static boolean statusSend(String smtpServer, String to, String from
                , String subject, String body, String personal) {
            try {
                Properties props = System.getProperties();
                // -- Attaching to default Session, or we could start a new one --
                props.put("mail.smtp.host", smtpServer);
                Session session = Session.getDefaultInstance(props, null);
                // -- Create a new message --
                Message msg = new MimeMessage(session);
                // -- Set the FROM and TO fields --
                msg.setFrom(new InternetAddress(from, personal));
                msg.setRecipients(Message.RecipientType.TO,
                        InternetAddress.parse(to, false));
                // -- We could include CC recipients too --
                // if (cc != null)
                // msg.setRecipients(Message.RecipientType.CC
                // -- Set the subject and body text --
                msg.setSubject(subject);
                //msg.setText(body);
                msg.setContent(body, "text/html");
                // -- Set some other header information --
                msg.setHeader("X-Mailer", "NotificationMail");
                msg.setSentDate(new Date());
                // -- Send the message --
                Transport.send(msg);
                return true;
            } catch (MessagingException ex){
                log.error(ex.toString());
                return false;
            } catch (Exception ex){
                ex.printStackTrace();
                return false;
    }and in cron.daily a script to daily execute the project:
    #!/bin/sh
    /usr/local/jdk1.5.0_06/bin/java -jar /home/admin/proj/notification/Notification.jar
    exit 0

  • Sending E-mail in Marketing Campaign

    Hi
    We have a requirement where we need to send E-mails to all 'Employee responsible' of customers in Campaigns.
    However at present system is having a field called 'E-mail address' field which will get the e-mail address from SPRO
    like below..
    SAP Implementation Guide > Customer Relationship Management > Marketing > Marketing Planning and Campaign Management > Personalized Mail > Maintain Sender Addresses for E-Mail
    Functional consultant will maintain an E-mail address(only one) here.However now the requirment is I should write a code such way that it should neglect this E-mail id and instead of this it should send the mail to all the 'Employee responsible' of customers in that Campaign.
    So could you please let me know the place (class or BADI of Function Module) in the SAP code where it stores the above said mail id so that I can modify the internal table with the required E-mail id's by replacing existing email id.(I'll try to use Enhancement spots...)
    Best Regards
    Anil

    Hi,
    You can send out email for marketing campaign in many ways.
    1.get the target group created using the BI infocube
    2.get the target group created using infoset query
    3.Import the business partner data directly from an external file (flat file).
    I will suggest an easy way of doing it.
    Login using Marketing professional Roles>workcenter>Marketing>Campaign>Create New campaign-->Create segment
    >create profile set>create profile-->create target group
    Note : when u create a campaign there will be a place where you can give the mailform name where the already created mail form name shuld be mainteined over ther, and the sender address too.
    click the target group created and click on the option import business partner.
    (pre req:the target email ids should be maintained as business partners in ur system whre you can maintain BPs email-id in the BP Transaction)
    get the list of business partner ids downloaded in the flat file from BP table.
    Import the list>start or schedule the camapign>you can run ur campaign for all the BPs .
    or manually enter the BP ids in the target group where the email address maintained for those BPs will be the target ids for your campaign.
    give a try.Let me know if you have any queries.
    Regards
    Jgds

  • Campaign Automation Responses

    All I have configured campaign automation .
    Scenario: To collect all survey responders to one target group and collect non-responders to different target group.
    System Settings:
    Configuration:
    1.     Objective, tactics, campaign type, communication medium, transaction type for outgoing email, transaction types for incoming email, for incoming email transaction type defined Action profile, all workflow settings, marketing survey, attached survey URL to email form, created target group with email id
    Settings:
    1.     Created campaign
    2.     Created campaign element1 with target group, communication medium (email), workflow u2013 send target group to channel
    3.     Created rules u2013 survey responders to campaign element2, non-responders to campaign element3
    4.     Created Campaign elemen2, attached empty target group, workflow- Add BP to Target Group
    5.     Created campaign element 3, attached empty target group, workflow u2013 Add BP to Target Group
    Problem:
    1.     After executing the campaign, I can see the email with survey. When I save the survey, it prompts me to Outlook with To Email ID and also .ATT file.
    2.     After the sending this email, in campaign element1, NUMBER OF RESPONSES ARE NOT GETTING UPDATED
    3.     Also, target groups Campaign Element2 and Element3 are empty
    What are the required settings for BAdI?
    a.     BAdI: Campaign Determination
    b.     BAdI: PAI Processing of Survey Data in Campaign Automation
    Please let me know

    Hi,
    You dont need BAdi implemention for your scenario. SAP standard provides this functionality.
    Now, sice you are facing the problem, check the below points:
    1.) "Start for every respondent" should be checked.
    2.) Check the URL in your mail form: You should insert the URL with option "tracking via Target Site" or "Intermediate site" based on
          your requirement. To know the differenc between these two tracking option, check the documentation for Hyperlink in
          Personalized Mail under Marketing scenario.
    3.) Last but not least, check your condition. Make sure you have selected the correct question and answer in the decission node.
    If these three are correct, your requirement will be met. You do not need any BAdi implementation for this requirement.
    BR, Sathish R

  • Campaign Automation – Periodic Campaign. How does it work properly?

    Hey guys,
    I would like to start a period campaign (once per week over 52 weeks). Depending on the survey answers I get back from business partners, I would like to create weekly new target groups (where I want to collect the business partners in 3 groups: partners who answered yes, partners who answered no and partners who did not react to the survey), a new telephone list (with communication channel u201CFile Exportu201D  for partner who answered no) and u201CThank-youu201D (for partner who answered yes)-as well as u201CReminderu201D(for partner who did not react at all)-emails. 
    Unfortunately the realization does not work as I hoped. After my second period started only the survey email will be send out again, but the target groups are not getting updated anymore and the jobs (after the business partners send back their answers) do not get triggered so no new target groups, telephone lists or emails are getting generated after the first period.
    Here my questions:
    u2022     Why does, after my second period started (automatically), only the send out of the survey email works but no connection jobs get triggered after the answer are coming into the system, as sending out the u201EThank-Youu201C Mail, update of target groups or generation of the telephone list? Which of my setting could be wrong? How does the set-up of the campaign automation need to look like so that this will work?
    u2022     To my knowledge, generated target groups from the first period need to be emptied again automatically (or at least be set back to the old condition) before the second (third, fourth, fifth etc.) period starts, so that this one can be executed correctly (e.g. partners who answered yes in the second period can be collected correctly this time without getting mixed up with partners who said yes in the first period). How can this be accomplished? Is there a Badi for this? Anything else?
    u2022     In case there is really a way, that I can set target groups to the u201Coldu201D condition, where can I see e.g. the generated telephone lists or target groups from previous periods? Where does information like this get saved? In the campaign automation itself only the last information can be found and old information probably get overridden with the next periods information so where do I find the information from previous periods? Because I am pretty sure that you would like to be able to control who e.g. did not react to the campaign six periods before or which business partners said yes 10 periods before.
    It would be awesome if anyone could give me some answers or information where I might get answers to that problem or how I need to set up my campaign so that my requirements can get implemented.
    Thank you very much in advance!
    Janine
    Edited by: Janine P. on Nov 24, 2011 11:05 AM

    Hi Sapan,
    this is what SAP answered me:
    "As per my understanding, this requirement could work, but this might
    cause Human errors, thus creating issues for your functionality.
    Ideally, the Periodic campaigns are meant for multiwaves itself, but
    the Target Group is the same in all the waves. However, if you wish to
    change the Target Group during the Campaign Period, then this could
    cause manual errors, thus leading to disruption of the normal flow and
    thus the Campaign itself.
    Also, since the process would anyway involve manual intervention for
    changing the Target Group, you could also Copy the already existing
    Periodic Campaign and create a new one having the newly created Target
    Group.It would take hardly 5 min extra and the naming conventions would
    help you in maintainence or reporting at a later stage as well.
    For Example:
    1st week : Periodic_Campaign_1 and Target_Group_1
    2nd week : Periodic_Campaign_2 and Target_Group_2
    52nd week : Periodic_Campaign_52 and Target_Group_52
    Therefore, I would suggest you to go ahead with this approach.
    However, if you still wish to try out the single Campaign for the full
    year(52 weeks), I would suggest you to try out an example campaign with
    the below inputs:
    1. Create the Marketing Attribute questions and assign them to the BP's.
    2. Create a Profile which holds these Marketing Attributes.
    3. In the Periodic Campaign, use the Workflow 'Create TG and Channel
    Transfer'. This would create the Target Group using this profile and
    also send mails to this Target Group.
    4. Make changes to the Profile parameters during the campaign sleep
    period(after the 1st execution is over and before the 2nd execution,
    and so on)
    You can test for Period type 'hours'/'days' using such a campaign and
    test if it works correctly as per your requirement. "
    Hope this helps.
    Kind regards,
    Janine

  • Unable to collect Non Respondants in campaign automation

    Hi All
    In campaign Automation we have a requirement to send and Email and Direct mail in Wave 1 and then send a reminder email2 and call1 to non respondants. We do not have  a survey in our requirement. Could you please tell me what rules should be defined to collect Non Respondants.The campaign execution is started but not flowing to the next wave.  I have used without condition rule for Non Respondants but still not triggering. Should I do any Badi Enhancement for defining rules in this scenario?
    Regards
    Ramya

    Hi,
    1.)  If you dont have a survey in campaign, you cannot collect response from the BP. So, there is no way you can find out 
          whether a BP has resposnded or not.
    2.)  One scrap solution could be send a reminder mail to all the BPs again. You can schedule a new campaign element with start
          date as a future date.
    There is a tricky way of doing it. It might need lot of Workflow knowledge.
    Create a new workflow, which reads the infromation from the table CRMD_IM_ML_ITEM, with the information from CGPL_PROJECT and CRMD_IM_ML_HEAD tables. If sum_access or sum_replied is incremented, the BP has read the mail. You have to then refer the "CREATE TARGET GROUP" workflow to create a new target group for those BP. Those are the BPs who have responded. The remaining are the TG who did not responded. You can send a mail to these BPs.
    To achieve this, your mail should atleast have a tracking URL. Refer Personalized Mail Forms documentation in Marketing to know how to add a tracking URL in a mail form.
    To remind you, the above mentioned work flow creation will be a tedious job. If you can accomplish it, you will be able to achive what you wanted.
    BR, Sathish R

  • Survey response in campaign automation

    Hi Experts,
    I have set up a campaign automation scenario in CRM 7.0 but am not able to trigger next campaign element based on survey response. The campaign automation scenario is as below.
    Campaign u2013 Campaign Element 1 -> Decision Node -> Campaign Element 2
    u2022     Campaign element1 has a target group assigned. Workflow "Send target group to Channel" is selected. The Channel is set up to create Business activity.
    u2022     Set up a standard u201CQuestionaireu201D rule in the decision node to send all those BP to u2018campaign element2u2019 who have responded u201CYesu201D to the survey.
    u2022     In the u2018campaign element 2u2019 selected workflow u201Ctransfer Responder to Channelu201D and selected sales order in the communication medium.
    When I u201CStart processu201D from campaign, it creates Business activity for u2018campaign element 1u2019. The survey is also created in business activity. But, when I update survey response within the activity, it does not trigger next campaign element.
    I have even tried maintaining an empty target group in u2018campaign element 2u2019 and selected workflow as u201CAdd BP to target groupu201D. Even in this scenario, BP are not updated in the empty target group after responding to survey.
    Any help will be appreciated.
    Thanks

    Hi Umesh,
    When you send printed letter, the automation scenario is broken there.
    Complete automation will work only if you are sending the campaign with E-mail and survey(trackable). Only these values can trigger the follow up steps (workflows).
    If dont opt for the above mehod, you will have to creae campaigns for each step. You cannot have campaign automation. You can optimize the steps by choosing ELM to create mass Lead and TG at one shot. Later you can use this TG for next campaign.
    Automation is not possible without trackkable URL.
    BR, Sathish R

  • Thank you Email in Campaign Automation going out as attachment

    We are executing a campaign automation process and sending out survey in the first campaign element. The customers who answer to the survey are sent out a thank you email automatically.
    This thank you email is going out as an attachment with empty body instead of regular mail.
    But when same mail form is sent out thourgh communication test directly through "Maintain Personal Forms" (without BPs ), it goes out fine .
    Only When its send out in thank you email as a follow up step for someone who replies to the survey does this happen.
    Please help

    Hi Gregor
    Thanks for your quick response.
    Same thing happens even if i test it with a BP.
    But late this evening i figured it out. Only for thank you email ( because this workflow is kicked off in response to survey answer) the only format that works with the email forms is following :
    usage : Internet Mail (smtp)
    Text type : Text or HTML
    Every other combination corrupts thank you email.
    thanks and best regards.
    Mohanpreet

  • Campaign Automation is next step is not starting

    Hello Guru's,
    Greetings.
    I have created a campaign automation workflow like this..
    1) Created a Campaign 1 - Campaign start
    2) Created a campaign 2 as element - Assigned a communication method as e-mail with Survey link (Suevey is created under marketing)  - Assigned a work flow send target group to channel - Have used the CRM_MKTCA_SURVEY_MKT_PBO and CRM_MKTCA_SURVEY_MKT_PAI in the survey to create the lead
    3) Created a campaign decision - If "Would you like to receive the application with options as Yes"
    4) Created a campaign 3 with empty target group and assigned a work flow "Add BP to Target Group" - Selected an option of Start for every respondant
    5) Created a Campaign 4 by using the traget group created in step 4
    6) I have activated all workflows
    7) made the workflows as general
    Released the campaign 1
    Saved
    Started the campaign
    Campaign execution started and sends the mail to target group. I have responded for the survey, I can see the results on survey suite, also the Lead created.
    Problem is .....
    The decision is not triggering even if I select yes for step 3 (Condition is met), not starting the next step.
    I am missing some thing here, can you please guide.
    Thank you very much.

    Sloved my self by assigning the CAMPAIGN_AUTOMATION_LEAD Action profile to the Lead transaction in SPRO. This Action Profile will have MKTCA_PROC_INB method, which will trigger the next steps or followup actions.
    Thanks to all

  • Campaign automation - How to create correct flow?

    Hi Experts,
    I am trying to understand how campaign automation is working. So fare autostudy works fine.
    I did some tests in client 100 with the follwing structure: Campaign (without channel) and two campaign elementes: 1) email with survey X (channel is email with activity), 2) generation of Lead (channel is the lead).
    In the campaign modelling screen, I connected campaign with the first campaign element.
    1. campaign elemente has a target group, the workflow assigne is "send target group to channel".
    I created a decision note for survey, with one rule that is: for everybody that answers survey X conect with 2. campaign element.
    2. campaign has marked flag "Start for every respondent", workflow is "Transfer responder to channel".
    This works fine in client 100.
    But in cliente 200, I get the error "No channel has been entered for the campaign/campaign element".
    When I enter target group and channel to campaign in client 200 I am able to start the campaign.
    Now I am confused: What is the correct prosses? Use campaign elements with channel data and leave these fiels in blank in campaign?
    Or is the neccessary to enter target group and channel data to campaign?? This seems weired to me.
    Thanks and best regards,
    Cristina

    Hello Cristina,
    As far I know, each campaign element is campaign itself.
    So each campaign or campaign element can have TG and channel assigned to it depending on the business scenario.
    With respect to campaign automation , the cannel assigned to the campaign corresponds to the channel on which you would be running this automation.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • Sending E-mail to large number of recipients

    Hi,
    Note 598718 describes number of messages that is possible to send pr second if paralell prosessing is used:
    "For all SAP technology Releases 6.xx, one of the next Support Packages will deliver a basic change of the SAPconect send job which will provide scalability of the throughput by using several parallel send jobs and/or application servers. This will allow a throughput of approximately 15 messages per second (about 1,000,000 messages per day)."
    Does anybody know if this still is the limit (15 pr. second) in CRM 7.0 and if there is a way to improve this number?
    Regards,
    Ronny

    I thought about using BCC, but it seems a little messy although it would do the job.
    Messy how?  That's exactly what it's for.  In fact, there's no other way to hide addresses from other recipients of the message.  The only other way to do it would be to script automated sending of one message per address, and that would get quite messy!
    What is the maximum number of recipients that Mail can handle?
    There's no limit enforced by Mail, AFAIK.  The limits come from the SMTP server you're using.
    One of the issues I had when using Outlook on Windows for this by copying and pasting from a text document, was that if there was an invalid/non-existent address in the list, it would just return an error and I was never quite sure if the whole thing didn't send, or if it was just to the dodgy address(es).
    In Mail, you'll just get a bounce message for any addresses that don't exist.  The one exception to that is addresses on the same server that you're sending from...  often, the server will simply reject the attempt to send to an address that it knows doesn't exist.  I'm not sure what kind of message the server returns in that case, though, and suspect it depends on the server.  It's been a while since I've seen such a problem.

  • How to send a mail as .txt attachment ?

    Hi all,
    I got a requirement to write code for sending mail in oops.
    i have written code for .xls which is working fine. But requirement is to send the mail in the format of txt.
    i just only chnge the .xls to .txt where i can see the output properly in sap but problem is that i am unable to get the proper alignment. when i execute the report and see the output in sost i can see the attachment.i am downloading the attachment there only(Our server is not configured to get the mails directly) .So when i open the saved text file on my pc the output is appearing as follows...
    pernr nachn vorna
            0001 L0001 F0001
                0002 L0002 F0002
                   0003 L0003 F0003
                         0004 L0004 F0004...
    Where it should come in straight line as follows in my o/p code..
    pernr nachn vorna
    0001 L0001 F0001
    0002 L0002 F0002
    0003 L0003 F0003
    0004 L0004 F0004...
    i am puttin g my code ..please correct me where i am wrong .....waiting for your valuabel inputs..
    *& Report  ZGBTEST02
    REPORT  YSAS_MAIL2.
    *Changes done by sas
    *PARAMETERS: P_MAIL TYPE AD_SMTPADR OBLIGATORY, " G C by sas
    *P_MAIL1 TYPE AD_SMTPADR OBLIGATORY." G by sas
    TABLES: ADR6.
    SELECT-OPTIONS:P_EADDR FOR ADR6-SMTP_ADDR NO INTERVALS .
    *end of changes by sas
    DATA: I_GLT0 TYPE STANDARD TABLE OF GLT0.
    *DATA: I_pernr  TYPE STANDARD TABLE OF pa0002.  " MARA Entries
    DATA: BEGIN OF I_PERNR OCCURS 1 ,
    PERNR TYPE PA0002-PERNR,
    NACHN TYPE PA0002-NACHN,
    VORNA TYPE PA0002-VORNA,
    END OF I_PERNR..
    *      I_MARC  TYPE STANDARD TABLE OF MARC.  " MARC Entries
    DATA: L_TEXT  TYPE CHAR255.  " Text
    DATA: L_LINES TYPE I,
          L_SIZE  TYPE SOOD-OBJLEN.
    " Size of Attachment
    * Mail related
    DATA: I_CONTENT         TYPE   SOLI_TAB, " Mail content
          I_ATTACH          TYPE   SOLI_TAB, " Attachment
          I_ATTACH1         TYPE   SOLIX_TAB. " Attachment
    DATA: L_SEND_REQUEST    TYPE REF TO    CL_BCS,
                                                " E-Mail Send Request
          L_DOCUMENT        TYPE REF TO    CL_DOCUMENT_BCS,
                                                " E-Mail Attachment
          L_RECIPIENT       TYPE REF TO    IF_RECIPIENT_BCS,
                                                " Distribution List
          L_SENDER          TYPE REF TO    IF_SENDER_BCS,
                                                " Address of Sender
          L_UNAME           TYPE           SALRTDRCPT,
                                                " Sender Name(SY-UNAME)
          L_BCS_EXCEPTION   TYPE REF TO    CX_DOCUMENT_BCS,
                                                " BCS Exception
          L_ADDR_EXCEPTION  TYPE REF TO    CX_ADDRESS_BCS,
                                                " Address Exception
          L_SEND_EXCEPTION  TYPE REF TO    CX_SEND_REQ_BCS.
    " E-Mail sending Exception
    *Constants------------------------------------------------------------*
    CONSTANTS: C_TAB(1) TYPE C VALUE
               CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB,
                                         " Tab Character
               C_CR(1)  TYPE C VALUE CL_ABAP_CHAR_UTILITIES=>CR_LF,
                                         " Line Feed for End-Of_line
               C_EXT    TYPE SOODK-OBJTP VALUE 'TXT'. " XLS Extension
    START-OF-SELECTION.
      SELECT PERNR NACHN VORNA  FROM PA0002 INTO CORRESPONDING FIELDS OF TABLE I_PERNR UP TO 20 ROWS.
    *select * from glt0 into table i_glt0.
    * Preparing body of the Mail
    *  MOVE 'SAP Material Master Records' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  CLEAR L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'Thanks,' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
    *  MOVE 'SAP MM' TO L_TEXT.
    *  APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>Attached is your HRIS report(s) generated from the Firm''s' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE ' Human Resources  Information System (SAP).' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
      MOVE '<BR>This is an automated report.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>  ' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    *        MOVE '<BR>Please do not reply to this email' TO l_text.
    *        APPEND l_text TO i_content.
    *        MOVE '<BR>  ' TO l_text.
    *        APPEND l_text TO i_content.
      MOVE '<BR>Thank you.' TO L_TEXT.
      APPEND L_TEXT TO I_CONTENT.
    * Creates persistent send request
      TRY.
          L_SEND_REQUEST = CL_BCS=>CREATE_PERSISTENT( ).
    * Creating Document
          L_DOCUMENT = CL_DOCUMENT_BCS=>CREATE_DOCUMENT(
                                        I_TYPE  = 'RAW'
                                        I_TEXT  = I_CONTENT[]
                                        I_SUBJECT = 'Automated HRIS (SAP) Report' ).
    DATA: W_PERNR LIKE I_PERNR.
    * Preparing contents of attachment with Change Log
          PERFORM PREPARE_ATTACHMENT.
          DATA: compressed like solisti1 occurs 10 with header line.
    DATA: decompressed like solisti1 occurs 10 with header line.
          CALL FUNCTION 'TABLE_COMPRESS'
    *   IMPORTING
    *     COMPRESSED_SIZE       =
                        TABLES
    *      in                    = eerec
                          in                    = i_attach
                          out                   = compressed.
          CALL FUNCTION 'TABLE_DECOMPRESS'
            TABLES
              in  = compressed
              out = decompressed.
          DESCRIBE TABLE decompressed LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
          L_SIZE = L_LINES * 2 * 255.
    * Adding Attachment
          CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
            EXPORTING
              I_ATTACHMENT_TYPE    = C_EXT
              I_ATTACHMENT_SIZE    = L_SIZE
              I_ATTACHMENT_SUBJECT = 'Hr Details'
    *          i_att_content_hex    = i_attach[].
              I_ATT_CONTENT_TEXT   = decompressed[].
    *      DESCRIBE TABLE I_MARC LINES L_LINES.
    * Size to multiplied by 2 for UNICODE enabled systems
    *      L_SIZE = L_LINES * 2 * 255.
    ** Adding Attachment
    *      CALL METHOD L_DOCUMENT->ADD_ATTACHMENT
    *        EXPORTING
    *          I_ATTACHMENT_TYPE    = C_EXT
    *          I_ATTACHMENT_SIZE    = L_SIZE
    *          I_ATTACHMENT_SUBJECT = 'MARC Details'
    *          I_ATT_CONTENT_HEX    = I_ATTACH1[].
    **          i_att_content_text   = i_attach1[].
    * Add document to send request
          CALL METHOD L_SEND_REQUEST->SET_DOCUMENT( L_DOCUMENT ).
          DATA:LR_SENDER TYPE REF TO IF_SENDER_BCS,
               LR_SEND TYPE REF TO CL_BCS.
    * Preparing the sender object
    *      LR_SENDER = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( sy-uname ).
          DATA: L1_UNAME TYPE SY-UNAME.
          L1_UNAME = SY-UNAME.
          LR_SENDER = CL_SAPUSER_BCS=>CREATE( L1_UNAME ).
    * Setting the sender
          CALL METHOD L_SEND_REQUEST->SET_SENDER
            EXPORTING
              I_SENDER = LR_SENDER.
    * E-Mail
          LOOP AT P_EADDR.
            TRANSLATE P_EADDR-LOW TO LOWER CASE.
            L_RECIPIENT = CL_CAM_ADDRESS_BCS=>CREATE_INTERNET_ADDRESS( P_EADDR-LOW ).
            CALL METHOD L_SEND_REQUEST->ADD_RECIPIENT
              EXPORTING
                I_RECIPIENT  = L_RECIPIENT
                I_EXPRESS    = 'U'
                I_COPY       = ' '
                I_BLIND_COPY = ' '
                I_NO_FORWARD = ' '.
            IF SY-SUBRC EQ 0.
              WRITE:/'** SUCCESS:  Email Sent to', P_EADDR-LOW COLOR COL_NORMAL.
            ELSE.
              WRITE:/'** ERROR: Failed to send Email to',P_EADDR-LOW COLOR COL_NEGATIVE .
            ENDIF.
          ENDLOOP.
    *Trigger E-Mail immediately
          L_SEND_REQUEST->SET_SEND_IMMEDIATELY( ' ' ).
          CALL METHOD L_SEND_REQUEST->SEND( ).
          COMMIT WORK.
        CATCH CX_DOCUMENT_BCS INTO L_BCS_EXCEPTION.
        CATCH CX_SEND_REQ_BCS INTO L_SEND_EXCEPTION.
        CATCH CX_ADDRESS_BCS  INTO L_ADDR_EXCEPTION.
      ENDTRY.
    *&      Form  PREPARE_ATTACHMENT
    FORM PREPARE_ATTACHMENT .
      FIELD-SYMBOLS: <LFS_TABLE>,    " Internal table structure
                     <LFS_CON>.      " Field Content
      DATA: L_TEXT TYPE CHAR1024.     " Text content for mail attachment
      DATA: L_CON TYPE STRING. "(50) TYPE c.        " Field Content in character format
      DATA: L_STR TYPE STRING,
            L_STR1 TYPE STRING.
    *data: w_pernr type TABLE OF I_PERNR.
      DATA: LS_SOLIX TYPE SOLIX.
    *  CONCATENATE 'PERNR' 'FIRST NAME' 'Last Name' C_CR INTO L_TEXT SEPARATED BY '|'.
    *  append l_text to i_attach.
    *  clear l_text.
    * Columns to be tab delimeted
      LOOP AT I_PERNR ASSIGNING <LFS_TABLE>.
        DO.
          ASSIGN COMPONENT SY-INDEX OF STRUCTURE <LFS_TABLE>
                 TO <LFS_CON>.
          IF SY-SUBRC NE 0.
            CONCATENATE C_CR L_TEXT INTO L_TEXT.
    *        CONCATENATE l_str c_cr l_text INTO l_str.
    *        ls_solix-line = l_text.
    *        APPEND ls_solix TO i_attach.
            APPEND L_TEXT TO I_ATTACH.
            EXIT.
          ELSE.
            CLEAR: L_CON.
            MOVE <LFS_CON> TO L_CON.
            CONDENSE L_CON.
            IF SY-INDEX = 1.
              CLEAR: L_TEXT.
              MOVE L_CON TO L_TEXT.
            ELSE.
              CONCATENATE L_TEXT L_CON INTO L_TEXT
                 SEPARATED BY C_TAB.
            ENDIF.
          ENDIF.
        ENDDO.
      ENDLOOP.
    *  i_attach1[] = i_attach[].
    ENDFORM.                    " PREPARE_ATTACHMENT
    Please if any one having 6.0 version please upload it and see..
    Regards
    Sas

    Hi ,
    Did you downloaded from  SOST  using the display icon and inside that 4th tab for attachment ....
    and see?
    Regards
    sas
    pS: THE FIRST page is not allowing the spaces in sdn...
    i am getting o/p as
    pernr vochn norna
    .........0001 f0001 l0001
    .................0002 F0002 L0002
    .......................0003 F0003 L0003.....
    Please remove dots and understand that is the o/p i am getting in my presenation file
    i just expecting the o/p as told earlier..
    Regards
    sas

  • Sending e-mails to multiple users at a time

    Hi!
    I am using weblogic portal 7.0 for personalization. I am using campaign based e-mails for targetting specific customers. I am able to send e-mail through weblogic portal for users when the user logs in. How can I send group e-mails for a specific campaign. For example, if I have to send "virus alert" campaign mail for all our registered customer. I don't want any batch file to be written for this purpose.
    I would really appreciate your help.
    Thanks
    Anand

    Hi Deepak,
    The favorites are placed in the "userhome" repository. Take a look at KM Content -> userhome -> for each username -> Favorites, there you'll find links with the favorites. You can simply copy & paste those to the other users, so you don't have to login with each one.
    Regards,
    Pascal

Maybe you are looking for

  • DIY Fusion Drive on MacBookPro8,2

    Yes, I know it's not supported out ot the box. I've been trying to set up a DIY Fusion Drive on my Early 2011 MBP 15" with no luck. I've been googling a bit and found several others reporting the same problems on the MBP8,2. Seems this setup works on

  • Virtual Path in WebLogic 7.0

    Hi, I would like to create a virtual path for our appalication.currently the URL is something like this : http://a.com/blsapp/jsp/customer/Login.jsp Now , I need to create vritual path for /blsapp/jsp/customr =>customer So, the url would be http://a.

  • Using Captivate with SharePoint

    I apologize in advance, the "search within this forum" function is not working, so I can't search the Captivate forum to see if this question has already been answered. When you develop training and quizzes in Captivate, I've heard you can post the f

  • Ipad usage international?

    Can I use my ipad while traveling in Europe (ireland) from the US? THANK YOU!

  • Mix does not open Lightroom photos

    I have Photoshop Mix v1.1 and Lightroom Mobile v1.1.0 on my iPad 3 with iOS 7.1.2. I have made 6 collections in Lightroom 5.6 (CC) (on Windows 7) available to Lightroom Mobile and I can edit these successfully in LR Mobile on my iPad. So why does Pho