Submission of report by E-mail

1) My requirement is to submit
report output by E-mail.Please
explain me with example?
Kindly help me.

Hi Saritha,
Have a look at the sample program. It works fine. It is suitable for your requirement.
REPORT  zvenkat_mai_pdf_attach.
"  Data retrieval related declarations
"Variables
DATA:
      g_spool_no TYPE TSP01-RQIDENT.
"Types
TYPES:
     BEGIN OF t_emp_dat,
       pernr     TYPE pa0001-pernr,
       persg     TYPE pa0001-persg,
       persk     TYPE pa0001-persk,
       plans     TYPE pa0001-plans,
       stell     TYPE pa0001-stell,
     END OF t_emp_dat.
"Work area
DATA:
     w_emp_data  TYPE t_emp_dat.
"Internal tables
DATA:
     i_emp_data  TYPE STANDARD TABLE OF t_emp_dat.
"  mai related declarations
"Variables
DATA :
     g_sent_to_all   TYPE sonv-flag,
     g_tab_lines     TYPE i.
"Types
TYPES:
     t_document_data  TYPE  sodocchgi1,
     t_packing_list   TYPE  sopcklsti1,
     t_attachment     TYPE  solisti1,
     t_body_msg       TYPE  solisti1,
     t_receivers      TYPE  somlreci1,
     t_pdf            TYPE  tline.
"Workareas
DATA :
     w_document_data  TYPE  t_document_data,
     w_packing_list   TYPE  t_packing_list,
     w_attachment     TYPE  t_attachment,
     w_body_msg       TYPE  t_body_msg,
     w_receivers      TYPE  t_receivers,
     w_pdf            TYPE  t_pdf.
"Internal Tables
DATA :
     i_document_data  TYPE STANDARD TABLE OF t_document_data,
     i_packing_list   TYPE STANDARD TABLE OF t_packing_list,
     i_attachment     TYPE STANDARD TABLE OF t_attachment,
     i_body_msg       TYPE STANDARD TABLE OF t_body_msg,
     i_receivers      TYPE STANDARD TABLE OF t_receivers,
     i_pdf            TYPE STANDARD TABLE OF t_pdf.
PARAMETERS: p_mai(99) type c.
"Top-of-page.
TOP-OF-PAGE.
  PERFORM top_of_page.
  "Start-of-selection.
START-OF-SELECTION.
  PERFORM get_data.
  IF i_emp_data[] IS INITIAL.
    PERFORM test_data.
  ENDIF.
  PERFORM do_print_n_get_spoolno.
  "End-of-selection.
END-OF-SELECTION.
  PERFORM send_mai.
*&      Form  top_of_page
FORM top_of_page.
  DATA: inc_colnum TYPE i.
  ULINE.
  inc_colnum = sy-linsz - 60.
  WRITE: / 'Report: ', sy-repid(18).
  WRITE AT 30(inc_colnum) sy-title CENTERED.
  inc_colnum = sy-linsz - 20.
  WRITE: AT inc_colnum 'Page: ', (11) sy-pagno RIGHT-JUSTIFIED.
  WRITE: / 'Client: ', sy-mandt.
  inc_colnum = sy-linsz - 20.
  WRITE: AT inc_colnum 'Date: ', sy-datum.
  WRITE: / 'User  : ', sy-uname.
  inc_colnum = sy-linsz - 60.
  WRITE AT 30(inc_colnum) 'Company Confidential' CENTERED.
  inc_colnum = sy-linsz - 20.
  WRITE: AT inc_colnum 'Time: ', (10) sy-uzeit RIGHT-JUSTIFIED.
  ULINE .
  SKIP.
  ULINE AT /(127).
  WRITE:/ sy-vline,'pernr' COLOR COL_HEADING,13
          sy-vline,'persg' COLOR COL_HEADING,20
          sy-vline,'persk' COLOR COL_HEADING,26
          sy-vline,'plans' COLOR COL_HEADING,35
          sy-vline,'stell' COLOR COL_HEADING,46
          sy-vline.
  ULINE AT /(46).
ENDFORM.                    "top_of_page
"Form  get_data from PA0001
FORM get_data.
  SELECT pernr
         persg
         persk
         plans
         stell
   FROM pa0001
   INTO CORRESPONDING FIELDS OF TABLE i_emp_data
   UP TO 4 ROWS.
ENDFORM.                    " get_data
"Form  do_print_n_get_spoolno
FORM do_print_n_get_spoolno.
  "Display Output
  LOOP AT i_emp_data INTO w_emp_data .
    AT FIRST.
      PERFORM get_print_parameters.
    ENDAT.
  WRITE:/ sy-vline,w_emp_data-pernr,13
          sy-vline,w_emp_data-persg,20
          sy-vline,w_emp_data-persk,26
          sy-vline,w_emp_data-plans,35
          sy-vline,w_emp_data-stell,46
          sy-vline.
  ULINE AT /(46).
    AT LAST.
      g_spool_no  = sy-spono.
      NEW-PAGE PRINT OFF.
      CALL FUNCTION 'ABAP4_COMMIT_WORK'.
    ENDAT.
  ENDLOOP.
ENDFORM.                    "do_print_n_get_spoolno
"Form  send_mai
"PACKING LIST
"This table requires information about how the data in the
"tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are to
"be distributed to the documents and its attachments.The first
"row is for the document, the following rows are each for one
"attachment.
FORM send_mai .
  "Subject of the mai.
  w_document_data-obj_name  = 'MAI_TO_HEAD'.
  w_document_data-obj_descr = 'Regarding mai Program by SAP ABAP'.
  "Body of the mai
  PERFORM build_body_of_mai
    USING:space,
          'Hi,',
          'I am fine. How are you? How are you doing ? ',
          'This program has been created to send simple mai',
          'with Subject,Body with Address of the sender. ',
          'Regards,',
          'Venkat.O,',
          'SAP HR Technical Consultant.'.
  "Convert ABAP Spool job to PDF
  PERFORM convert_spool_2_pdf TABLES i_attachment.
  "Write Packing List for Body
  DESCRIBE TABLE i_body_msg LINES g_tab_lines.
  w_packing_list-head_start = 1.
  w_packing_list-head_num   = 0.
  w_packing_list-body_start = 1.
  w_packing_list-body_num   = g_tab_lines.
  w_packing_list-doc_type   = 'RAW'.
  APPEND w_packing_list TO i_packing_list.
  CLEAR  w_packing_list.
  "Write Packing List for Attachment
  w_packing_list-transf_bin = 'X'.
  w_packing_list-head_start = 1.
  w_packing_list-head_num   = 1.
  w_packing_list-body_start = 1.
  DESCRIBE TABLE i_attachment LINES w_packing_list-body_num.
  w_packing_list-doc_type   = 'PDF'.
  w_packing_list-obj_descr  = 'PDF Attachment'.
  w_packing_list-obj_name   = 'PDF_ATTACHMENT'.
  w_packing_list-doc_size   = w_packing_list-body_num * 255.
  APPEND w_packing_list TO i_packing_list.
  CLEAR  w_packing_list.
  "Fill the document data and get size of attachment
  w_document_data-obj_langu  = sy-langu.
  READ TABLE i_attachment INTO w_attachment INDEX g_tab_lines.
  w_document_data-doc_size = ( g_tab_lines - 1 ) * 255 + STRLEN( w_attachment ).
  "Receivers List.
  w_receivers-rec_type   = 'U'.  "Internet address
  w_receivers-receiver   = p_mai.
  w_receivers-com_type   = 'INT'.
  w_receivers-notif_del  = 'X'.
  w_receivers-notif_ndel = 'X'.
  APPEND w_receivers TO i_receivers .
  CLEAR:w_receivers.
  "Function module to send mai to Recipients
  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data              = w_document_data
      put_in_outbox              = 'X'
      commit_work                = 'X'
    IMPORTING
      sent_to_all                = g_sent_to_all
    TABLES
      packing_list               = i_packing_list
      contents_bin               = i_attachment
      contents_txt               = i_body_msg
      receivers                  = i_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 i303(me) WITH 'mai has been Successfully Sent.'.
  ELSE.
    WAIT UP TO 2 SECONDS.
    "This program starts the SAPconnect send process.
    SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
  ENDIF.
ENDFORM.                    " send_mai
"      Form  build_body_of_mai
FORM build_body_of_mai  USING l_message.
  w_body_msg = l_message.
  APPEND w_body_msg TO i_body_msg.
  CLEAR  w_body_msg.
ENDFORM.                    " build_body_of_mai
*&      Form  get_print_parameters
FORM get_print_parameters .
  "Variables
  DATA:
     l_lay    TYPE pri_params-paart,
     l_lines  TYPE pri_params-linct,
     l_cols   TYPE pri_params-linsz,
     l_val    TYPE c.
*Types
  TYPES:
     t_pripar TYPE pri_params,
     t_arcpar TYPE arc_params.
  "Work areas
  DATA:
     lw_pripar TYPE t_pripar,
     lw_arcpar TYPE t_arcpar.
  l_lay   = 'X_65_132'.
  l_lines = 65.
  l_cols  = 132.
  "Read, determine, change spool print parameters and archive parameters
  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      in_archive_parameters  = lw_arcpar
      in_parameters          = lw_pripar
      layout                 = l_lay
      line_count             = l_lines
      line_size              = l_cols
      no_dialog              = 'X'
    IMPORTING
      out_archive_parameters = lw_arcpar
      out_parameters         = lw_pripar
      valid                  = l_val
    EXCEPTIONS
      archive_info_not_found = 1
      invalid_print_params   = 2
      invalid_archive_params = 3
      OTHERS                 = 4.
  IF l_val <> space AND sy-subrc = 0.
    lw_pripar-prrel = space.
    lw_pripar-primm = space.
    NEW-PAGE PRINT ON
      NEW-SECTION
      PARAMETERS lw_pripar
      ARCHIVE PARAMETERS lw_arcpar
      NO DIALOG.
  ENDIF.
ENDFORM.                    " get_print_parameters
*&      Form  convert_spool_2_pdf
FORM convert_spool_2_pdf TABLES l_attachment .
  "Variables
  DATA:
      l_no_of_bytes TYPE i,
      l_pdf_spoolid LIKE tsp01-rqident,
      l_jobname     LIKE tbtcjob-jobname,
      l_jobcount    LIKE tbtcjob-jobcount.
  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
    EXPORTING
      src_spoolid              = g_spool_no
      no_dialog                = ' '
    IMPORTING
      pdf_bytecount            = l_no_of_bytes
      pdf_spoolid              = l_pdf_spoolid
      btc_jobname              = l_jobname
      btc_jobcount             = l_jobcount
    TABLES
      pdf                      = i_pdf
    EXCEPTIONS
      err_no_abap_spooljob     = 1
      err_no_spooljob          = 2
      err_no_permission        = 3
      err_conv_not_possible    = 4
      err_bad_destdevice       = 5
      user_cancelled           = 6
      err_spoolerror           = 7
      err_temseerror           = 8
      err_btcjob_open_failed   = 9
      err_btcjob_submit_failed = 10
      err_btcjob_close_failed  = 11
      OTHERS                   = 12.
  CASE sy-subrc.
    WHEN 0.
    WHEN 1.
      MESSAGE s000(0k) WITH 'No ABAP Spool Job'.
      EXIT.
    WHEN 2.
      MESSAGE s000(0k) WITH 'Spool Number does not exist'.
      EXIT.
    WHEN 3.
      MESSAGE s000(0k) WITH 'No permission for spool'.
      EXIT.
    WHEN OTHERS.
      MESSAGE s000(0k)
         WITH 'Error in Function CONVERT_ABAPSPOOLJOB_2_PDF'.
      EXIT.
  ENDCASE.
  CALL FUNCTION 'SX_TABLE_LINE_WIDTH_CHANGE'
    EXPORTING
      line_width_src              = 134
      line_width_dst              = 255
    TABLES
      content_in                  = i_pdf
      content_out                 = l_attachment
    EXCEPTIONS
      err_line_width_src_too_long = 1
      err_line_width_dst_too_long = 2
      err_conv_failed             = 3
      OTHERS                      = 4.
  IF sy-subrc <> 0.
    MESSAGE s000(0k) WITH 'Conversion Failed'.
    EXIT.
  ENDIF.
ENDFORM.                    " convert_spool_2_pdf
*&      Form  test_data
FORM test_data .
  DO 10 TIMES.
    w_emp_data-pernr = sy-index.
    w_emp_data-persg = '2'.
    w_emp_data-persk = '93'.
    w_emp_data-plans = '99999999'.
    w_emp_data-stell = '31414144'.
    APPEND w_emp_data TO i_emp_data.
    CLEAR  w_emp_data.
  ENDDO.
ENDFORM.                    " test_data
I hope that it helps u.
Regards,
Venkat.O

Similar Messages

  • How to send ALV report Output through mail in background !

    Hi ,
    I had an ALV Report. I want to send this report output to patricular email id every day ! Presenty i do this manually. I run the report and send the output to the particular email address. Now i want to schecule the report daily in background and the out put of the report should be mailed to particular email ids in background itself. How can i do this ?
    Is there and method or setting through which we can do this ?
    Regards

    Hi Nau,
    For this requirement you will have to write another program.
    This program will convert the spool requests into PDF document and sends an email  to the recipients that you specify.
    These are the threads which are already posted in The SDN.
    *http://wiki.sdn.sap.com/wiki/display/Snippets/Converts+spool+request+into+PDF+document+and+emails*
    *<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="353650"></a>*
    *<a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="902985"></a>*
    You need to use the Function module :
    -- Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    I will provide you with the code to get this functionality.
    *&      Form  SEND_EMAIL
    form SEND_EMAIL .
    DATA:   t_mailpack   TYPE sopcklsti1 OCCURS 0 WITH HEADER LINE,
              t_mailhead   TYPE solisti1   OCCURS 0 WITH HEADER LINE,
              t_mailbin    TYPE solisti1   OCCURS 0 WITH HEADER LINE,
              t_mailtxt    TYPE solisti1   OCCURS 0 WITH HEADER LINE,
              t_mailrec    TYPE somlreci1  OCCURS 0 WITH HEADER LINE.
      DATA: wa_maildata    TYPE sodocchgi1,
            l_filename(50) TYPE c,
            l_fldname(30)  TYPE c,
            l_fldval(100)  TYPE c,
            l_lines        TYPE i,
            l_text         TYPE text128 .
      DATA: w_email_subrc  TYPE i.
      DATA: w_ship like vbfa-vbeln.
      CLEAR: wa_maildata,
             t_mailtxt,
             t_mailbin,
             t_mailpack,
             t_mailhead,
             t_mailrec.
      REFRESH: t_mailtxt,
               t_mailbin,
               t_mailpack,
               t_mailhead,
               t_mailrec.
    *-- Fill output file
    *- Fill header
      CLEAR: t_mailbin.
    *  t_mailbin[] = pdf_tab[].
      t_mailbin[] = it_att[].     "Uthaman
    *This line is added to get the shipment no in Subject Line
    SELECT SINGLE * FROM vbfa WHERE vbelv EQ nast-objky
                                AND vbtyp_v EQ c_vbtyp_v_j
                                AND vbtyp_n EQ c_vbtyp_n_8.
    w_ship = vbfa-vbeln.
    shift w_ship left deleting leading '0'.
    *-- File name
    if nast-kschl EQ 'ZFPL'.
      CLEAR l_filename.
      CONCATENATE 'Packing List -'
                  sy-datum+4(2) sy-datum+6(2) sy-datum(4) '.PDF' INTO l_filename.
    *-- Creation of the document to be sent File Name
      wa_maildata-obj_name = 'Packing List'.
    *-- Mail Subject
      CONCATENATE l_filename '-' 'Shipment No -' w_ship INTO wa_maildata-obj_descr SEPARATED BY space.
    *-- Mail Contents
      t_mailtxt-line = 'Packing List'.
      APPEND t_mailtxt.
    ENDIF.
    if nast-kschl EQ 'ZFBA'.
      CLEAR l_filename.
      CONCATENATE 'Booking Advice -'
                  sy-datum+4(2) sy-datum+6(2) sy-datum(4) '.PDF'
                  INTO l_filename.
    *-- Creation of the document to be sent File Name
      wa_maildata-obj_name = 'Booking Advice'.
    *-- Mail Subject
      CONCATENATE l_filename '-' 'Shipment No -' w_ship INTO wa_maildata-obj_descr SEPARATED BY space.
    *-- Mail Contents
      t_mailtxt-line = 'Packing List'.
      APPEND t_mailtxt.
    ENDIF.
    *-- Prepare Packing List
    *-- Write Packing List (Main Subject)
      CLEAR: l_lines, t_mailpack.
      DESCRIBE TABLE t_mailtxt LINES l_lines.
    *  READ TABLE t_mailtxt INDEX l_lines.
      t_mailpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( t_mailtxt ).
    *  CLEAR t_mailpack-transf_bin.
      t_mailpack-transf_bin = ' '.
      t_mailpack-head_start = 1.
      t_mailpack-head_num = 0.
      t_mailpack-body_start = 1.
      t_mailpack-body_num = l_lines.
      t_mailpack-doc_type = 'RAW'.
      APPEND t_mailpack.
      t_mailhead = l_filename.
      APPEND t_mailhead.
    *-- Write Packing List (Attachment)
      CLEAR: l_lines, t_mailpack.
      DESCRIBE TABLE pdf_tab[] LINES l_lines.
    *  READ TABLE pdf_tab INDEX l_lines.
      t_mailpack-doc_size = ( l_lines - 1 ) * 255 + STRLEN( t_mailbin ).
      t_mailpack-transf_bin = 'X'.
      t_mailpack-head_start = 1.
      t_mailpack-head_num = 1.
      t_mailpack-body_start = 1.
      t_mailpack-body_num = l_lines.
      t_mailpack-doc_type = 'PDF'.
      t_mailpack-obj_name = l_filename.
      t_mailpack-obj_descr = l_filename.
      t_mailpack-obj_langu = 'E'.
      APPEND t_mailpack.
    *-- Set recipients
    tables :  ztotcemail.
    SELECT SINGLE * FROM vbfa WHERE vbelv EQ nast-objky
                                AND vbtyp_v EQ c_vbtyp_v_j
                                AND vbtyp_n EQ c_vbtyp_n_8.
    CLEAR vttk.
    SELECT SINGLE * FROM vttk WHERE tknum EQ vbfa-vbeln.
    SELECT SINGLE * FROM ztotcemail WHERE tplst = vttk-tplst
                                      AND lifnr = vttk-tdlnr.
    IF SY-SUBRC EQ 0.
      t_mailrec-receiver = ztotcemail-smtp_addr. "'Here you will give the email address'.
      t_mailrec-rec_type  = 'U'.
      APPEND t_mailrec.
    ENDIF.
    **-- Sending the document
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = wa_maildata
          put_in_outbox              = 'X'
    *      commit_work                = 'X'  " N-16
        TABLES
          packing_list               = t_mailpack
          object_header              = t_mailhead
          contents_bin               = t_mailbin[]
          contents_txt               = t_mailtxt[]
          receivers                  = t_mailrec
        EXCEPTIONS
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          OTHERS                     = 99.
      w_email_subrc = sy-subrc.
      IF sy-subrc EQ 0.
        MESSAGE s000(zotc) WITH 'Email output sent successfully'.
      ELSE.
        MESSAGE s000(zotc) WITH 'Can not send email output'.
      ENDIF.
    endform.                    " SEND_EMAIL
    Hope the above information will be helpful.
    Regards,
    Kittu

  • How to send BIP report link by mail not the attachment.

    Hi,
    I have a requiment to send the BI Publisher report link by mail.But not to send the report as an attachment.
    can any one have solution for this requirement.

    hi,
    Alternatively, u can do this Send a report with all the report names on one side and another side link to that particular report.If any one click on that link means it will open the report(pdf/html/excel) format by referring to the url.we will get this by using RTF Template.
    Thanks,
    Saichand

  • How to send a report via e-mail

    Hello All,
               I want to send a report via e-mail.
               What should I do for that?
                Please help me out...
    Regards,
    Ravi Khattar.

    Hi,
      Please check the below code....
    data: t_objpack    like sopcklsti1 occurs 1 with header line,
            t_objhead    like solisti1   occurs 1 with header line,
            t_objtxt     like solisti1   occurs 0 with header line,
            t_objbin     like solisti1   occurs 1 with header line,
            t_reclist    like somlreci1  occurs 1 with header line,
            t_lobj       like abaplist   occurs 0 with header line,
            t_listobj    like abaplist   occurs 1 with header line.
      data: v_tab_line1  type i,
            v_tab_line2  type i,
            v_docsize    type i,
            v_len        type i,
            v_line(1250) type c,
            v_subj(132)  type c,
            v_cr(1)      type x value '0D',
            v_linefd(2)  type x value '0D0A',
            v_docdata    like sodocchgi1.
      clear: t_objpack[], t_objhead[], t_objtxt[], t_reclist[], t_listobj[].
      concatenate 'This email is generated from a SAP' sy-sysid '-'
         sy-mandt '- batch environment.' into t_objtxt separated by ' '.
      append t_objtxt.
      t_objtxt = 'Please do not respond to this email.'. append t_objtxt.
      v_docdata-obj_name = 'SAMPLE_TEST'.
      concatenate 'Sales Order Status Attachment -' sy-datum '-' sy-uzeit
             into v_subj separated by ' '.
      v_docdata-obj_descr = v_subj.
      describe table t_objtxt lines v_tab_line1.
      read table t_objtxt index v_tab_line1.
      v_docdata-doc_size   = ( v_tab_line1 - 1 ) * 255 + strlen( t_objtxt ).
      t_objpack-head_start = 1.
      t_objpack-head_num   = 1.
      t_objpack-body_start = 1.
      t_objpack-body_num   = v_tab_line1.
      t_objpack-doc_type   = 'RAW'.
      append t_objpack.
      clear v_line.
      if p_type = '1'.
        loop at t_list.
          concatenate v_line t_list v_linefd into v_line.
          v_len = strlen( v_line ).
          do 4 times.
            if v_len ge 255.
              if v_line+254(1) = v_cr.
                v_line255     = v_line254.
                v_line+254(1)  = ' '.
              endif.
              t_objtxt = v_line(255).
              v_line   = v_line+255.
              v_len    = v_len - 255.
              append t_objtxt.
            else.
              exit.
            endif.
          enddo.
        endloop.
        if v_line ne ' '.
          t_objtxt = v_line(255).
          append t_objtxt.
        endif.
        describe table t_objtxt lines v_tab_line2.
        t_objpack-doc_size   = ( v_tab_line2 - v_tab_line1 ) * 255.
        t_objpack-body_start = v_tab_line1 + 1.
        t_objpack-transf_bin = ' '.
        t_objpack-doc_type   = 'TXT'.
      else.
        t_objbin[] = html[].
        describe table t_objbin lines v_tab_line2.
        t_objpack-doc_size   = v_tab_line2 * 255.
        t_objpack-body_start = 1.
        t_objpack-transf_bin = 'X'.
        t_objpack-doc_type   = 'HTM'.
      endif.
      t_objpack-head_start = 1.
      t_objpack-head_num   = 1.
      t_objpack-body_num   = v_tab_line2.
      t_objpack-obj_name   = 'SAMPLE_TEST'.
      t_objpack-obj_descr  = 'Test'.
      append t_objpack.
      loop at s_email.
        t_reclist-receiver = s_email-low.
        t_reclist-rec_type = 'U'.
        append t_reclist.
      endloop.
      t_reclist-receiver   = sy-uname.
      t_reclist-rec_type   = 'B'.
      append t_reclist.
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data = v_docdata
                put_in_outbox = ' '
           TABLES
                packing_list  = t_objpack
                object_header = t_objhead
                contents_bin  = t_objbin
                contents_txt  = t_objtxt
                receivers     = t_reclist.
      if sy-subrc = 0.
       endif.
    Cheers,
    Bujji

  • Sedn report output to mail in d2k 10g

    Hi
    i want to send report output to mail .
    i set
    DESTYPE = mail
    DESNAME = i gave mail id in initial values
    I put the rdf in server and ran cucurent request from application but i am not getting the mail
    any one help me tell what other steps i have to do
    Regards

    hi,
    try this..
    GOTO SE80 -> write the Package name :- SBCOMS
    in this package you find lot of ways to send mail.
    hope this helps
    Regards
    RItesh J

  • Schedule Send Execl Report by E-mail to System User

    Hello:
       I need to schedule send Excel Report by E-mail to system user internet address. If only define the job by Reprot Agent? Do we have other method?
    Hope this clear!Can you give some advice?
    Regards&Thanks
    zagory

    Hi zagory,
    i forgot one tech issue to be setup: The internet Mail gateway needs to be setup if you want to send proper e-mails.
    presupposed all tech. issues are solved, I agree with my colleague. Setup is fairly easy to handle, as soon as you know the customers demands like
    - who is allowed to send
    - who will do it in the future
    - who are the recipients
    - when should the precalc. take place/when should the Workbook be executed (Timepoints, after dataupdate ...)
    for authorisations check out object: s_rs_bcs.
    also make sure that the executor has permissions for the backgroud user (serach in TRC SU21, i can not remember.)
    if all is known = approx. 2-3 days until go live, depending on the complexity of the existing scheduling and the authorisation concept.
    Not to mention the training for all that and the tchnical setup.
    hth
    cheers
    Sven

  • Report Output to mail

    Hi all.
       Could you pls let me know how to send the alv report output to mail. Thanks in advance.
    Cheers,.
    sami.

    hi,
    try this..
    GOTO SE80 -> write the Package name :- SBCOMS
    in this package you find lot of ways to send mail.
    hope this helps
    Regards
    RItesh J

  • Very urjent how to send report output in mail

    hi experts,
    how to send report output in mail which function module should i use wht parameters should i pass.
    thanks in addavnce,
    points to be awarded.

      CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
                destination    = '026c'
                copies         = count
                list_name      = 'VATS_ASBUILT'
                list_text      = v_list
                immediately    = 'X'
                release        = 'X'
                new_list_id    = 'X'
                expiration     = days
                line_size      = 132
                line_count     = 65
                layout         = 'X_65_132'
    *            sap_cover_page = 'X'
    *            cover_page     = 'X'
                receiver       = 'SAP*'
                department     = 'VATS'
                no_dialog      = 'X'
           IMPORTING
                out_parameters = params
                valid          = valid.
      SUBMIT zppr_vats_asbuilt  WITH p_aufnr EQ v_aufnr
                   TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                      SPOOL PARAMETERS params
                         AND RETURN.
      SELECT SINGLE rqident FROM tsp01 INTO l_spoolno
                         WHERE rqtitle = v_list .
    * convert report to PDF format
      CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
                src_spoolid              = l_spoolno
                no_dialog                = 'X'
           TABLES
                pdf                      = l_ipdf
           EXCEPTIONS
                err_no_abap_spooljob     = 1
                err_no_spooljob          = 2
                err_no_permission        = 3
                err_conv_not_possible    = 4
                err_bad_destdevice       = 5
                user_cancelled           = 6
                err_spoolerror           = 7
                err_temseerror           = 8
                err_btcjob_open_failed   = 9
                err_btcjob_submit_failed = 10
                err_btcjob_close_failed  = 11
                OTHERS                   = 12.
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        EXIT .
      ENDIF.
    Now comes the part to send the mail
      try.
    * -------- create persistent send request ------------------------
          send_request = cl_bcs=>create_persistent( ).
          clear document.
    * -------- create and set document with attachment ---------------
    * create document from internal table with text
          document = cl_document_bcs=>create_document(
          i_type = 'RAW'
          i_text = text
          i_length = '12'
          i_subject = '' ).
    *changing the content of the attachment
          binary_content[] = l_iobjbin[].
    *change the name of the PDF attachment
          concatenate 'Build ID' s_buildid_i 'Rev' v_buildid_rev
                              into i_att_sub separated by space.
    * add attachment to document
          call method document->add_attachment
            exporting
              i_attachment_type    = 'PDF'
              i_attachment_subject = i_att_sub
              i_att_content_hex    = binary_content.
    *setting the option to send an e-mail more than 50 characters
          call method send_request->set_message_subject
            exporting
              ip_subject = t_sub.
    * add document to send request
          call method send_request->set_document
            exporting
              i_document = document.
    * --------- set sender -------------------------------------------
    * note: this is necessary only if you want to set the sender
    * different from actual user (SY-UNAME). Otherwise sender is
    * set automatically with actual user.
          sender = cl_sapuser_bcs=>create( 'VATSUPPORT' ).
          call method send_request->set_sender
            exporting
              i_sender = sender.
    *Send the list based on receivers list obtained
          loop at l_ireclist.
            AD_SMTPADR = l_ireclist-receiver.
    * --------- add recipient (e-mail address) -----------------------
    * create recipient - please replace e-mail address !!!
          recipient = cl_cam_address_bcs=>create_internet_address(
          AD_SMTPADR ).
    * add recipient with its respective attributes to send request
          call method send_request->add_recipient
            exporting
              i_recipient = recipient
              i_express   = 'X'.
          ENDLOOP.
          call method send_request->set_status_attributes
            exporting
              i_requested_status = 'E'
              i_status_mail      = 'E'.
    * To send the mail immediately
          call method send_request->set_send_immediately( 'X' ).
    * ---------- send document ---------------------------------------
          call method send_request->send( ).
          commit work.

  • Can I get a read report in iCloud mail?

    Hi
    How can I get a read report in iCloud Mail?
    Lander

    The following article(s) may help you.
    iCloud BackUp and Restore

  • Report Delivery through mail

    Dear all,
    Why a report delivered automatically through alert management system will display less number of rows if you compare with the query executed. i.e. the number of rows delivered in mail are far lesser than the actual query output. Any Idea why this happens?
    Your Response is much appreciated.
    Thanks
    SV Reddy
    Edited by: SV Reddy on Feb 24, 2011 10:49 AM

    Dear Gordon,
    thanks for the reply,
    The XL reporter is sending the report as attachment, is it possible that the content of the report to be delivered as mail content instead of attachment. i.e. the data in the attached excel file should be delivered as mail content instead of attachemnt.  this scenario is useful for sales people always travelling and not using the computer but using the black berry to read the report data as mail content.
    thanks
    SV Reddy

  • Information Broadcasting ( Automatically execute a report and e-mail it)

    Hi,
    Can BEx Automatically execute a report and e-mail it. The requirement is to Execute a Report periodically  and send the report in <b>EXCEL SHEET</b> format to the given e-mail ID.
    I have tried configuring it in HTML format.... but I need it EXCEL format.
    Waiting for help from the SDN community...
    Thanks in Advance.....

    Hi,
    You can send the workbook automatically when you schedule thru information broadcaster.
    But you have to install precalculation server for distributing workbook..
    Have a look at OSS note 760775 ..
    Hope it helps..
    Regards,
    Siva.

  • Send the list ouput of ALV  or normal report to e-mail

    how to send the list ouput of ALV  or normal report to e-mail?

    Already SAP is providing the option to send output to email
    For ALV
    Go to Print Preview> list> send to --> mail receipient
    if it is normal list
    list> Save/Send> office

  • Send report to staff mail box

    How can I send reports to the mail box of staff from my application.
    My report was developed using reports 6

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Gloria Akika ([email protected]):
    How can I send reports to the mail box of staff from my application.
    My report was developed using reports 6<HR></BLOCKQUOTE>
    I think this will work if you have the default mail set up on your machine:
    Q:\ORACLE\BIN\R25RUN32.EXE module=S:\TableDef.rep destype=mail desname=[email protected] userid=username/password@databasename
    null

  • Daily Report for e-mail alerts sent to via subscription

    Hi All,
    Good Day!!!,
    We have multiple subscription in SCOM 2012 SP1.
    we need to generate a daily report stating that this many Alert sent to this subscriber group and this many are closed .
    Ex: We have [email protected] is the subscriber and for this subscriber we have created 3 subscription for send notifications.
    In a native mode we can able to export alerts details by group or objects. but we need a report based on subscription.
    Thanks in advance.
    Thanks & Regards, Kesa_Kara

    Hi,
    Please refer to the links below:
    OpsMgr 2012:  Configure notifications
    http://blogs.technet.com/b/kevinholman/archive/2012/04/28/opsmgr-2012-configure-notifications.aspx
    Best Practices: E-mail Notification Subscriptions
    http://www.opsconfig.com/?p=574
    Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Send E-mail from Interactive Report, mulitple e-mail addresses

    I am using Apex 4.1. I would like to enter multiple e-mail addresses in the TO field of the download, e-mail section of an interactive report. To be clear when I click on download from the actions menu of an interactive report and choose E-mail, you are presented with the form that has To, CC, BCC, etc. I would like to enter multiple e-mail addresses in the TO text box. I have tried separating them with semi-colons, commas, and even spaces. Whenever I enter two addresses, I do not get any mail. How can I address an interactive report to multiple e-mail addresses. Thank you so much.

    Hi,
    We misread the documentation and the Actions > Download > Email option does not support multiple email addresses, I have tried it on my workspace and it is throwing ORA-29279: SMTP permanent error: 553 5.1.3 which is because of unsupported multiple emails.
    In this doc says that it is allowed to use multiple emails under
    Actions > Subscription (and this is entirely different from above)

Maybe you are looking for

  • Battery life is very short on ipod touch ?

    Hi, First post on here so be gentle. I have had my 4th gen Ipod touch for about 2 years now. I notice that even if I don't use it to play apps or listen to music the battery goes from fully charged to 20% left within 45 minutes. Is this normal ?. The

  • ALV - access to protected method

    Hello, I have a object from class "CL_GUI_ALV_GRID" and want to change the protected attribute "EVT_DELAYED_CHANGE_SELECTION     Constant     Protected" with the method     CALL METHOD alv_grid->SET_DELAY_CHANGE_SELECTION       EXPORTING         time

  • Dealing with failure of JMS server

    I'd like to build some fault tolerance into my application using JMS, and I was wondering if a J2EE server with registered topics were to crash, is there the ability to migrate the topics to another J2EE server without the application (publishers/sub

  • URGENT: please help to convert Tektronix TDS754C Labview driver 7.0 to 6.1

    Hello, Could someone please try to convert Labview 7.0 driver to a version 6.1? I attached Tektronix TDS 754C Labview driver 7.0 below. Or National Instruments, please provide me with Tektronix TDS754C Labview 6.1 driver. Thanks to everyone in advanc

  • Changing max row display in personalization of particular transaction type

    Hi, Is there any way to change the Maximum number of visible rows to be displayed in personalization of search result for a particular transaction type? Thanks.