Report 3.0 & E-Mail !!! URGENT !!!

Iam working with FORMS 5.0 and REPORT 3.0.
When i intend to send an inform from the preview to the e-mail, i obtain then following error message :
REP-4201 and REP-4220
I have OUTLOOK EXPRESS 5 and INTERNET EXPLORER 5 installed.
How may i send e.mails from then preview of report 3.0 ?
Best regards and thanks.
null

Iam working with FORMS 5.0 and REPORT 3.0.
When i intend to send an inform from the preview to the e-mail, i obtain then following error message :
REP-4201 and REP-4220
I have OUTLOOK EXPRESS 5 and INTERNET EXPLORER 5 installed.
How may i send e.mails from then preview of report 3.0 ?
Best regards and thanks.
null

Similar Messages

  • Sending report output via E-mail (excel pivoted format)

    Hi all,
    i have a written a report where i need to send the report output to somebody via
    E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
    i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
    now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field  length should be adjusted as per the output field length.
    i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
    any idea will be highly appreaciated.
    Regards
    if not p_email1 is initial.
         perform fill_report_csv.
         perform f_send_internet_mail.
      endif.
    FORM fill_report_csv.
       data :   l_text(232) type c,
               v_matnr1(21) type c,
               v_matnr(21) type c,
               v_matkl(14) type c,
               v_maktx(45) type c,
               v_ttlstk(14) type c,
               v_verpr(14) type c,
               v_werks(14) type c,
               v_lgort(14) type c,
               v_char(10) type c,
               v_stks type p ,
               v_po(40) type c,
               v_qty(13) type c,
                v_qty1 type sy-datum,
               v_date(15) type c,
               v_date1(15) TYPE C,
               v_name(35) type c,
               v_eknam(18) type c,
               v_lifnr(15) type c,
            l_po(40) type c,
            v_matnr(20) type c,
             l_rate(11) type  p decimals 5,
             l_flag type c.
      concatenate c_equal c_colon 'PO no.' c_colon
                    into v_po.
      concatenate c_equal c_colon 'Material no.' c_colon
                    into v_matnr.
      concatenate c_equal c_colon 'Description.' c_colon
                    into v_maktx.
      concatenate c_equal c_colon 'Due Qty.' c_colon
                    into v_qty.
      concatenate c_equal c_colon 'Del Date.' c_colon
                    into v_date.
      concatenate c_equal c_colon 'Vendor.' c_colon
                    into v_name.
      concatenate c_equal c_colon 'Buyer.' c_colon
                    into v_eknam.
      concatenate c_equal c_colon 'Vendor Code.' c_colon
                    into v_lifnr.
    concatenate
             v_po v_matnr v_maktx v_qty
             v_date v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
      append i_download .
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    clear wa_output.
    loop at i_output into wa_output.
       on change of wa_output-ebeln.
         clear v_lines.
         loop at i_eket into wa_eket
                 where ebeln = wa_output-ebeln.
           v_lines = v_lines + 1.
           clear wa_eket.
         endloop.
    **-- Checking of page break
         v_lines = sy-linno + v_lines .
         if 55 < v_lines  .
           write:/0(161) sy-uline.
           new-page.
         endif.
      clear v_lines.
          loop at i_eket into wa_eket
                  where ebeln = wa_output-ebeln.
            v_lines = v_lines + 1.
            clear wa_eket.
          endloop.
    *-- Calculating the due qty.
        wa_output-dumng = wa_output-menge - wa_output-wemng.
    *-- Writing the Line items of the PO.
        read table i_ekpo into wa_ekpo
              with key ebeln = wa_output-ebeln
                       ebelp = wa_output-ebelp.
         l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
    *-- Writing of PO detail
         if wa_output-dumng gt 0 .
         v_qty = wa_output-dumng.
        v_date1 = wa_output-eindt.
        v_maktx = wa_output-maktx.
         if wa_output-maktx+0(1) = '"' .
                concatenate  c_equal wa_output-maktx
                   into v_maktx  .
             else .
                concatenate  c_equal c_colon wa_output-maktx c_colon
                   into v_maktx  .
             endif .
       if wa_output-name1+0(1) = '"' .
                concatenate  c_equal wa_output-name1
                   into v_name  .
             else .
                concatenate  c_equal c_colon wa_output-name1 c_colon
                   into v_name  .
             endif .
        v_name = wa_output-name1.
        v_lifnr = wa_output-lifnr.
         write wa_output-eindt to v_date1 DD/MM/YYYY.
         concatenate '="' wa_output-ebeln '/'
                wa_output-ebelp '"' into v_po .
         concatenate '="' wa_output-matnr '"' into v_matnr .
             concatenate  c_equal c_colon wa_output-maktx c_colon
               into v_maktx  .
              concatenate  c_equal c_colon wa_output-dumng c_colon
               into v_qty1  .
               concatenate  c_equal c_colon wa_output-eindt c_colon
               into v_date1  .
              concatenate  c_equal c_colon wa_output-name1 c_colon
               into v_name  .
                concatenate  c_equal c_colon wa_output-eknam c_colon
                into v_eknam  .
              concatenate  c_equal c_colon wa_output-lifnr c_colon
               into v_lifnr  .
              concatenate  c_equal c_colon wa_mard-werks '/'
               wa_mard-lgort c_colon
               into v_lgort .
                 concatenate '="' wa_output-lifnr '"' into v_lifnr .
    condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
         concatenate
             v_po v_matnr v_maktx v_qty
             v_date1 v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
        concatenate con_cret i_download INTO i_download .
        append i_download .
      endif.
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    endloop.
    ENDFORM.                    " fill_report_csv
    *&      Form  f_send_internet_mail
          text
    -->  p1        text
    <--  p2        text
    FORM f_send_internet_mail.
    Variables
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    data : found_receiver type c,
           v_title(80) type c,
           l_text(180) type c.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Adds text to email text table
      append 'Pls see attached open purchase order report.' to it_message.
      append '' to it_message.
      concatenate 'Note: This is system generated report'
                  ', figures may subject to actual physical count.'
                  into l_text separated by space.
      append l_text to it_message.
    Populate the subject/generic message attributes
      CLEAR gd_doc_data.
      READ TABLE i_download INDEX w_cnt.
      gd_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( i_download ).
      gd_doc_data-obj_langu  = sy-langu.
      gd_doc_data-obj_name   = 'SAPRPT'.
    if p_asdate is initial .
         concatenate p_title ' '
                  sy-datum sy-uzeit into v_title separated by space.
    else .
        concatenate p_title ' '
                 p_bldat p_cputm into v_title separated by space.
    endif .
      gd_doc_data-obj_descr  = v_title .
      gd_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = i_download[].
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Create attachment notification
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num   = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
      it_packing_list-doc_type   =  'XLS'.
      it_packing_list-obj_descr  =  'OPEN PURCHASE ORDER' .
      it_packing_list-obj_name   =  'PO.XLS' .
      it_packing_list-doc_size   =  it_packing_list-body_num * 255.
      APPEND it_packing_list.
    assign SAP user smtp address from successful retrieval.
      loop at p_email.
    Add the recipients email address
         found_receiver = 'X' .
         it_receivers-receiver = p_email-low.
         it_receivers-rec_type = 'U'.
         it_receivers-com_type = 'INT'.
         it_receivers-notif_del = ''.
         it_receivers-notif_ndel = 'X'.
         append it_receivers .
      endloop .
    Add default recipient email when unable to locate purc group email
       if found_receiver is initial .
           it_receivers-receiver = p_email.
           it_receivers-rec_type = 'U'.
           it_receivers-com_type = 'INT'.
           it_receivers-notif_del = ''.
           it_receivers-notif_ndel = 'X'.
          append it_receivers.
       endif .
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
                commit_work                = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                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.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    Instructs mail send program for SAPCONNECT to send email.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = ' '
                        and return.
      endif.
    ENDFORM.                    " f_send_internet_mail

    Hi,
    go through this link,
    http://www.sapdevelopment.co.uk/reporting/email/emailhome.htm
    you have some sample programs.
    Regards,
    Raghavendra

  • Report output via E-mail

    Hi all,
    i have a written a report where i need to send the report output to somebody via
    E-mail.i am sending this report output via E-mail successfully.The receiver receives, my output in excel format.but this excel is not <b>pivoted</b>.
    i want , the receiver should get my output in pivoted excel format.i.e my output data should be exactly fit in the excel sheet.
    now the columns in excel sheet are overlapping.once i double clicked, the columns are getting separated.i do not want to double click.i want all the columns should come properly i.e excel field  length should be adjusted as per the output field length.
    i am giving my coding below.plz suggest how i can do the above thing .it's urgent.
    any idea will be highly appreaciated.
    Regards
    if not p_email1 is initial.
         perform fill_report_csv.
         perform f_send_internet_mail.
      endif.
    FORM fill_report_csv.
       data :   l_text(232) type c,
               v_matnr1(21) type c,
               v_matnr(21) type c,
               v_matkl(14) type c,
               v_maktx(45) type c,
               v_ttlstk(14) type c,
               v_verpr(14) type c,
               v_werks(14) type c,
               v_lgort(14) type c,
               v_char(10) type c,
               v_stks type p ,
               v_po(40) type c,
               v_qty(13) type c,
                v_qty1 type sy-datum,
               v_date(15) type c,
               v_date1(15) TYPE C,
               v_name(35) type c,
               v_eknam(18) type c,
               v_lifnr(15) type c,
            l_po(40) type c,
            v_matnr(20) type c,
             l_rate(11) type  p decimals 5,
             l_flag type c.
      concatenate c_equal c_colon 'PO no.' c_colon
                    into v_po.
      concatenate c_equal c_colon 'Material no.' c_colon
                    into v_matnr.
      concatenate c_equal c_colon 'Description.' c_colon
                    into v_maktx.
      concatenate c_equal c_colon 'Due Qty.' c_colon
                    into v_qty.
      concatenate c_equal c_colon 'Del Date.' c_colon
                    into v_date.
      concatenate c_equal c_colon 'Vendor.' c_colon
                    into v_name.
      concatenate c_equal c_colon 'Buyer.' c_colon
                    into v_eknam.
      concatenate c_equal c_colon 'Vendor Code.' c_colon
                    into v_lifnr.
    concatenate
             v_po v_matnr v_maktx v_qty
             v_date v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
      append i_download .
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    clear wa_output.
    loop at i_output into wa_output.
       on change of wa_output-ebeln.
         clear v_lines.
         loop at i_eket into wa_eket
                 where ebeln = wa_output-ebeln.
           v_lines = v_lines + 1.
           clear wa_eket.
         endloop.
    **-- Checking of page break
         v_lines = sy-linno + v_lines .
         if 55 < v_lines  .
           write:/0(161) sy-uline.
           new-page.
         endif.
      clear v_lines.
          loop at i_eket into wa_eket
                  where ebeln = wa_output-ebeln.
            v_lines = v_lines + 1.
            clear wa_eket.
          endloop.
    *-- Calculating the due qty.
        wa_output-dumng = wa_output-menge - wa_output-wemng.
    *-- Writing the Line items of the PO.
        read table i_ekpo into wa_ekpo
              with key ebeln = wa_output-ebeln
                       ebelp = wa_output-ebelp.
         l_rate = wa_ekpo-netpr / wa_ekpo-peinh.
    *-- Writing of PO detail
         if wa_output-dumng gt 0 .
         v_qty = wa_output-dumng.
        v_date1 = wa_output-eindt.
        v_maktx = wa_output-maktx.
         if wa_output-maktx+0(1) = '"' .
                concatenate  c_equal wa_output-maktx
                   into v_maktx  .
             else .
                concatenate  c_equal c_colon wa_output-maktx c_colon
                   into v_maktx  .
             endif .
       if wa_output-name1+0(1) = '"' .
                concatenate  c_equal wa_output-name1
                   into v_name  .
             else .
                concatenate  c_equal c_colon wa_output-name1 c_colon
                   into v_name  .
             endif .
        v_name = wa_output-name1.
        v_lifnr = wa_output-lifnr.
         write wa_output-eindt to v_date1 DD/MM/YYYY.
         concatenate '="' wa_output-ebeln '/'
                wa_output-ebelp '"' into v_po .
         concatenate '="' wa_output-matnr '"' into v_matnr .
             concatenate  c_equal c_colon wa_output-maktx c_colon
               into v_maktx  .
              concatenate  c_equal c_colon wa_output-dumng c_colon
               into v_qty1  .
               concatenate  c_equal c_colon wa_output-eindt c_colon
               into v_date1  .
              concatenate  c_equal c_colon wa_output-name1 c_colon
               into v_name  .
                concatenate  c_equal c_colon wa_output-eknam c_colon
                into v_eknam  .
              concatenate  c_equal c_colon wa_output-lifnr c_colon
               into v_lifnr  .
              concatenate  c_equal c_colon wa_mard-werks '/'
               wa_mard-lgort c_colon
               into v_lgort .
                 concatenate '="' wa_output-lifnr '"' into v_lifnr .
    condense:v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
         concatenate
             v_po v_matnr v_maktx v_qty
             v_date1 v_name v_eknam v_lifnr
             into i_download
             SEPARATED BY con_tab.
        concatenate con_cret i_download INTO i_download .
        append i_download .
      endif.
    clear : v_po,v_matnr, v_maktx, v_qty, v_date, v_name, v_eknam,v_lifnr .
    endloop.
    ENDFORM.                    " fill_report_csv
    *&      Form  f_send_internet_mail
          text
    -->  p1        text
    <--  p2        text
    FORM f_send_internet_mail.
    Variables
    data:   it_packing_list like sopcklsti1 occurs 0 with header line,
            it_contents like solisti1 occurs 0 with header line,
            it_receivers like somlreci1 occurs 0 with header line,
            it_attachment like solisti1 occurs 0 with header line,
            gd_cnt type i,
            gd_sent_all(1) type c,
            gd_doc_data like sodocchgi1,
            gd_error type sy-subrc.
    data:   it_message type standard table of SOLISTI1 initial size 0
                    with header line.
    data : found_receiver type c,
           v_title(80) type c,
           l_text(180) type c.
    Fill the document data.
      gd_doc_data-doc_size = 1.
    Adds text to email text table
      append 'Pls see attached open purchase order report.' to it_message.
      append '' to it_message.
      concatenate 'Note: This is system generated report'
                  ', figures may subject to actual physical count.'
                  into l_text separated by space.
      append l_text to it_message.
    Populate the subject/generic message attributes
      CLEAR gd_doc_data.
      READ TABLE i_download INDEX w_cnt.
      gd_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( i_download ).
      gd_doc_data-obj_langu  = sy-langu.
      gd_doc_data-obj_name   = 'SAPRPT'.
    if p_asdate is initial .
         concatenate p_title ' '
                  sy-datum sy-uzeit into v_title separated by space.
    else .
        concatenate p_title ' '
                 p_bldat p_cputm into v_title separated by space.
    endif .
      gd_doc_data-obj_descr  = v_title .
      gd_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = i_download[].
    Describe the body of the message
      clear it_packing_list.
      refresh it_packing_list.
      it_packing_list-transf_bin = space.
      it_packing_list-head_start = 1.
      it_packing_list-head_num = 0.
      it_packing_list-body_start = 1.
      describe table it_message lines it_packing_list-body_num.
      it_packing_list-doc_type = 'RAW'.
      append it_packing_list.
    Create attachment notification
      it_packing_list-transf_bin = 'X'.
      it_packing_list-head_start = 1.
      it_packing_list-head_num   = 1.
      it_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES it_packing_list-body_num.
      it_packing_list-doc_type   =  'XLS'.
      it_packing_list-obj_descr  =  'OPEN PURCHASE ORDER' .
      it_packing_list-obj_name   =  'PO.XLS' .
      it_packing_list-doc_size   =  it_packing_list-body_num * 255.
      APPEND it_packing_list.
    assign SAP user smtp address from successful retrieval.
      loop at p_email.
    Add the recipients email address
         found_receiver = 'X' .
         it_receivers-receiver = p_email-low.
         it_receivers-rec_type = 'U'.
         it_receivers-com_type = 'INT'.
         it_receivers-notif_del = ''.
         it_receivers-notif_ndel = 'X'.
         append it_receivers .
      endloop .
    Add default recipient email when unable to locate purc group email
       if found_receiver is initial .
           it_receivers-receiver = p_email.
           it_receivers-rec_type = 'U'.
           it_receivers-com_type = 'INT'.
           it_receivers-notif_del = ''.
           it_receivers-notif_ndel = 'X'.
          append it_receivers.
       endif .
    Call the FM to post the message to SAPMAIL
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           exporting
                document_data              = gd_doc_data
                put_in_outbox              = 'X'
                commit_work                = 'X'
           importing
                sent_to_all                = gd_sent_all
           tables
                packing_list               = it_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                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.
    Store function module return code
      gd_error = sy-subrc.
    Get it_receivers return code
      loop at it_receivers.
      endloop.
    Instructs mail send program for SAPCONNECT to send email.
      wait up to 2 seconds.
      if gd_error eq 0.
          submit rsconn01 with mode = 'INT'
                        with output = ' '
                        and return.
      endif.
    ENDFORM.                    " f_send_internet_mail

    ans

  • Converting report to PDF and mailing

    Hi every one,
    I've gone through various threads and i'm aware of the Functional module's used to
    convert the report to pdf and mail it back.Like CONVERT_OTFSPOOLJOB_2_PDF, CONVERT_OTF_2_PDF and for mailing we have SEND_NEW_DOCUMENT_ATT_SEND_API1.
    I've worked with this but my problem is i'm not able to convet the report output to pdf.When i'm doing this i'm getting the output of my functional module converted to pdf like the number of header and item records available for the given data in the selection screen.
    Since all the threads i've gone through is converting the single internal table which has the output to pdf.
    But i've got the REUSE_ALV_HIERSQL_LIST_DISPLAY, hierarchial report which as known has got two internal tables.How to the same to this kind of report....More over is it possible to convert report to pdf in online without transfering it to spool and getting the spool id to convert it to pdf.........
    Any help or suggestions will surely be rewarded......
    Thanks in Advance.....

    Here is the complete code for you;
    It Converts spool request into PDF document and emails it.
    <b>http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm</b>
    Regards,
    Vishal

  • Report adres in a mail distrubuted report

    Hello,
    I know how i can send an e mail to several people. I add a link to the report in the e-mail boddy.
    I would like a link to another server adres then it will be by default. Is there anybody who know where I can set the adress to the report (in the link bellow the e-mail)
    for example:
    now it is: 'http:\\hakw1..........
    I would like change it to 'https:\\Hakwood.....
    thanks for help

    Hi Robert,
    Based on my understanding, you want to change report manager URL
    http://xxx to https://xxx, right?
    In Reporting Services, we can create URL reservation like
    https://xxx. Then we can select it to require that all requests to Report Manager are routed over HTTPS. Optionally, if we select an SSL certificate, we can specify a custom port. The default is 443 but we can use any port that is available.
    As we tested in our environment, we create a self-signed certificate(test) in IIS manager. When creating the report manager URL, we can select the self-signed certificate in RSCM. And we specify the SSL port as 443. Through this URL, we can access the report
    manager successfully, and URL always displays as https://xxx when we access any folder/report in report manager.
    For more information, please refer to this article:
    A step-by-step example of configuring a reporting services point for HTTPS in System Center 2012 Configuration Manager.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Send Report to several e-mail addresses problem!

    Hi,
    I want to deliver a report to several e-mail addresses because every page is personalized and has to be delivered to a special e-mail address.What can i do?
    Please help!
    Thanks in advance.
    null

    hello,
    this functionality is available in reports 9i which will be part of 9iAS Release 2.
    regards,
    the oracle reports team

  • Report output send through mail

    Dear friends,
    Looking for sample report to send the report output through external mail on execution.
    Regards,
    Praveen Lobo

    *& Report  ZKB_EMAIL
    REPORT  zkb_email NO STANDARD PAGE HEADING LINE-SIZE 200.
    TABLES: ekko.
    PARAMETERS: p_email TYPE somlreci1-receiver
    DEFAULT '<b>WRITE EMAIL ID EG [email protected]'</b>.
    Output Table
    TYPES: BEGIN OF t_ekpo,
    ebeln TYPE ekpo-ebeln,
    ebelp TYPE ekpo-ebelp,
    aedat TYPE ekpo-aedat,
    matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
    wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
    ebeln(10) TYPE c,
    ebelp(5) TYPE c,
    aedat(8) TYPE c,
    matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    Mail Parameters
    DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
    WITH HEADER LINE.
    DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
    w_cnt TYPE i,
    w_sent_all(1) TYPE c,
    w_doc_data LIKE sodocchgi1,
    gd_error TYPE sy-subrc,
    gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
    Retrieve sample data from table ekpo
      PERFORM data_retrieval.
    Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      PERFORM populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment   TABLES it_message   it_attach
      USING p_email 'Example .xls documnet attachment'  'XLS'  'filename'
      CHANGING gd_error
      gd_reciever.
    Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *& Form DATA_RETRIEVAL
    Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
      UP TO 10 ROWS
      FROM ekpo
      INTO TABLE it_ekpo.
    ENDFORM. " DATA_RETRIEVAL
    *& Form BUILD_XLS_DATA_TABLE
    Build data table for .xls document
    FORM build_xls_data_table.
      CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
                 con_tab TYPE x VALUE '09'. "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'  INTO it_attach SEPARATED BY space.
      CONCATENATE space it_attach INTO it_attach.
      APPEND it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
        CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
        wa_charekpo-aedat wa_charekpo-matnr
        INTO it_attach SEPARATED BY space .
        CONCATENATE space it_attach INTO it_attach.
        APPEND it_attach.
      ENDLOOP.
    ENDFORM. " BUILD_XLS_DATA_TABLE
    *& Form SEND_FILE_AS_EMAIL_ATTACHMENT
    Send email
    FORM send_file_as_email_attachment TABLES pit_message
    pit_attach
    USING p_email
    p_mtitle
    p_format
    p_filename
    p_attdescription
    p_sender_address
    p_sender_addres_type
    CHANGING p_error
    p_reciever.
      DATA: ld_error TYPE sy-subrc,
      ld_reciever TYPE sy-subrc,
      ld_mtitle LIKE sodocchgi1-obj_descr,
      ld_email LIKE somlreci1-receiver,
      ld_format TYPE so_obj_tp ,
      ld_attdescription TYPE so_obj_nam ,
      ld_attfilename TYPE so_obj_des ,
      ld_sender_address LIKE soextreci1-receiver,
      ld_sender_address_type LIKE soextreci1-adr_typ,
      ld_receiver LIKE sy-subrc.
      ld_email = p_email.
      ld_mtitle = p_mtitle.
      ld_format = p_format.
      ld_attdescription = p_attdescription.
      ld_attfilename = p_filename.
      ld_sender_address = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
      ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      w_doc_data-skip_scren = 'X'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type = ld_format.
      t_packing_list-obj_descr = ld_attdescription.
      t_packing_list-obj_name = ld_attfilename.
      t_packing_list-doc_size = t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      APPEND t_receivers.
      CLEAR t_receivers.
      t_receivers-receiver = sy-uname. " replace with <login name>
      t_receivers-rec_type = 'B'.
      t_receivers-express = 'X'.
      APPEND t_receivers.
      CLEAR t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          document_data              = w_doc_data
          put_in_outbox              = 'X'
          sender_address             = ld_sender_address
          sender_address_type        = ld_sender_address_type
          commit_work                = 'X'
        IMPORTING
          sent_to_all                = w_sent_all
        TABLES
          packing_list               = t_packing_list
          contents_bin               = t_attachment
          contents_txt               = it_message
          receivers                  = t_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.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.                    "SEND_FILE_AS_EMAIL_ATTACHMENT
    *& Form INITIATE_MAIL_EXECUTE_PROGRAM
    Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
    WITH output = 'X'
      AND RETURN.
    ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
    *& Form POPULATE_EMAIL_MESSAGE_BODY
    Populate message body text
    FORM populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    ENDFORM. " POPULATE_EMAIL_MESSAGE_BODY
    Rewards if useful.............
    Minal

  • Sendin Spool reports to an e-mail address.

    Just wondering how one would go about developing a process to look for a specific spool report and send it to a specific e-mail address.  I would place the reports and associated e-mail address in a Z table to be maintained by a user group.  I have no clue on how to read the spool and collect a specific report to be sent via e-mail.  Any help or suggestions would be greatly appreciated.
    Thanks,
    Scott

    Here is some sample code.  This program takes the spool from a previous job step.  It converts this spool to PDF and then inserts this PDF as an attachment in an E-mail.
    * Program Name: KEG Job Sched Run with PDF Output Creation: 03/22/2001
    * SAP Name    : ZESU_JOB_RUN_WITH_PDF_OUTPUT      Application: U       *
    * Author      : Thomas Jung                       Type: 1              *
    * Description :  This Program will read the spool produced
    * by the specified previous job step and converts it to
    * PDF.  This PDF-Formatted report is then output to a file.            *
    * Inputs: File name, job step                                          *
    * Outputs: File formatted in PDF with the report output.               *
    * External Routines
    * FILE_GET_NAME
    * CONVERT_ABAPSPOOLJOB_2_PDF
    * CONVERT_OTFSPOOLJOB_2_PDF
    * Z_E_OPEN_FILE_FOR_OUTPUT_BIN
    * Z_E_WRITE_TO_FILE_WITH_LENGTH
    * SO_NEW_DOCUMENT_ATT_SEND_API1
    * BAPI_USER_GET_DETAIL
    * Return Codes:
    * The program uses the standard function modules for File manipulation
    * therefore it has all the standard error routines for Files.          *
    * Ammendments:                                                         *
    *    Programmer        Date     Req. #            Action               *
    * ================  ==========  ======  ===============================*
    * Thomas Jung       03/27/2001  ------  Initial Program.               *
    report  zesu_job_run_with_pdf_output message-id zes_job.
    * DATA DICTIONARY TABLES                                               *
    tables: raldb. "Transfer Structure for Logical Databases
    tables: tbtcp.
    tables: icon,   "Icons table
            bapiadsmtp, "BAPI structure for e-mail addresses (central
            bapiadpag.
    * TYPE POOLS                                                           *
    type-pools: sbdst.
    * CONSTANTS                                                            *
    constants: logical_file_name like filename-fileintern
                  value 'ZEX_STANDARD_FILENAME',
               pdf_ext(4) type c
                  value '.pdf',
               pdf_type(3) type c
                  value 'PDF',
               internet(1) type c
                  value 'U',
               dist_list(1) type c
                  value 'C',
               kimball_domain(12) type c value '@kimball.com'.
    constants: kim_ftp(80) type c
    value
    'ftp://kww.kog.kimball.com/webtools/acrobat_reader/acroread40w95.exe'.
    constants: ext_ftp(80) type c
    value
    'http://www.adobe.com/products/acrobat/readermain.html'.
    * VARIABLES                                                            *
    data: length type i.
    data: f4_field like trdir-name.
    data: pathleng type i,
          nameleng type i,
          physleng type i.
    data jselect like btcselect.
    data: report like sy-repid.
    data: doc_chng         like sodocchgi1.
    data: tab_lines        like sy-tabix.
    * INTERNAL TABLES                                                      *
    data: begin of html_tab occurs 0.
            include structure w3html.
    data: end of html_tab.
    data: icontab(32) occurs 10 with header line.
    data: itab like abaplist occurs   0 with header line.
    data: ipdf        like tline      occurs 0 with header line.
    data: objpack          like sopcklsti1 occurs 2 with header line.
    data: objhead          like solisti1   occurs 1 with header line.
    data: objbin           like solisti1   occurs 10 with header line.
    data: objtxt           like solisti1   occurs 10 with header line.
    data: reclist          like somlreci1  occurs 5 with header line.
    * SELECTION SCREEN LAYOUT                                              *
    selection-screen begin of block one with frame title text-001.
    parameters: fileintn like filename-fileintern obligatory
                    default logical_file_name,
                filepath like rlgrap-filename lower case.
    parameters: file1    like rlgrap-filename obligatory lower case,
                physname like rlgrap-filename lower case.
    parameters: date1 as checkbox.
    parameters: time1 as checkbox.
    selection-screen end of block one.
    selection-screen begin of block two with frame title text-002.
    parameter: step like tbtcp-stepcount.
    parameter: abap radiobutton group one.
    parameter: oft  radiobutton group one.
    selection-screen end of block two.
    selection-screen begin of block three with frame title text-003.
    parameter: file  radiobutton group two.
    parameter: email radiobutton group two.
    selection-screen skip 1.
    parameter: int radiobutton group thre.
    parameter: dis radiobutton group thre.
    selection-screen skip 1.
    parameter: ext_user like somlreci1-receiver.
    selection-screen end of block three.
    * SELECTION SCREEN PROCESSING - OUTPUT                                 *
    at selection-screen output.
      perform filename_processing.
      loop at screen.
        if screen-name eq 'FILEPATH' or
           screen-name eq 'PHYSNAME'.
          screen-input = 0.
          modify screen.
        endif.
      endloop.
    * START OF SELECTION                                                   *
    start-of-selection.
      move sy-repid to report.
      perform auth_check.
      perform filename_processing.
      perform get_spool.
      perform convert_list_to_pdf.
      if file = 'X'.
        perform write_to_file.
      else.
        perform send_pdf_in_email.
      endif.
    *&      Form  filename_processing
    *       Prepair to conver to the logical file name to a physical name
    *  -->  p1        text
    *  <--  p2        text
    form filename_processing.
      perform get_filename using fileintn file1 physname.
      nameleng = strlen( file1 ).
      physleng = strlen( physname ).
      pathleng = physleng - nameleng.
      if pathleng > 0.
        filepath = physname(pathleng).
      endif.
    endform.                    " filename_processing
    *&      Form  get_filename
    *       Convert the logical file name into a physical file name
    *      -->P_FILEINTN  Input Logical File Name
    *      -->P_FILE1     Filename selected by input
    *      -->P_PHYSNAME  Output Physical File Name
    form get_filename using    p_fileintn
                               p_file1
                               p_physname.
      data: p_file2 like rlgrap-filename.
      clear p_file2.
      move p_file1 to p_file2.
      if date1 = 'X'.
        concatenate p_file2
                    sy-datum
                    into p_file2.
      endif.
      if time1 = 'X'.
        concatenate p_file2
                    sy-uzeit
                    into p_file2.
      endif.
      concatenate p_file2
                  pdf_ext
                  into p_file2.
      call function 'FILE_GET_NAME'
            exporting
              client                        = sy-mandt
              logical_filename              = p_fileintn
              operating_system              = sy-opsys
              parameter_1                   = p_file2
    *     PARAMETER_2                   = ' '
    *     PARAMETER_3                   = ' '
    *     USE_PRESENTATION_SERVER       = ' '
    *     WITH_FILE_EXTENSION           = ' '
    *     USE_BUFFER                    = ' '
            importing
    *     EMERGENCY_FLAG                =
    *     FILE_FORMAT                   =
              file_name                     = p_physname
            exceptions
              file_not_found                = 1
              others                        = 2
      if sy-subrc <> 0.
        message e001(zes_general) with sy-subrc.
      endif.
    endform.                    " get_filename
    *&      Form  write_to_file
    *       TRANSFER PDF DATA TO OUTPUT FILE
    *  -->  p1        text
    *  <--  p2        text
    form write_to_file.
      data: string_out type string.
      describe field objbin length length.
      call function 'Z_E_OPEN_FILE_FOR_OUTPUT_BIN'
           exporting
                filename1 = physname.
      loop at objbin.
        clear string_out.
        move objbin to string_out.
        call function 'Z_E_WRITE_TO_FILE_WITH_LENGTH'
             exporting
                  filename1        = physname
                  length           = length
                  please_open_file = 'NO'
                  string           = string_out.
      endloop.
    endform.                    " write_to_file
    *&      Form  convert_list_to_pdf
    *       Convert to Spool to PDF
    *  -->  p1        text
    *  <--  p2        text
    form convert_list_to_pdf.
      data: spool_id like tsp01-rqident.
      move tbtcp-listident to spool_id.
    ****Is this ABAP List Processing?
      if abap = 'X'.
        call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
          exporting
            src_spoolid                    = spool_id
    *       NO_DIALOG                      =
    *       DST_DEVICE                     =
    *       PDF_DESTINATION                =
    *     IMPORTING
    *       PDF_BYTECOUNT                  =
    *       PDF_SPOOLID                    =
    *       LIST_PAGECOUNT                 =
    *       BTC_JOBNAME                    =
    *       BTC_JOBCOUNT                   =
          tables
            pdf                            = 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 i016 with sy-subrc.
        endif.
      else.
    ****Or is this SAPscript?
        call function 'CONVERT_OTFSPOOLJOB_2_PDF'
          exporting
            src_spoolid                    = spool_id
    *       NO_DIALOG                      =
    *       DST_DEVICE                     =
    *       PDF_DESTINATION                =
    *     IMPORTING
    *       PDF_BYTECOUNT                  =
    *       PDF_SPOOLID                    =
    *       OTF_PAGECOUNT                  =
    *       BTC_JOBNAME                    =
    *       BTC_JOBCOUNT                   =
          tables
            pdf                            = ipdf
         exceptions
           err_no_otf_spooljob            = 1
           err_no_spooljob                = 2
           err_no_permission              = 3
           err_conv_not_possible          = 4
           err_bad_dstdevice              = 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 i016 with sy-subrc.
        endif.
      endif.
      perform convert_pdf tables ipdf
                                 objbin.
    endform.                    " convert_list_to_pdf
    *&      Form  get_spool
    *   Read the job log to get the spool number for the specified step
    *  -->  p1        text
    *  <--  p2        text
    form get_spool.
      clear jselect.
    *jselect-jobname = '*'.
      jselect-username = '*'.
    ****Have this program get its own Job Name
      call function 'GET_JOB_RUNTIME_INFO'
           importing
    *         EVENTID                 =
    *         EVENTPARM               =
    *         EXTERNAL_PROGRAM_ACTIVE =
              jobcount                = jselect-jobcount
              jobname                 = jselect-jobname
    *         STEPCOUNT               =
           exceptions
                no_runtime_info         = 1
                others                  = 2.
    ****Read the spool number for this job step.
      clear tbtcp.
      select single listident from tbtcp
             into tbtcp-listident
             where jobname   = jselect-jobname
               and jobcount  = jselect-jobcount
               and stepcount = step.
      if tbtcp-listident = 0.
        message i009 with step.
      endif.
    endform.                    " get_spool
    *&      Form  convert_pdf
    *       Take the PDF information returned by the function module
    *       and convert it to a file readable format.  It currently is
    *       in a printable-only format.
    *      -->P_IPDF  PDF Source
    *      -->P_OBJBIN  PDF Destination
    form convert_pdf tables   t_source_tab structure ipdf
                              t_target_tab structure objbin.
      data:  l_hfeld(1600)      type c,
             l_offset           type p,
             l_tabix            like sy-tabix,
             l_max              type i,
             l_linecount_source type i,
             l_length_source    type i,
             l_length_target    type i.
    * Zeilenlänge des Quell-PDF-Files
      describe field t_source_tab length l_length_source.
    * Zeilenlänge der Ziel-Mime-Tabelle
      describe field t_target_tab length l_length_target.
    * Zeilenanzahl des Quell-PDF-Files
      describe table t_source_tab lines l_linecount_source.
    * Die maximale Zielgröße wird durch das Feld l_hfeld begrenzt.
      l_max = l_length_target + l_length_source.
    *  IF L_MAX > 1600.
    *    RAISE CONVERT_NOT_POSSIBLE.
    *  ENDIF.
      refresh t_target_tab.
      loop at t_source_tab.
        l_tabix = sy-tabix.
        move t_source_tab to l_hfeld+l_offset.
    * falls letzte zeile der quelltabelle erreicht
        if l_tabix = l_linecount_source.
          l_length_source = strlen( t_source_tab ).
        endif.
        l_offset = l_offset + l_length_source.
        while l_offset ge l_length_target.
          clear t_target_tab.
          t_target_tab = l_hfeld(l_length_target).
          append t_target_tab.
          shift l_hfeld by l_length_target places.
          l_offset = l_offset - l_length_target.
        endwhile.                          " l_offset ge p_length_target
    * falls letzte zeile der quelltabelle erreicht
        if l_tabix = l_linecount_source.
          if l_offset gt 0.
            clear t_target_tab.
            t_target_tab = l_hfeld(l_offset).
            append t_target_tab.
          endif.                           " l_offset gt 0
        endif.                             " l_tabix = l_linecount_lines
      endloop.                             " p_source_tab
    endform.                    " convert_pdf
    *&      Form  auth_check
    *       Perform Authorization Check
    *  -->  p1        text
    *  <--  p2        text
    form auth_check.
      authority-check object 'Z_ABAP_CHK'
                   id 'BUKRS' dummy
                   id 'ACTVT' dummy
                   id 'WERKS' dummy
                   id 'REPID' field report.
      if sy-subrc ne 0.
        message e024.
      endif.
    endform.                    " auth_check
    *&      Form  send_pdf_in_email
    *       Transfer the PDF file in an E-Mail
    *  -->  p1        text
    *  <--  p2        text
    form send_pdf_in_email.
      data: iaddsmtp type bapiadsmtp occurs 0 with header line.
      data: ireturn type bapiret2 occurs 0 with header line.
      concatenate text-010 jselect-jobname text-011
                  into doc_chng-obj_descr
                  separated by space.
      clear objtxt.
      objtxt = text-012.
      append objtxt.
      clear objtxt.
      objtxt = text-013.
      append objtxt.
      clear objtxt.
      concatenate text-014 jselect-jobname
                  into objtxt
                  separated by space.
      append objtxt.
      clear objtxt.
      objtxt = text-015.
      append objtxt.
      clear objtxt.
      objtxt = text-016.
      append objtxt.
      clear objtxt.
      append objtxt.
      clear objtxt.
      concatenate text-017 kim_ftp
                  into objtxt
                  separated by space.
      append objtxt.
      clear objtxt.
      concatenate text-018 ext_ftp
                into objtxt
                separated by space.
      append objtxt.
      describe table objtxt lines tab_lines.
      read table objtxt index tab_lines.
      doc_chng-doc_size = ( tab_lines - 1 ) * 255 + strlen( objtxt ).
      clear objpack-transf_bin.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = 'RAW'.
      append objpack.
      describe table objbin lines tab_lines.
      concatenate jselect-jobname pdf_ext
                  into objhead.
      append objhead.
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 1.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = pdf_type.
      objpack-obj_name   = jselect-jobname.
      concatenate text-019 jselect-jobname
                  into objpack-obj_descr
                  separated by space.
      objpack-doc_size   = tab_lines * 255.
      append objpack.
      if int = 'X'.
        clear iaddsmtp.
        refresh iaddsmtp.
        clear bapiadsmtp.
        call function 'BAPI_USER_GET_DETAIL'
             exporting
                  username = ext_user+0(12)
             tables
                  return   = ireturn
                  addsmtp  = iaddsmtp.
        loop at iaddsmtp where std_no = 'X'.
          clear bapiadsmtp.
          move iaddsmtp to bapiadsmtp.
        endloop.
        if bapiadsmtp-e_mail = ''.
          concatenate ext_user kimball_domain
                    into reclist-receiver.
        else.
          move bapiadsmtp-e_mail to reclist-receiver.
        endif.
        move internet to reclist-rec_type.
      else.
        reclist-receiver = ext_user.
        move dist_list to reclist-rec_type.
      endif.
      append reclist.
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        exporting
          document_data                    = doc_chng
          put_in_outbox                    = 'X'
    *   IMPORTING
    *     SENT_TO_ALL                      =
    *     NEW_OBJECT_ID                    =
        tables
          packing_list                     = objpack
          object_header                    = objhead
          contents_bin                     = objbin
          contents_txt                     = objtxt
    *     CONTENTS_HEX                     =
    *     OBJECT_PARA                      =
    *     OBJECT_PARB                      =
          receivers                        = reclist
        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
      case sy-subrc.
        when 0.
          message i014 with reclist-receiver.
        when 1.
          message i015 with text-027.
        when 2.
          message i015 with text-028.
        when 3.
          message i015 with text-029.
        when 4.
          message i015 with text-030.
        when 5.
          message i015 with text-031.
        when 6.
          message i015 with text-032.
        when 7.
          message i015 with text-033.
        when 8.
          message i015 with text-036.
        when others.
          message i015 with text-036.
      endcase.
    endform.                    " send_pdf_in_email

  • Report RSWUWFML to send mails to Outlook about the work item Arrival

    Hello,
    Report RSWUWFML to send mails to Outlook about the work item Arrival - Can we make settigns so that only work items pertaining to Leave Requests are sent to the Outlook.
    Please help.
    Regards,
    Poornima

    Hi Poornima,
    RSWUWFML is very old, you should use RSWUWFML2 at least but if you are on release Basis 6.40 or above you should use Extended Notifications. As mentioned in the other posts you need to restrict your selection criteria by task TSXXXXXXX. The task associated with the work items you want to send a notifcation about. You need to open the workflow definition and open the step in th definition that corresponds to the work item.
    Another way would be to highlight one of the work items in the users inbox SBWP in the backend and click the "Details" button in the toolbar. You will see the task ID listed there.
    Regards,
    Eddie

  • Send mail (Urgent)

    HI guys,
    Please look at the coding below..
    l_wa_recieve-receiver = '[email protected]'. " this is the distribution list id "with number of mail ids inside it
    l_wa_recieve-rec_type = 'C'. "shared dis list
    APPEND l_wa_recieve TO l_it_recieve.
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
    EXPORTING
    document_data = "ERROR'
    document_type = 'DLI'
    put_in_outbox = c_x
    commit_work = c_x
    TABLES
    object_content = l_it_content "this table contains the body of email
    receivers = l_it_recieve " this is above
    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.
    Can you just tell me whether it works fine.. And if it is correct how much time will it take to get email in my respective email address..
    I have run this FM by just giving my mail id (not distribution list just giving doctype = 'RAW instead of DLI)
    The FM ran sucessfully without any errors , But I didnot receive any mail in my mail Inbox..
    Can you please help me how to sort it out getting mail in less time..
    Points will be rewarded
    regards,
    nazeer

    Hi Nazeer,
                   This will work fine.but If u are not getting mail just go through this documentation.This will help u find out the error.
    Functionality
    This function module enables you to send a new document, which has not yet been created, internally and externally. During the send process the document is created, along with the attributes and content that are to be transferred.
    Import parameters
    DOCUMENT_TYPE
    Default = 'RAW'.
    Document class. All classes are possible except for folders ('FOL') and distributions lists ('DLI').
    PUT_IN_OUTBOX
    Default = ' '.
    If this flag is activated ('X'), the newly created document is also placed in the outbox of the active user when it is sent.
    DOCUMENT_DATA
    This structure must contain the attributes of the document to be sent.
    OBJ_NAME
    Name of document.
    OBJ_DESCR
    Title (short description) of document.
    OBJ_LANGU
    Language of document.
    OBJ_SORT
    Sort field of document. You can search for this term using attribute search.
    OBJ_EXPDAT
    Expiry date of document. The document itself cannot expire, but each time the document is entered in a folder, this date is used as the default for the expiry date of the entry (field EXPIRY_DAT).
    SENSITIVTY
    Document sensitivity.
    A private document can have the following levels of sensitivity:
    'O' : Standard, normal sensitivity
    'F' : Functional, can be forwarded functionally
    'P' : Confidential, not visible to substitutes
    For documents in shared folders, only sensitivity level 'O' is permitted.
    OBJ_PRIO
    Recipient priority. The document itself does not have a priority level, but each time the document is entered in a folder, this value is used as the default for recipient priority for the entry (field PRIORITY).
    NO_CHANGE
    If this flag is activated ('X'), documents in shared folders can only be changed by the author. The author can change documents in private folders after they have been sent.
    PRIORITY
    Recipient priority for the folder entry. This value gives the priority, which was assigned to the document by the owner, after receipt.
    EXPIRY_DAT
    Expiry date of the folder entry. When the expiry date has been reached or passed, the entry is placed in private trash and can be retrieved from there if needed, up until the next time the trash is emptied. A new folder entry is initially given the expiry date of the document from field OBJ_EXPDT.
    PROC_TYPE
    If this field does not contain the default value (default is ' '), the document can be processed.
    The following entries are permitted:
    'D' : Dialog module
    'F' : Function module
    'R' : Report
    'S' : Report with transfer of values to global memory
    'T' : Transaction
    'U' : Transaction with transfer of values to global memory
    PROC_NAME
    Processing element. You must enter the name of the dialog module, function module, report or transaction in accordance with the entry in the field PROC_TYPE.
    PROC_SYST
    Name of sytem in which the document is to be processed. If no system is specified or '*' is entered, processing is possible in all systems.
    PROC_CLINT
    Client in which the document is to be processed. If no client is specified or '*' is entered, processing is possible in all clients.
    SKIP_SCREN
    If this flag is activated ('X'), the first screen is skipped during processing.
    TO_DO_OUT
    If this flag is activated ('X'), the document cannot be processed from the SAPoffice interface. You must use the API function module SO_DOCUMENT_SET_STATUS_API1.
    FREE_DEL
    If this flag is activated ('X'), you can delete the document from external folders using the API.
    DOC_SIZE
    Size of the document in bytes. For PC documents, the size of the relevant file should be entered, for RAW  and SCR documents the size is the "length of the last line" + "number of other lines multiplied by 255".
    Export parameters
    NEW_OBJECT_ID
    Object ID of the document created during the send process.
    SENT_TO_ALL
    If this flag is activated ('X'), the document was sent to all specified recipients or, in the case of external forwarding, the corresponding send requests were delivered to the subsystem. If sending or delivery failed in one or more cases, the flag is not activated.
    Table parameters
    OBJECT_HEADER
    This table must contain the document class-relevant data. For example, SAPscript documents store information here about forms and styles, Excel list viewer documents store, amongst other things, the number of rows and columns and PC documents store their original file names.
    LINE
    Requires class-relevant document information line by line.
    OBJECT_CONTENT
    This table must contain the actual content of the document.
    LINE
    Requires the content of the document line by line.
    OBJECT_PARA
    This table is used only by documents that are to be processed. It must contain the SET/GET parameter that is transferred to the processing element.
    NAME
    Name of the SET/GET parameter. Only the first three characters are used.
    OPTION
    This field is not used.
    LOW
    Requires the value of the parameter in NAME.
    HIGH
    This field is not used.
    OBJECT_PARB
    This table is only used by documents to which a particular processing type is assigned. The meaning of the table depends on the processing type. If the processing element is a report, or transaction with transfer of values to the global memory, the table content is interpreted as the quantity of parameters with the relevant values and exported to the memory ID taken from the first row. If the processing element is a function module or a dialog module, the table is transferred to this as table parameter MSGDIAL.
    NAME
    If the processing element is a report or a transaction with transfer of values to the global memory, the field of the first row of the table must contain the name of the memory ID used for the export. The fields of the other rows accommodate the parameter names. If the processing element is a function module or a dialog module, the fields must contain values corresponding to the use of the module.
    VALUE
    If the processing element is a report or a transaction with transfer of values to the global memory, the field for the first row of the table must remain empty. The fields for the other rows accommodate the values belonging to the parameters in NAME. If the processing element is a function or dialog module, the fields must contain values corresponding to the use of the modules.
    RECEIVERS
    This table must contain the document recipients.
    RECEIVER
    Name of recipient.
    The following entry categories are possible:
    SAP user name of the recipient
    SAPoffice name of the recipient
    Shared distribution list
    Fax number in the form of structure SADRFD
    Internet address in the form of structure SADRUD
    Remote SAP name in the form of structure SADR7D
    X.400 address in the form of structure SADR8D
    ADR_TYPE
    Type of RECEIVER entry.
    The following values are permitted:
    'B' : SAP user name
    ' ' : SAPoffice name
    'C' : Shared distribution list
    'F' : Fax number
    'U' : Internet address
    'R ' : Remote SAP name
    'X' : X.400 address
    REC_ID
    If the recipient is a SAPoffice user, the user ID, instead of the recipient name in RECEIVER, can be entered in this field.
    REPLY_DOC
    If there is a value in this field, the document is a reply to the folder entry identified by the specified ID. A correspondence history is automatically created/continued.
    REC_DATE
    The date on which the document is to reach the recipient. This date cannot be guaranteed for external recipients as it depends on connected products.
    PROXY_ID
    If automatic forwarding is active in the recipient's system, this field contains the SAP user ID or the address ID of the external address to which the document was ultimately sent.
    RETRN_CODE
    When the recipient has received the document, the function module enters the value '0' in this field. If the document is not successfully received, a value unequal to '0' is entered in the field.
    EXPRESS
    If this flag is activated ('X'), the document is sent with the attribute 'express'. If the recipient is a SAPoffice user who is logged on, he or she receive a message immediately, saying that he or she has received an express mail.
    COPY
    If this flag is activated ('X'), the document is sent with the attribute 'copy'.
    BLIND_COPY
    If this flag is activated ('X'), the document is sent with the attribute 'secret copy'. If the recipient is a SAPoffice user, he or she can neither print nor forward the document.
    NO_FORWARD
    If this flag is activated ('X') and the recipient is a SAPoffice user, he or she cannot forward the document.
    NO_PRINT
    If this flag is activated ('X') and the recipient is a SAPoffice user, he or she cannot print the document.
    TO_ANSWER
    If this flag is activated ('X') and the recipient is a SAPoffice user, the user must reply to the document before he or she can delete it from his or her inbox.
    TO_DO_EXPL
    If this flag is activated ('X') and the recipient is a SAPoffice user, the user must process the document before he or she can delete it from his or her inbox.
    TO_DO_GRP
    If this field contains a value between '1' and '9', a SAPoffice user in the recipient group indicated by this number must process the document before the recipients can delete it from their inboxes. If the value '0' is entered, the document does not need to be processed.
    COM_TYPE
    Communication method used to send the document. This field is only relevant if the recipient is an address number, that is, if the document is sent externally via address management. If the field is empty, the standard communication type specified in address management is used.
    The following values are permitted:
    'INT' : Send via Internet
    'FAX' : Send as a fax
    'X40' : Send via X.400
    'RML' : Send in another SAP system
    LFDNR
    Current number from address management. This field is only relevant if the recipient is an address number, that is, if the document is sent via address management. If the field is empty, the default current number in address management is used.
    FAX
    This field is not used.
    COUNTRY
    This field is not used.
    SPOOL_ID
    This field is not used.
    NOTIF_DEL
    If this flag is activated ('X'), the sender receives confirmation when the recipient receives the document. He or she also receives a message if the document could not be delivered. This flag should only be activated for external sending, since internal sending is synchronous. Confirmation is only supported by a small number of mail systems, however. For example: X.400 and SAP SAP.
    NOTIF_READ
    If this flag is activated ('X'), the sender is notified as soon as the recipient has read the document. This flag should only be activated for external sending, since internal sending is synchronous. Read notification is only supported by a small number of mail systems, however. For example: X.400 and SAP SAP.
    NOTIF_NDEL
    If this flag is activated ('X'), the recipient receives a message if the document could not be delivered to the recipient. This flag should only be activated for external sending, since internal sending is synchronous. The message is only supported by a small number of mail systems, however. For example: X.400 and SAP SAP.
    SAP_BODY
    If this flag is activated ('X'), SAP specific data is transferred to the document in an external body part when sending via X.400. This flag should only be activated if the target system is an SAP System.
    Exceptions
    TOO_MANY_RECEIVERS
    Too many recipients were specified. The active user does not have authorization to send to this number of recipients.
    DOCUMENT_NOT_SENT
    The document could not be sent. It was not delivered to any of the specified recipients.
    DOCUMENT_TYPE_NOT_EXIST
    The document class specified does not exist or is not permitted.
    OPERATION_NO_AUTHORIZATION
    The document was not allowed to be sent because one of the required authorizations did not exist.
    PARAMETER_ERROR
    The combination of parameter values transferred to the function module was not a permitted combination.
    X_ERROR
    Am internal error or a database inconsistency has occurred.
    ENQUEUE_ERROR
    A lock required for the send process could not be set. It is probable that another user is processing.
    Example
    Sending a confidential RAW document to an internal user and an Internet address. The new document is also placed in the sender's outbox.
    DATA: OBJCONT LIKE SOLISTI1 OCCURS 5 WITH HEADER LINE.
    DATA: RECLIST LIKE SOMLRECI1 OCCURS 5 WITH HEADER LINE.
    DATA: DOC_CHNG LIKE SODOCCHGI1.
    DATA: ENTRIES LIKE SY-TABIX.
    DATA: NAME(15).
    Fill the document
    DOC_CHNG-OBJ_NAME = 'URGENT'.
    DOC_CHNG-OBJ_DESCR = 'Read at once !'.
    DOC_CHNG-SENSITIVTY = 'P'.
    OBJCONT = 'Hey guys, time for lunch !!!'.
    APPEND OBJCONT.
    OBJCONT = 'Lets get going !'.
    APPEND OBJCONT.
    DESCRIBE TABLE OBJCONT LINES ENTRIES.
    READ TABLE OBJCONT INDEX ENTRIES.
    DOC_CHNG-DOC_SIZE = ( ENTRIES - 1 ) * 255 + STRLEN( OBJCONT ).
    Fill the receiver list
    CLEAR RECLIST.
    RECLIST-RECEIVER = SY-UNAME.  " replace with <login name>
    RECLIST-REC_TYPE = 'B'.
    RECLIST-EXPRESS = 'X'.
    APPEND RECLIST.
    CLEAR RECLIST.
    RECLIST-RECEIVER = '[email protected]'.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    Send the document
    CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
         EXPORTING
              DOCUMENT_TYPE  = 'RAW'
              DOCUMENT_DATA  = DOC_CHNG
              PUT_IN_OUTBOX  = 'X'
         TABLES
              OBJECT_CONTENT = OBJCONT
              RECEIVERS      = RECLIST
         EXCEPTIONS
              TOO_MANY_RECEIVERS         = 1
                   DOCUMENT_NOT_SENT          = 2
                  OPERATION_NO_AUTHORIZATION = 4
                   OTHERS                     = 99.
        CASE SY-SUBRC.
          WHEN 0.
            LOOP AT RECLIST.
              IF RECLIST-RECEIVER = SPACE.
                NAME = RECLIST-REC_ID.
              ELSE.
                NAME = RECLIST-RECEIVER.
              ENDIF.
              IF RECLIST-RETRN_CODE = 0.
                WRITE: / NAME, ': succesfully sent'.
              ELSE.
                WRITE: / NAME, ': error occured'.
              ENDIF.
            ENDLOOP.
          WHEN 1.
            WRITE: / 'Too many receivers specified !'.
          WHEN 2.
            WRITE: / 'No receiver got the document !'.
          WHEN 4.
            WRITE: / 'Missing send authority !'.
          WHEN OTHERS.
            WRITE: / 'Unexpected error occurred !'.
        ENDCASE.
    Notes
    To send an existing document, you must use the function module SO_OLD_DOCUMENT_SEND_API1.
    If the active user is still to be able to process the document after it has been sent, it must be moved to the outbox when sent using the flag PUT_IN_OUTBOX. You can use the function module SO_FOLDER_READ_API1 to read the contents of the outbox and the object ID to find the document sent.
    It is not possible to use a user address name as the recipient since this may not be unique. To get around this problem, you can use the function module SO_NAME_CONVERT_API1. This provides a hit list in response to a specified name, for which a dialog is constructed with a choice of required values.
    Parameters
    DOCUMENT_DATA
    DOCUMENT_TYPE
    PUT_IN_OUTBOX
    COMMIT_WORK
    SENT_TO_ALL
    NEW_OBJECT_ID
    OBJECT_HEADER
    OBJECT_CONTENT
    CONTENTS_HEX
    OBJECT_PARA
    OBJECT_PARB
    RECEIVERS
    Exceptions
    TOO_MANY_RECEIVERS
    DOCUMENT_NOT_SENT
    DOCUMENT_TYPE_NOT_EXIST
    OPERATION_NO_AUTHORIZATION
    PARAMETER_ERROR
    X_ERROR
    ENQUEUE_ERROR
    U can use other FM also
    <b>SO_DOCUMENT_SEND_API1
    SO_NEW_DOCUMENT_ATT_SEND_API1
    SO_OLD_DOCUMENT_SEND_API1</b>
    Reward points if helpful.
    Regards,
    Hemant

  • Bold, Colors in mail - Urgent

    Hi all,
    I am using a function mod for mail alert. The  user wants cretain names as BOLD & Colors in the text.
    Is there any function mod which sends the mail with BOLD, COLORS & any other options?
    Pls urgent.
    Thanks in advance.
    Vijay

    Vijay,
    Interesting , It will work with my below code. If you don'nt want an attachment then just remove it from this program..
    Believe this will solve your problem.
    Cheers,
    Thomas.
    REPORT test.
    DATA: att_size TYPE i,        " att Size
          att_itab_size TYPE i,   " Attachment size
          mailtxt_size TYPE i.    " Text in mail size
    DATA:
    it_mailpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, " Dist details
    it_mailhead LIKE solisti1   OCCURS  1 WITH HEADER LINE," Header data
    it_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,   " Rec List
    it_mailtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,    " Mail Text
    it_att_data LIKE solisti1 OCCURS 0 WITH HEADER LINE,   " Attachment data
    it_doc_att LIKE sodocchgi1.                          " Attri of new doc
    * Text in the mail.
    it_mailtxt-line  =
    '<BODY BGCOLOR="#FFFFCC">' &
    '<B> This is a test mail,  Line Number--1</B><BR>'
    APPEND it_mailtxt.
    it_mailtxt-line = '<I> This is a test mail,  Line Number--2' &
                      ' This is a test mail,  Line Number--2</I><BR>'.
    APPEND it_mailtxt.
    it_mailtxt-line = '<U> This is a test mail,  Line Number--3' &
                      ' This is a test mail,  Line Number--3' &
                      ' This is a test mail,  Line Number--3</U>'.
    APPEND it_mailtxt.
    DESCRIBE TABLE it_mailtxt LINES mailtxt_size.
    * Create the att File
    concatenate '<BODY><B>Attachment Line Number 1</B><BR>' space into
    it_att_data-line.
    APPEND it_att_data.
    concatenate '<I>Attachment Line Number 2</I><BR>' space into
    it_att_data-line.
    APPEND it_att_data.
    concatenate '<U>Attachment Line Number 3</U>' space into
    it_att_data-line.
    APPEND it_att_data.
    DESCRIBE TABLE it_att_data LINES att_itab_size.
    * Attributes of new doc
    CONCATENATE 'Attach' space 'mail'
                INTO it_doc_att-obj_descr SEPARATED BY space.
    it_doc_att-sensitivty = 'F'.
    it_doc_att-doc_size   = mailtxt_size * 255.
    * Create Pack to text in mail body.
    it_mailpack-transf_bin   = space.
    it_mailpack-head_start   = 1.
    it_mailpack-head_num     = 0.
    it_mailpack-body_start   = 1.
    it_mailpack-body_num     = mailtxt_size.
    it_mailpack-doc_type     = 'HTM'.
    APPEND it_mailpack.
    * Create Pack for Attach.
    it_mailpack-transf_bin   = 'X'.
    it_mailpack-head_start   = 1.
    it_mailpack-head_num     = 1.
    it_mailpack-body_start   = 1.
    it_mailpack-body_num     = att_itab_size.
    it_mailpack-doc_type     = 'HTM'.
    CONCATENATE 'My' space 'Attachment' INTO it_mailpack-obj_descr.
    it_mailpack-doc_size     = att_itab_size * 255.
    APPEND it_mailpack.
    it_reclist-receiver   = '[email protected]'.
    it_reclist-express    = 'X'.
    it_reclist-rec_type   = 'U'.
    *it_reclist-notif_del  = 'X'. " request delivery notification
    APPEND it_reclist.
    * Call FM to send email
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
         EXPORTING
              document_data              = it_doc_att
              put_in_outbox              = 'X'
         TABLES
              packing_list               = it_mailpack
              object_header              = it_mailhead
              contents_txt               = it_mailtxt
              contents_bin               = it_att_data
              receivers                  = it_reclist
         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.

  • REPORT DOES NOT RUN CORRECTLY , URGENT PLEASE HELP

    Hi,
    I am trying to run a report from visul basic screen, but it does not run correctly. Here is how I am running the report. There is a screen developed in VB This screen prompts the user for user id and password. Once it gets that, it connects to the oracle database and pulls out a column from a table. And passes that value as a parameter to the report. Now I am calling the the report for each individual value . There are 21 value being pulled out of the database and it invokes the report 21 times. So there are 21 report engines gets started. Is there a better way to do that ? Secondly when I pass the parameter , some parameters does not pass correctly I guess , because its not generating any out put . Like out of 21 may be 10 or 11 reports gets generated correctly but rest of the reports are blank. I debug the screen i saw that the parameter value is correct, everything seems good. But still the reports are comming blank. Any Idea why it is so ? The command line that i am using in VB screen is
    Shell "C:\progra~1\ora95_2\bin\rwrun60.exe P:\Business_Analysis_&_Reporting_Tool\Test_REPORT_Templates\STORE_TYPES\Baby_Distribution_Report.Rdf USERID=" & UID & "/" & PWD & "@cposp201 DESFORMAT=PDF DESTYPE=FILE DESNAME=" & txtPath.Text & Replace(strName, " ", "_") & ".PDF BRND='" & adoRecBrand!Brand & "' PRINTJOB=NO PARAMFORM=NO"
    In the above command " adoRecBrand!Brand " is the parameter thats being passed. This is actually a recordset and brand is the column in it. When I debug the screen , I see the value also there. But the report comes out blank. Please help. This is urgent.
    Thanks
    Feroz

    The way you call reports is not scalable. If you have 100 records come back from database, you would end up launch 100 engines at the same times, which probably will blow up your machine. You should use oracle reports server to do that. You can either use rwcli60 to submit the job to reports server, or invoke rwcgi60 from URL.
    I am afraid some of reports engine failed to start and you get nothing back in your case.
    After switch to use reports server achitecture, if you still see some report is blank in your application, then you can run that report with that special set of parameters manually and see if any problem with the report itself.
    Hope this helps.
    Thanks,
    -Shaun

  • Report for PO help needed (Urgent)

    Hi all,
    do anyone has code for a report which is used to create Purchase Order for materials which has purchase requisition.
    if anyone has the plz share it with me.
    bcoz it is urgently needed & it is required to be deliver today.
    Regards
    sanjeev

    Hi
    Take the data from <b>EBAN</b> table and try to display the same after fecthing from it.
    PO related tables are EKKO and EKPO, EKET,and EKBE.
    Reward points if useful
    Regards
    Anji

  • Mail hangs when it receives a report that an e-mail could not be delivered.

    Hi Guys :o),
    One bug which is really bugging me is that every time I receive a bounced e-mail report, with a subject line containing words to the effect of:
    "Undeliverable. Return to sender."
    or:
    "The message could not be delivered."
    Mail is unable to pull any subsequent e-mails down from the POP server.
    So I junk the report, and then I delete it.
    However, lo and behold, the errant e-mail is INSTANTLY back in my Inbox, plus there's now AT LEAST one copy in my Mail Junk, and also AT LEAST one copy in my Mail Trash.
    Round and round I go, junk, delete, junk, delete, but the errant e-mail refuses to go away, and Mail continues to be unable to pull any new e-mails down from the POP server.
    Eventually, Mail just hangs, with a spinning disk.
    Even a force quit and relaunch of Mail doesn't resolve the spinning disk.
    The errant message just sits there, REFUSING to be deleted.
    The only way to get round this bug is for me to go up to my POP server, delete the report, and then PURGE DELETE the report - on the POP server !
    I then have to go in to my Mac, and go:
    --> Users --> Home --> Library --> Mail --> Account --> Inbox, Junk, and Deleted
    and then manually drag ALL copies of the report into the trash on the Desktop.
    It happens so often (pretty much every day) that I've had to create a shortcut in my Dock which leads straight to the Account folder.
    Mail has always been buggy under ALL versions of OS X, but this ongoing bug drives me crazy, mainly because there's NO logical reason for it.
    Just because I receive an e-mail message from the Hotmail server, for example, which says that my e-mail could not be delivered, usually because the recipient's inbox is full, or because no such address exists, on paper, that's just another e-mail which Mail is pulling down from the POP server.
    However, EVERY TIME I receive such a report, Mail hangs.
    I'm reluctant to rebuild my Mailboxes, in case I lose any messages, but I will if you advise it.
    Any workaround would be gratefully received.
    With best wishes to everyone in the Apple community, especially those on the Infinity Loop.
    In particular, I wish Mr Jobs a very speedy recovery.
    Cool,
    Michael T
    London, England

    Quit Mail, Right click on that Mail folder, choose archive, you'll get everything in the folder, and the folder itself in a file called Mail.zip, move it to a safe place, same for the Mail Downloads folder... only the plist is separate.
    /Users/YourUserName/Library/Preferences/com.apple.mail.plist
    Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup), it will try to repair your Disk Directory while the spinning radian is happening, so let it go, run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    If that doesn't do it and you can afford to redo all your Rules, try these & reboot...
    /Users/YourUserName/Library/Mail/MessageRules.plist
    /Users/YourUserName/Library/Mail/MessageRules.plist.backup

  • How to automatically attached multiple PDF reports to an e-mail and send

    Hello.
    I have a requirement to generate multiple PDF reports using Oracle Reports 6i on the web, then automatically attach these PDF reports to an Outlook e-mail and then bring up the Outlook e-mail dialog box so the user can modify the e-mail (such as adding more attachments, adding a CC, BC, change the message text) before sending the e-mail. I want to be able to initiate all these tasks from Oracle webforms 6i in a three-tier environment.
    I have already read various notes and solutions but none of them address all my requirements. Examples:
    1. Using OLE to interface with Outlook - but OLE does now work on the Web
    2. Using Java stored procedure or UTL_SMTP - but this does not bring-up an e-mail dialog box
    3. Using mailto: in HTML and web.show_document - but this does not allow you to attach a PDF file
    Can you please advise on possible solutions to my requirements. Thank you very much.
    Regards,
    Armando

    Here is a great resource for sending binaries.
    http://otn.oracle.com/sample_code/tech/pl_sql/htdocs/Utl_Smtp_Sample.html
    You'll want to use utl_http to run each report with a destype=file and then have another procedure running to check to see when all of your reports have finished. After they are finished, you would run the stored procedure to get all of the binaries, attach them in an email and then send it.
    If you want to concate all of the PDF files into one large file, you can do this with a Java stored procedure using iText.
    http://www.lowagie.com/iText/

Maybe you are looking for

  • Transfer attachments from Shopping cart to Backend ?

    Hi again everybody, one more problem ... We try to transfer an attachment from the SC to the Requisition or PurchaseOrder in the Backend. We implemented the two BAdi's BBP_CREATE_BE_RQ_NEW BBP_CREATE_BE_PO_NEW The method 'FILL_RQ_INTERFACE' contains

  • Version Source Control

    Hi, We're planning to develop applications with APEX in a team environment. I'm wondering what is the "best practice" for Version or Source Control? Note, we're going to use version 3.0 I do know about the java export tool which is very handy when yo

  • Satellite M30X: fans don't stop if connected to the power supply

    hi , I have a M30X and during the last months the fans when I'm connected to the power supply don't stop at all. It also shut down quite often. However the laptop is not warm. Do you have any clue? Regards, armando

  • FMS AAC(m4a) metadata problem

    Hi, I had a little problem with the NetStream's onMetaData Event, when I stream a .m4a file from local disk, metadata tags display correctly; even artwork tag, but when I stream from a remote FMS (3.0.1) some tags are missed and artwork tag is always

  • IPod mini stops playing and beeps!!

    My iPod mini will be playing a song, then it will just stop playing and start beeping in this weird pattern. The display still shows that music is playing, but it doesn't start playing until I reset it. Then sometimes the sad iPod will show up and I