How to send Mailing Spool Details of Background jobin EXCEL format

Dear All,
Hope every one doing awesome.
As per client requirement we need to send spool detail to user in EXCEL format.
http://sapignite.com/sending-mail-for-background-job/
As per the mentioned thread ABAPER created the code and we are getting mails in HTML format.
Now the user wants the files in EXCEL format.
I had checked in SCOT and doesn't found any useful setting that will make the required changes.
Any other suggestion ?
Tons of thanks for your support.
Regards
Nikhil

need solution..

Similar Messages

  • How to send the spool output to the specific user during ALE distribution

    Hi All
    In ALE internal order Configuration done by BAPI Method SAVEREPLICA Business object BUS2075whenever user changed the internal order which is moved to the destination system because of change data setting in data element fields.
    I want to know how to send the spool output of the changed internal order to the specific user during ALE distribution.
    Please help me to reslove the above issue
    Thanks & Regards
    KRISHGUNA

    Solved by myself

  • How to send mail to distribution list ?

    Hi Everybody,
    Pls let me know how to send mail to distributed list???
    Thanks & Regards,
    raju<b></b>

    Hi ,
      Use Function Module 'SO_NEW_DOCUMENT_SEND_API1'.
      U need to pass Distribution list to Receiver and 'C' to receiver type refer the below code for clarification.
    Determine the Distribution List.
            gv_rec_list-receiver = gv_distribution.
            gv_rec_list-rec_type = 'C'.
            APPEND gv_rec_list.
    Check if Distribution List is deleted.
            SELECT SINGLE objnam
                     FROM soid
                     INTO lc_objnam
                     WHERE objnam = gv_rec_list AND
                           dlitp  = lc_dli.
            IF sy-subrc = 0.
              CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
                EXPORTING
                  document_data              = gv_doc_data
                  document_type              = 'RAW'
                  put_in_outbox              = 'X'
                TABLES
                  object_content             = gv_obj_cont
                  receivers                  = gv_rec_list
                EXCEPTIONS
                  too_many_receivers         = 1
                  document_not_sent          = 2
                  document_type_not_exist    = 3
                  operation_no_authorization = 4.
              CASE sy-subrc.
                WHEN '1'.
                 message i001(as) with 'TOO MANY RECEIVERS'.
                  EXIT.
                WHEN '2'.
                 message i001(as) with 'DOCUMENT NOT SENT'.
                  EXIT.
                WHEN '3'.
                 message i001(as) with 'DOCUMENT TYPE DOES NOT EXIST'.
                  EXIT.
                WHEN '4'.
                 message i001(as) with 'OPERATION NO AUTHORIZATION'.
                  EXIT.
              ENDCASE.
              Hope this might have helped you.
    Thanks,
    Prashanth

  • How can send mails using hotmail/rediffmail domain name?

    I have used the below code to send a mail using javamail API?Even when I am sending my application does not have notified any of error/exceptions,But the message is not reached to I have given receipient's address in the to field.
    import javax.mail.*;
    import javax.mail.internet.*;
    import javax.activation.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class Sendmail1 extends HttpServlet {
    private String smtpHost;
    // Initialize the servlet with the hostname of the SMTP server
    // we'll be using the send the messages
    public void init(ServletConfig config)
    throws ServletException {
    super.init(config);
    smtpHost = config.getInitParameter("smtpHost");
    //smtpHost = "sbm5501";
    smtpHost = "www.rediffmail.com";
    public void doGet(HttpServletRequest request,HttpServletResponse response)
    throws ServletException, java.io.IOException {
    String from = request.getParameter("from");
    String to "[email protected]";
    String cc = "[email protected]";
    String bcc ="[email protected]";
    String smtp ="www.rediffmail.com";
    String subject = "hai";
    String text = "Hai how r u";
    PrintWriter writer = response.getWriter();
    if (subject == null)
    subject = "Null";
    if (text == null)
    text = "No message";
    String status;
    try {
    // Create the JavaMail session
    java.util.Properties properties = System.getProperties();
    if (smtp == null)
    smtp = "www.rediffmail.com";
    properties.put("mail.smtp.host", smtp);
    Session session = Session.getInstance(properties, null);
    //to connect
    //Transport transport =session.getTransport("smtp");
    //transport.connect(smtpHost,user,password);
    // Construct the message
    MimeMessage message = new MimeMessage(session);
    // Set the from address
    Address fromAddress = new InternetAddress(from);
    message.setFrom(fromAddress);
    // Parse and set the recipient addresses
    Address[] toAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.TO,toAddresses);
    Address[] ccAddresses = InternetAddress.parse(cc);
    message.setRecipients(Message.RecipientType.CC,ccAddresses);
    Address[] bccAddresses = InternetAddress.parse(to);
    message.setRecipients(Message.RecipientType.BCC,bccAddresses);
    // Set the subject and text
    message.setSubject(subject);
    message.setText(text);
    Transport.send(message);
    //status = "<h1>Congratulations,</h1><h2>Your message was sent.</h2>";
    } catch (AddressException e)
    status = "There was an error parsing the addresses. " + e;
    } catch (SendFailedException e)
    status = "<h1>Sorry,</h1><h2>There was an error sending the message.</h2>" + e;
    } catch (MessagingException e)
    status = "There was an unexpected error. " + e;
    // Output a status message
    response.setContentType("text/html");
    writer.println("<title>sendForm</title><body bgcolor= ><b><h3><font color=green><CENTER>CALIBERINFO.COM</CENTER></h3>Your message was sent to recepient(s).<br><font color=red>"+"\n"+to);
    writer.println("<br><br><a href=e:/mail/javamail/mail.html>back to compose</a>");
    writer.close();
    Please any one help me out from this probs.
    Awaiting for yours reply,
    or give me a reply to: [email protected]
    Regards,
    @maheshkumar.k

    Hi,
    how can send mails using hotmail/rediffmail domain name?In your java application,you specified www.rediffmail.com as your
    smtp server.But that is the address of that website.Try will a smtp
    server instead.For a list of free smtp servers,please visit http://www.thebestfree.net/free/freesmtp.htm
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support/

  • How to send mail in html format in jsp???

    Hello everybody,
    I have two jsp pages.In one page I have the heading like Date,Transaction.I am retriving data from my second jsp page.And I hae included the second jsp page to my first jsp page.How to send mail this content in html format.
    Thanks
    Srikant

    MimeMessage m = new MimeMessage(session);
    BodyPart messageBodyPart = new MimeBodyPart();
    messageBodyPart.setContent(content, "text/html");this if u need to send a mail content as html

  • How to send mail with attachment

    Hi,
    How to send mail with word document as attachment in oracle pl/sql.
    kindly help me .
    thank you
    regards
    P Prakash

    create or replace procedure pdf_mail(
        p_sender     varchar2, -- sender, example: 'Me <[email protected]>'
        p_recipients varchar2, -- recipients, example: 'Someone <[email protected]>'
        p_subject    varchar2, -- subject
    p_text   varchar2, -- text
    p_filename  varchar2, -- name of pdf file
    p_blob   blob     -- pdf file
    ) is
      conn      utl_smtp.connection;
      i number;
      len number;
    BEGIN
      conn := demo_mail.begin_mail(
        sender     => p_sender,
        recipients => p_recipients,
        subject    => p_subject,
        mime_type  => demo_mail.MULTIPART_MIME_TYPE);
      demo_mail.begin_attachment(
        conn         => conn,
        mime_type    => 'application/pdf',
        inline       => TRUE,
        filename     => p_filename,
        transfer_enc => 'base64');
        -- split the Base64 encoded attachment into multiple lines
       i   := 1;
       len := DBMS_LOB.getLength(p_blob);
       WHILE (i < len) LOOP
          IF(i + demo_mail.MAX_BASE64_LINE_WIDTH < len)THEN
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, demo_mail.MAX_BASE64_LINE_WIDTH, i)));
          ELSE
             UTL_SMTP.Write_Raw_Data (conn
                                    , UTL_ENCODE.Base64_Encode(
                                            DBMS_LOB.Substr(p_blob, (len - i)+1,  i)));
          END IF;
          UTL_SMTP.Write_Data(conn, UTL_TCP.CRLF);
          i := i + demo_mail.MAX_BASE64_LINE_WIDTH;
       END LOOP;
      demo_mail.end_attachment(conn => conn);
      demo_mail.attach_text(
        conn      => conn,
        data      => p_text,
        mime_type => 'text/html');
      demo_mail.end_mail( conn => conn );
    END;
    ref:
    http://www.plpdf.com/23-1725.html
    Edited by: Mahanam on Jan 9, 2011 10:32 PM

  • How to send mail in APEX 4.1 using PLSQL

    Hi All,
    How to send mail in APEX 4.1 using PLSQL?
    Thanks In advance.
    Regards
    Shail

    http://lmgtfy.com/?q=oracle+apex+4.1+send+mail

  • How to Send mail in oracle 10g

    I am new in oracle developer.....we are using oracle 10g developer...how to send mail through oracle 10g on a button click.pease help me.
    Thanks in advance

    This question have been asked many times on this forum, see if you get help from following:
    https://forums.oracle.com/message/5395438#5395438
    Search results: https://forums.oracle.com/thread/search.jspa?peopleEnabled=true&userID=&containerType=&container=&q=form+email
    Check this out as well:
    http://nzchaudhry.wordpress.com/2013/05/31/send-report-via-email-attachment-in-oracle-forms-10g/
    You can find init.ora or initSID.ora file under $ORACLE_HOME/dbs on linux and on Windows under $ORACLE_HOME/database. Otherwise you can create it using "create pfile from spfile" command
    Aneel

  • How to send mail in PL/SQL using exchange server details.

    Hi Experts,
    Business user has provided us the exchange server details to send mails.How can I send mails thru PL/SQL using exchange server details.

    user595740 wrote:
    Business user has provided us the exchange server details to send mails.How can I send mails thru PL/SQL using exchange server details.Basic answer - not easily.
    Oracle supports the standard application protocol SMTP - it does not support a proprietary protocol like that used by Exchange that only works on the Windows operating system. It however provides you with the flexibility to code this yourself.
    If you for example use Microsoft MAPI (Mail Application Programming Interface), you can integrate it with PL/SQL using the external procedure (extproc) feature of Oracle.
    In a nutshell, extproc enables you to create PL/SQL wrappers for public DLL calls. I posted sample code that demonstrates this in {message:id=2271919}. The sample code is for calling a DLL interface on HP-UX, but the concept is identical on Windows.

  • How to send generated Spool file through e-mail

    Hi,
    We have a ABAP report which generates a spool file. Now there is a requirement to send this spool file to our clients external mail boxes.
    Also we would like to automate this so that whenever a spool file is generated, the system should automatically send it as an attachment to user mail inboxes.
    Any idea how I can achieve this. Thanks is advance!
    Regards,
    Vikrant.

    Hi Vikrant,
       Have a look at this code...
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            "MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
          lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
          lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
          lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
           file(60) TYPE c,
           END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
          object_id      LIKE soodk,
          link_folder_id LIKE soodk,
          g_document     LIKE sood4,
         g_header_data  LIKE sood2,
          g_folmem_data  LIKE sofm2,
          g_header_data  LIKE sood2,
          g_receive_data LIKE soos6,
          g_ref_document LIKE sood4,
          g_new_parent   LIKE soodk,
          l_folder_id    LIKE sofdk,
          v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
          name    LIKE tst01-dname,
          objtype LIKE rststype-type,
          type    LIKE rststype-type.
    DATA: numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE 'X',
          store_flag  LIKE sonv-flag,
          delete_flag LIKE sonv-flag,
          owner       LIKE soud-usrnam,
          on          LIKE sonv-flag VALUE 'X',
          sent_to_all LIKE sonv-flag,
          g_authority LIKE sofa-usracc,
          w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
          n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
          real_type LIKE sood-objtp,
          attach_type LIKE sood-objtp,
          otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
          ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
               c_objtp    LIKE g_document-objtp    VALUE 'RAW',
               c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *"  TABLES
    *"      LT_BODY_EMAIL STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      IF sy-subrc NE 0.
        RAISE err_no_abap_spooljob. "doesn't exist
      ELSE.
        client = tsp01-rqclient.
        name   = tsp01-rqo1name.
        CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  authority     = 'SP01'
                  client        = client
                  name          = name
                  part          = 1
             IMPORTING
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4
                  OTHERS        = 5.
        IF objtype(3) = 'OTF'.
          desired_type = otf.
        ELSE.
          desired_type = ali.
        ENDIF.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = src_spoolid
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  owner     = sy-uname
                  region    = ou_fol
             IMPORTING
                  folder_id = l_folder_id
             EXCEPTIONS
                  OTHERS    = 5.
    fill out informations about the header of the email
        CLEAR: g_document.
        g_document-foltp     = l_folder_id-foltp.
        g_document-folyr     = l_folder_id-folyr.
        g_document-folno     = l_folder_id-folno.
        g_document-objtp     = c_objtp.
        g_document-objdes    = header_mail.
        g_document-file_ext  = c_file_ext.
        g_header_data-objdes    = header_mail.
        CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
             EXPORTING
                  method      = 'SAVE'
                  office_user = sy-uname
             IMPORTING
                  authority   = g_authority
             TABLES
                  objcont     = lt_body_email
                  attachments = lt_attachments
             CHANGING
                  document    = g_document
                  header_data = g_header_data
             EXCEPTIONS
                  OTHERS      = 1.
        folder_id-objtp = l_folder_id-foltp.
        folder_id-objyr = l_folder_id-folyr.
        folder_id-objno = l_folder_id-folno.
        object_id-objtp = c_objtp.
        object_id-objyr = g_document-objyr.
        object_id-objno = g_document-objno.
        link_folder_id-objtp = l_folder_id-foltp.
        link_folder_id-objyr = l_folder_id-folyr.
        link_folder_id-objno = l_folder_id-folno.
        REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = 'X'.
       lt_rec_tab-recesc     = object_type.   "This field for FAX/MAIL
       lt_rec_tab-recnam     = 'U-'.
       lt_rec_tab-deliver    = 'X'.
       lt_rec_tab-not_deli   = 'X'.
       lt_rec_tab-read       = 'X'.
       lt_rec_tab-mailstatus = 'E'.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = '5'.
       APPEND lt_rec_tab.
          lt_rec_tab-recextnam = fax_mail_number.
          lt_rec_tab-recesc = object_type.
          lt_rec_tab-sndart = 'INT'.
          lt_rec_tab-sndpri = 1.
          APPEND lt_rec_tab.
        lt_files-file = c_file.
        APPEND lt_files.
    begin of insertion by faianf01
        hd_dat-objdes = header_mail.
        CALL FUNCTION 'SO_ATTACHMENT_INSERT'
             EXPORTING
                  object_id                  = object_id
                  attach_type                = attach_type
                  object_hd_change           = hd_dat
                  owner                      = sy-uname
             TABLES
                  objcont                    = l_objcont
                  objhead                    = l_objhead
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  x_error                    = 1000.
        IF sy-subrc > 0.
        ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
        CALL FUNCTION 'SO_OBJECT_SEND'
             EXPORTING
                  folder_id                  = folder_id
                  object_id                  = object_id
                  outbox_flag                = outbox_flag
                  link_folder_id             = link_folder_id
                  owner                      = sy-uname
                 check_send_authority       = 'X'
             TABLES
                  receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  component_not_available    = 1
                  folder_no_authorization    = 5
                  folder_not_exist           = 6
                  forwarder_not_exist        = 8
                  object_no_authorization    = 13
                  object_not_exist           = 14
                  object_not_sent            = 15
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  too_much_receivers         = 73
                  user_not_exist             = 35.
      ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"  TABLES
    *"      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
      DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
      vg_achou = 1.
      DO 60 TIMES.
        SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
        IF sy-subrc IS INITIAL.
          CLEAR vg_achou.
          EXIT.
        ELSE.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO.
      IF vg_achou = 1.
        RAISE err_no_abap_spooljob. "doesn't exist
      ENDIF.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      IF objtype(3) = 'OTF'.
        desired_type = otf.
      ELSE.
        desired_type = ali.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                rqident              = src_spoolid
                desired_type         = desired_type
           IMPORTING
                real_type            = real_type
           TABLES
                buffer               = l_objcont
           EXCEPTIONS
                no_such_job          = 14
                type_no_match        = 94
                job_contains_no_data = 54
                no_permission        = 21
                can_not_access       = 21
                read_error           = 54.
      IF sy-subrc EQ 0.
        attach_type = real_type.
      ENDIF.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = header_mail.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = header_mail.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      REFRESH lt_rec_tab.
      LOOP AT LIST_FAX_MAIL_NUMBER.
        lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
        lt_rec_tab-recesc = 'U'.
        lt_rec_tab-sndart = 'INT'.
        lt_rec_tab-sndpri = 1.
        APPEND lt_rec_tab.
      ENDLOOP.
      lt_files-file = c_file.
      APPEND lt_files.
      hd_dat-objdes = header_mail.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
      IF sy-subrc > 0.
      ENDIF.
    send email from SAPOFFICE
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                folder_id                  = folder_id
                object_id                  = object_id
                outbox_flag                = outbox_flag
                link_folder_id             = link_folder_id
                owner                      = sy-uname
           TABLES
                receivers                  = lt_rec_tab
                note_text                  = lt_note_text
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                component_not_available    = 1
                folder_no_authorization    = 5
                folder_not_exist           = 6
                forwarder_not_exist        = 8
                object_no_authorization    = 13
                object_not_exist           = 14
                object_not_sent            = 15
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                too_much_receivers         = 73
                user_not_exist             = 35.
    ENDFUNCTION.
    Regards,
    Santosh

  • How to send mail as a distribution list

    I have created a number of distribution lists under the groups tab just to the right of mailboxes in the recipients section of the exchange admin centre in microsoft exchange 2013.
    i have set permission on these mailboxes for send as to be permitted but when trying to send mail from outlook 2013, outlook web app or from ios i am unable to get the distribution lists email address to appear in the from list.
    could someone please explain how i can resolve this for each of these 3 platforms?

    Hi,
    Great advice from Veerapandian.
    Based on my knowledge, Distribution List is based on Outlook, Distribution Group is based on Exchange server. You can grand send as permission to DG.
    Send as permission is a permission based on AD, please make sure the DG can be resolved from GAL.
    Please run following command to whether set “Hide this group from address lists” attribution, if so please remove this setting.
    Get-DistributionGroup | FL alias,*HiddenFromAddressListsEnabled*
    More details about Configure Distribution Group Properties, please refer to:
    http://technet.microsoft.com/en-us/library/bb124513(v=exchg.150).aspx
    Best Regards,
    Allen Wang

  • How to send mail through report??

    hi experts....
    i want to create a report to send an email to department representative when pending PO is created.
    can some1 tell me how is it possible to send an email through report?
    thanks..

    Refer the following programs:
    <b>Mail sent without attachment:</b>
    REPORT Z34332_MAIL.
    * Check the mail in T-code SBWP
    * To check the send mail status T-Code SOST
    data: it_packing_list type table of SOPCKLSTI1,
    wa_packing-list like line of it_packing_list,
    it_receivers type table of SOMLRECI1,
    wa_receivers like line of it_receivers,
    it_mailbody type table of SOLISTI1,
    wa_mailbody like line of it_mailbody.
    data: la_doc type SODOCCHGI1.
    * mail header
    la_doc-OBJ_DESCR = 'HI'.
    * Describe the body of the message
    CLEAR wa_packing-list.
    REFRESH it_packing_list.
    wa_packing-list-transf_bin = space.
    wa_packing-list-head_start = 1.
    wa_packing-list-head_num = 0.
    wa_packing-list-body_start = 1.
    * DESCRIBE TABLE gt_mara LINES wa_packing-list-body_num.
    wa_packing-list-body_num = 1.
    wa_packing-list-doc_type = 'RAW'.
    APPEND wa_packing-list to it_packing_list.
    * Add the recipients email address
    CLEAR wa_receivers.
    REFRESH it_receivers.
    wa_receivers-receiver = 'PCSDEVL'.
    wa_receivers-rec_type = 'U'.
    wa_receivers-com_type = 'INT'.
    wa_receivers-notif_del = 'X'.
    wa_receivers-notif_ndel = 'X'.
    APPEND wa_receivers to it_receivers.
    * Mail Body
    CLEAR wa_mailbody.
    REFRESH it_mailbody.
    wa_mailbody-line = 'How are you.'.
    APPEND wa_mailbody to it_mailbody.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = la_doc
    PUT_IN_OUTBOX = 'X'
    * SENDER_ADDRESS = SY-UNAME
    * SENDER_ADDRESS_TYPE = 'B'
    COMMIT_WORK = 'X'
    * IMPORTING
    * SENT_TO_ALL =
    * NEW_OBJECT_ID =
    * SENDER_ID =
    tables
    packing_list = it_packing_list
    * OBJECT_HEADER =
    * CONTENTS_BIN =
    CONTENTS_TXT = it_mailbody
    * CONTENTS_HEX =
    * OBJECT_PARA =
    * OBJECT_PARB =
    receivers = it_receivers
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    <b>
    mail with attachment:</b>
    REPORT Z34332_MAIL_WITH_ATTACHMENT1.
    types: begin of t_mara,
    matnr type mara-matnr,
    matkl type mara-matkl,
    mtart type mara-mtart,
    meins type mara-meins,
    end of t_mara.
    data: gt_mara type table of t_mara,
    wa_mara like line of gt_mara,
    it_packing_list type table of SOPCKLSTI1,
    wa_packing_list like line of it_packing_list,
    it_receivers type table of SOMLRECI1,
    wa_receivers like line of it_receivers,
    it_mailbody type table of SOLISTI1,
    wa_mailbody like line of it_mailbody,
    it_attachment type table of SOLISTI1,
    wa_attachment like line of it_attachment.
    data: la_doc type SODOCCHGI1.
    constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
    * get material
    select matnr matkl mtart meins
    into table gt_mara
    from mara
    up to 25 rows.
    * Populate the subject/generic message attributes
    la_doc-obj_langu = sy-langu.
    la_doc-obj_descr = 'Material Details' . "Mail Header
    la_doc-sensitivty = 'F'.
    la_doc-doc_size = 1.
    * Add the recipients email address
    CLEAR wa_receivers.
    REFRESH it_receivers.
    wa_receivers-receiver = 'PCSDEVL'.
    wa_receivers-rec_type = 'U'.
    wa_receivers-com_type = 'INT'.
    wa_receivers-notif_del = 'X'.
    wa_receivers-notif_ndel = 'X'.
    APPEND wa_receivers to it_receivers.
    * Mail Body
    CLEAR wa_mailbody.
    REFRESH it_mailbody.
    wa_mailbody-line = 'Please find the attachment'.
    APPEND wa_mailbody to it_mailbody.
    * Mail attachmwnt
    CLEAR wa_attachment.
    REFRESH it_attachment.
    CONCATENATE 'MATNR' 'MATKL' 'MTART' 'MEINS'
    INTO wa_attachment SEPARATED BY con_tab.
    CONCATENATE con_cret wa_attachment INTO wa_attachment.
    APPEND wa_attachment to it_attachment.
    LOOP AT gt_mara INTO wa_mara.
    CONCATENATE wa_mara-matnr wa_mara-matkl
    wa_mara-mtart wa_mara-meins
    INTO wa_attachment SEPARATED BY con_tab.
    CONCATENATE con_cret wa_attachment INTO wa_attachment.
    APPEND wa_attachment to it_attachment.
    ENDLOOP.
    * Describe the body of the message
    CLEAR wa_packing_list.
    REFRESH it_packing_list.
    wa_packing_list-transf_bin = space.
    wa_packing_list-head_start = 1.
    wa_packing_list-head_num = 0.
    wa_packing_list-body_start = 1.
    wa_packing_list-body_num = 1.
    wa_packing_list-doc_type = 'RAW'.
    APPEND wa_packing_list to it_packing_list.
    * Create attachment notification
    wa_packing_list-transf_bin = 'X'.
    wa_packing_list-head_start = 1.
    wa_packing_list-head_num = 1.
    wa_packing_list-body_start = 1.
    DESCRIBE TABLE it_attachment LINES wa_packing_list-body_num.
    wa_packing_list-doc_type = 'XLS'. " To word attachment change this as 'DOC'
    wa_packing_list-obj_descr = ' '.
    concatenate wa_packing_list-doc_type 'file' into wa_packing_list-OBJ_DESCR
    separated by space.
    wa_packing_list-doc_size = wa_packing_list-body_num * 255.
    APPEND wa_packing_list to it_packing_list.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = la_doc
    PUT_IN_OUTBOX = 'X'
    * SENDER_ADDRESS = SY-UNAME
    * SENDER_ADDRESS_TYPE = 'B'
    COMMIT_WORK = 'X'
    * IMPORTING
    * SENT_TO_ALL =
    * NEW_OBJECT_ID =
    * SENDER_ID =
    tables
    packing_list = it_packing_list
    * OBJECT_HEADER =
    CONTENTS_BIN = it_attachment
    CONTENTS_TXT = it_mailbody
    * CONTENTS_HEX =
    * OBJECT_PARA =
    * OBJECT_PARB =
    receivers = it_receivers
    EXCEPTIONS
    TOO_MANY_RECEIVERS = 1
    DOCUMENT_NOT_SENT = 2
    DOCUMENT_TYPE_NOT_EXIST = 3
    OPERATION_NO_AUTHORIZATION = 4
    PARAMETER_ERROR = 5
    X_ERROR = 6
    ENQUEUE_ERROR = 7
    OTHERS = 8
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.

  • How to send mail to multiple users in workflow

    Hi
    I have created a workflow for vendor details.
    after filling all the vendor details the mail should be sent to all managers
    involved in workflow.Can anyone tell me how to assign this task of sending mails to all users in organizational unit.

    hi
    user 1 has mailbox open when the work item arrives, then to user 2 it will apprear to be already read.
    Try using a logical AND in the definition of the responsibilites, so that when only both user 1 and user 2 (assuming that there can be two users) read their emails the work item is regarded as complete
    also check with the following link..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c6456e89-0a01-0010-0189-a7961fe42034
    reward if useful
    regards
    dinesh

  • How to send mail attachment

    Hi,
    I want to send email along with attachment. I have tried to install UTL_MAIL packages but dont have its backage body script i.e. %ORACLE_HOME%/RDBMS/ADMIN/PRVTMAIL.SQL file.
    Please help me to guide installation of this package or tell me is there any alternate way.
    Thanks
    Usman Rana
    mail the file at [email protected]

    Hello
    Sending email attachment from oracle I have no idea but you can do that from UNIX.
    a) using MUTT a third party utility on unix will allow attachments in emails.
    b) check the below mentioned script.
    SUBJECT="Send mail from Unix with file attachments"
    TO=junk\@testing.com
    SPOOLFILE=/export/home/oracle/sqlplus.txt
    echo "Produce listing from SQL*Plus..."
    sqlplus -s sri/sri >$SPOOLFILE <<-EOF
    set echo off feed off veri off pages 0 head off
    select * from tab;
    EOF
    # echo "Convert file to DOS mode..."
    # unix2dos $SPOOLFILE $SPOOLFILE 2>/dev/null
    echo "Send the E-mail message..."
    /usr/bin/mailx -s "${SUBJECT}" ${TO} <<-EOF
    Hi,
    This sample E-mail message demonstrates how one can attach
    files when sending messages with the Unix mailx utility.
    First attachment: SQL*Plus spool file
    ~< ! uuencode $SPOOLFILE `basename $SPOOLFILE`
    Second attachment: mailx.ksh (this script)
    ~< ! uuencode mailx.ksh mailx.txt
    Third attachment: /etc/passwd file
    ~< ! uuencode /etc/passwd passwords
    Best regards
    ~.
    EOF
    echo "Done!"
    c) Third option is creating a procedure in oracle which allows you to send emails but with no attachments.
    /* Sending email from oracle database */
    create or replace procedure send_mail
    ( sender      in varchar2,
    recipient in varchar2,
    subject      in varchar2,
    message      in varchar2 ) is
    mailhost varchar2(30) := '192.168.1.100';
    chlr varchar2(2) := chr(13) || chr(10);
    mail_conn utl_smtp.connection;
    mesg varchar2(4000);
    begin
    mail_conn := utl_smtp.open_connection(mailhost, 25);
    mesg:= 'date: ' || to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' )||chlr||
    'from: <'||sender||'>' || chlr ||
    'subject: '||subject || chlr ||
    'to: '||recipient || chlr ||
    'tablespace report - rpt '|| chlr || message;
    utl_smtp.helo(mail_conn, mailhost);
    utl_smtp.mail(mail_conn, sender);
    utl_smtp.rcpt(mail_conn, recipient);
    utl_smtp.data(mail_conn, mesg);
    utl_smtp.quit(mail_conn);
    exception
         when others then
         raise_application_error(-20002,'unable to send the mail.'||sqlerrm);
    end;
    Hope this helps
    -Sri

  • How to send mails to External Email-ID.

    I have simple Workflow which I have Created to Just Send Mail to SAP-B WorkSpace on execution of the WF.
    Can Anyone tell me how to Many populate the Workflow to Send this mail to External Email-ID.
    Regards,
    Shashank

    Hello,
    In the sendmail step of the workflow, use the option of email address for 'Recipient type' and provide the workflow container element which has the external mail address of the user to whom the mail is to be sent or directly the email address directly. Then contact the basis people to check for any scheduled background job to send the mail from SAP to external mail address. If there is no job present, advise them to create one.
    Hope this will help.
    Regards,
    Samson

Maybe you are looking for

  • IPod Touch 4th Gen will not connect to Macbook Air

    Okay, so I've been trying to connect my iPod to my Macbook Air for a few days now to get some very important videos to transfer into iPhoto so I can get them sent to people that have been requesting them of me by their deadlines. I've also wanted to

  • How apex generate LOV values for Interactive report

    Scott, For interactive report, does APEX full table/index scan to generate the LOV drop down list every time user click the column header? If I set max row count to 100, does LOV values only derived from the first 100 rows that apex hits? If I enter

  • 500 Internal Server Error java.lang.NullPointerException

    500 Internal Server Error java.lang.NullPointerException     at com.idealake.RBI.struts.login.LoginAction.execute(LoginAction.java:72)     at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)     at org.apache.

  • N8 home screen- profile box displaying area code r...

    Hi,  I have no idea how this happened or how to correct it. I visited American recently (not sure if relevant, but thought it best to include all info), whilst over there the profile display box on my N8 home screen started displaying the area dial c

  • JDK 8 Early Access Release

    JDK 8 breaks old examples. They are displayed blurry and don't behave well when window is resized. Although  3D primitive examples works OK with suggested line: System.setProperty("prism.dirtyopts", "false"); Is there some workaround to fix GUI behav