Need to send the report output in email body.

Hi Friends,
I need to send the report output in body of the email but not as an attachment.
Requesting your suggestions. Please elaborated answers are expected.
Thanks & Regards,
S.Suresh Babu.

If you are looking for same output to be available in the email body, i think this is not possible.
If you are just concentrated on the data, then you can do as below.
1. In your custom program, submit the actual report program via spool and by making use of that spool, read the spool content (We have function modules which can download the content from spool to the internal table), and by making use of this internal table, build the actual internal table as required which will be passed to email function module lets say SO_OBJECT_SEND etc..
2. You can make use of even LIST_TO_MEMORY and LIST_FROM_MEMORY function modules as well instead of spool, if you have data in the final internal table.
I am not sure, how can we handle in terms of logos if any.....or the data in the top of page related things......

Similar Messages

  • Send the Report output to email from spool

    Hi All,
    The following process which i am doing to send the report output(Executed in background) to my mail id.
    I ran the report in Background and got the output in the spool. i opened the spool from the transaction SM37 and send the output to my external mail id via the following process
    click Spool Request->forward-> send SAP data
    here i am getting one POP up in there i gave my mail id and tick the check box on Express and click copy.
    Now i received the output in my mail .
    By doing the above process in the Quality server i am receiving the output in the mail as a PDF format that is correct.(Output is also correct).
    But when i execute the same in production server i am receiving the output in the mail as HTML format. (output and format is totally wrong). I want to know why its coming as HTML format instead of PDF format.
    Kindly help me regarding this.. Any configuration is there? If yes please let me know soon..
    Regards,
    Navaneeth...

    Hi,
    use scon, double-click on SMTP, select internet
    and compare the types of you both SAP-Systems.
    Hope it helps.
    Regards, Dieter

  • How to send the Report output thru email

    Dear All,
    Is there a way to send the output of a abap report thru mail. I am sure it is there.
    My report output is as following.
    Emp Code : A01234
    Name: XYZ
    Email-ID: [email protected]
    Dear XYZ,
    You have Rs....... as outstanding. Please clear all dues by ..(date).
    Thankyou,
    asdf.
    Please advice how to accomplish this. Send a sample source code if possible.
    Regards,
    Alok.

    Below you can find the sample code for sending the report as email.
    Do use this as cross reference..
    DATA: reclist      LIKE somlreci1  OCCURS 0 WITH HEADER LINE,
            objpack      LIKE sopcklsti1 OCCURS  1 WITH HEADER LINE,
            objhead      LIKE solisti1   OCCURS  1 WITH HEADER LINE,
            objtxt       LIKE solisti1   OCCURS 10 WITH HEADER LINE,
            objhex       LIKE solix      OCCURS 10 WITH HEADER LINE,
            listobject   LIKE abaplist   OCCURS 0  WITH HEADER LINE,
            so_ali       LIKE soli       OCCURS 0  WITH HEADER LINE,
            list_index   LIKE  sy-lsind  VALUE 0,
            packing_list LIKE sopcklsti1,
            docdata      LIKE sodocchgi1,
            tab_lines    TYPE i,
            l_rqident    LIKE tsp01-rqident,
            att_type     LIKE soodk-objtp.
      objtxt[] = mail_text[].
      IF p_skip_attach IS INITIAL.      " INS SIR 3971 TODD
        SYSTEM-CALL LOAD LISTLEVEL-STACK INTO wrkstack.
        IF  wrkstack[] IS INITIAL.
          SKIP 2.
          WRITE: /30 text-001 COLOR 5.
        ENDIF.
      ENDIF.                                " INS SIR 3971 TODD
    Prepare Receipient List
      REFRESH:  reclist.
      LOOP AT rcpnt_userids.
        IF rcpnt_userids-l_adr_name NA '@'.
          reclist-receiver    = rcpnt_userids-usrnam.
          reclist-rec_type    = 'B'.
          reclist-express     = 'X'.
        ELSE.
          reclist-receiver    = rcpnt_userids-l_adr_name.
          reclist-rec_type    = 'U'.
          reclist-express     = 'X'.
        ENDIF.
        APPEND reclist.
        CLEAR reclist.
      ENDLOOP.
    Prepare Doc Data
      DESCRIBE TABLE objtxt LINES tab_lines.
      READ     TABLE objtxt INDEX tab_lines.
      docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
      docdata-obj_langu  = sy-langu.
      docdata-obj_name   = 'ABAP Listing'.
      docdata-obj_descr  = subject.
      docdata-sensitivty = 'O'.
    Prepare OBJPACK
      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.
      att_type = 'ALI'.
      DESCRIBE TABLE so_ali LINES tab_lines.
      READ     TABLE so_ali INDEX tab_lines.
      objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( so_ali ).
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 0.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = att_type.
      objpack-obj_name   = 'ATTACHMENT'.
      objpack-obj_descr  = subject.
      APPEND objpack.
    SAP supplied API function module to send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = docdata
          put_in_outbox              = 'X'
          commit_work                = 'X'     "used from rel. 6.10
        TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = so_ali
          contents_txt               = objtxt
          receivers                  = reclist
        EXCEPTIONS
          too_many_reclist           = 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 i398(00) WITH 'SAP Office API Error'
                              sy-subrc
      ENDIF.

  • Send the report output in Email in the case of  HR ABAP

    Hi
        how can i send the output of report in email when i am doin the HR ABAP report .
              This report will be sheduled to run automatically every day.
    If any body can help please send the answer.
    Thanks.

    hi,
    u have to use excel sheet attachment with mail.
    u can put internal table data into excel sheet...
    sample code...for attachment u have to use objbin..
    clear objbin.
    refresh objbin.
    t<b>his is heading purpose</b>
      CONCATENATE 'Name' 'PS No.'  'Grade' 'Location' 'OD' 'DOB'
        INTO objbin SEPARATED BY con_tab.
      CONCATENATE con_cret objbin INTO objbin.
      APPEND objbin.
    loop at it_email into wa_email.<<<<----intenal table
    this is actual data from internal table
      CONCATENATE
              wa_email-emp_ename
              wa_email-emp_pernr
              wa_email-persk
              loc
              wa_email-od
              wa_email-dob
          INTO objbin SEPARATED BY con_tab.
        CONCATENATE con_cret objbin INTO objbin.
        APPEND objbin.
        CLEAR objbin.
    reclist-receiver = email.
      reclist-rec_type = 'U'.
    reclist-receiver = 'TC12'.
    reclist-rec_type = 'B'.
      APPEND reclist.
    CLEAR objpack.
      att_type = 'XLS'.<<<<<--attachment type
      objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
      objpack-transf_bin = 'X'.
      objpack-head_start = 1.
      objpack-head_num   = 1.
      objpack-body_start = 1.
      objpack-body_num   = tab_lines.
      objpack-doc_type   = att_type.
      objpack-obj_name   = 'Attachment'.
      objpack-obj_descr  = 'Report.xls'.
      APPEND objpack.
    *Function module to send email with an attachment
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = docdata
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = objpack
          object_header              = objhead
          contents_bin               = objbin
          contents_txt               = objtxt
          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.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        MESSAGE s899(m3) WITH 'Mail sent successfully!'.
      ENDIF.
    i hope it will be useful,
    regards
    vivek

  • How to write the code to send the report output to the local file.

    dear all,
    how to write the code to send the report output to the local file.
    Thanks & Regards,
    Jyothi.

    Hi,
    Try this , it will display report and download the file as well. Just vhange the path and execute
    TYPE-POOLS : SLIS.
    DATA : IT_SCARR TYPE TABLE OF SCARR,
           IT_FCAT  TYPE SLIS_T_FIELDCAT_ALV.
    SELECT *
    FROM SCARR
    INTO TABLE IT_SCARR.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
    EXPORTING
    *   I_PROGRAM_NAME               =
    *   I_INTERNAL_TABNAME           =
        I_STRUCTURE_NAME             = 'SCARR'
    *   I_CLIENT_NEVER_DISPLAY       = 'X'
    *   I_INCLNAME                   =
    *   I_BYPASSING_BUFFER           =
    *   I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = IT_FCAT
    * EXCEPTIONS
    *   INCONSISTENT_INTERFACE       = 1
    *   PROGRAM_ERROR                = 2
    *   OTHERS                       = 3
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK              = ' '
    *   I_BYPASSING_BUFFER             =
    *   I_BUFFER_ACTIVE                = ' '
    *   I_CALLBACK_PROGRAM             = ' '
    *   I_CALLBACK_PF_STATUS_SET       = ' '
    *   I_CALLBACK_USER_COMMAND        = ' '
    *   I_STRUCTURE_NAME               =
    *   IS_LAYOUT                      =
       IT_FIELDCAT                    = IT_FCAT
    *   IT_EXCLUDING                   =
    *   IT_SPECIAL_GROUPS              =
    *   IT_SORT                        =
    *   IT_FILTER                      =
    *   IS_SEL_HIDE                    =
    *   I_DEFAULT                      = 'X'
    *   I_SAVE                         = ' '
    *   IS_VARIANT                     =
    *   IT_EVENTS                      =
    *   IT_EVENT_EXIT                  =
    *   IS_PRINT                       =
    *   IS_REPREP_ID                   =
    *   I_SCREEN_START_COLUMN          = 0
    *   I_SCREEN_START_LINE            = 0
    *   I_SCREEN_END_COLUMN            = 0
    *   I_SCREEN_END_LINE              = 0
    *   IR_SALV_LIST_ADAPTER           =
    *   IT_EXCEPT_QINFO                =
    *   I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER        =
    *   ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = IT_SCARR
    * EXCEPTIONS
    *   PROGRAM_ERROR                  = 1
    *   OTHERS                         = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
      EXPORTING
    *    BIN_FILESIZE              =
        FILENAME                  = 'C:\Documents and Settings\sap\Desktop\Hi.xls' " Change path
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      CHANGING
        DATA_TAB                  = IT_SCARR
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>EXECUTE
      EXPORTING
        DOCUMENT               = 'C:\Documents and Settings\sap\Desktop\Hi.xls' "Change path
    *    APPLICATION            =
    *    PARAMETER              =
    *    DEFAULT_DIRECTORY      =
    *    MAXIMIZED              =
    *    MINIMIZED              =
    *    SYNCHRONOUS            =
    *    OPERATION              = 'OPEN'
    *  EXCEPTIONS
    *    CNTL_ERROR             = 1
    *    ERROR_NO_GUI           = 2
    *    BAD_PARAMETER          = 3
    *    FILE_NOT_FOUND         = 4
    *    PATH_NOT_FOUND         = 5
    *    FILE_EXTENSION_UNKNOWN = 6
    *    ERROR_EXECUTE_FAILED   = 7
    *    SYNCHRONOUS_FAILED     = 8
    *    NOT_SUPPORTED_BY_GUI   = 9
    *    others                 = 10
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • How to send the report output to the application server in a excel file

    Hello,
    how to send the report output to the application server in a excel file.
    and the report runs in background.
    Thanks in advance.
    Sundeep

    Dear Sundeep.
    I'm providing you with the following piece of code ... Its working fine for me ... hopefully it suits your requirement ...
    D A T A D E C L A R A T I O N *
    TYPES: BEGIN OF TY_EXCEL,
    CELL_01(80) TYPE C,
    CELL_02(80) TYPE C,
    CELL_03(80) TYPE C,
    CELL_04(80) TYPE C,
    CELL_05(80) TYPE C,
    CELL_06(80) TYPE C,
    CELL_07(80) TYPE C,
    CELL_08(80) TYPE C,
    CELL_09(80) TYPE C,
    CELL_10(80) TYPE C,
    END OF TY_EXCEL.
    DATA: IT_EXCEL TYPE STANDARD TABLE OF TY_EXCEL,
    WA_EXCEL TYPE TY_EXCEL..
    E V E N T : S T A R T - O F - S E L E C T I O N *
    START-OF-SELECTION.
    Here you populate the Internal Table.
    Display - Top of the Page.
    PERFORM DISPLAY_TOP_OF_PAGE.
    E V E N T : E N D - O F - S E L E C T I O N *
    END-OF-SELECTION.
    SET PF-STATUS 'GUI_STATUS'.
    E V E N T : A T U S E R - C O M M AN D *
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'EXPORT'.
    Exporting the report data to Excel.
    PERFORM EXPORT_TO_EXCEL.
    ENDCASE.
    *& Form DISPLAY_TOP_OF_PAGE
    text
    --> p1 text
    <-- p2 text
    FORM DISPLAY_TOP_OF_PAGE .
    SKIP.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'O R I C A'
    CENTERED COLOR 1,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE,
    /05 SY-VLINE,
    06(127) 'Shift Asset Depreciation - Period/Year-wise Report.'
    CENTERED COLOR 4 INTENSIFIED OFF,
    132 SY-VLINE.
    WRITE: /05(128) SY-ULINE.
    E X C E L O P E R A T I O N
    CLEAR: IT_EXCEL[],
    WA_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    WA_EXCEL-cell_02 = ' XYZ Ltd. '.
    APPEND WA_EXCEL TO IT_EXCEL.
    CLEAR: WA_EXCEL.
    WA_EXCEL-cell_02 = 'Shift Asset Depreciation - Period/Year-wise Report.'.
    APPEND WA_EXCEL TO IT_EXCEL.
    PERFORM APPEND_BLANK_LINE USING 1.
    ENDFORM. " DISPLAY_TOP_OF_PAGE
    *& Form APPEND_BLANK_LINE
    text
    -->P_1 text
    FORM APPEND_BLANK_LINE USING P_LINE TYPE I.
    DO P_LINE TIMES.
    CLEAR: WA_EXCEL.
    APPEND WA_EXCEL TO IT_EXCEL.
    enddo.
    ENDFORM.
    *& Form EXPORT_TO_EXCEL
    text
    --> p1 text
    <-- p2 text
    FORM EXPORT_TO_EXCEL .
    DATA: L_FILE_NAME(60) TYPE C.
    Create a file name
    CONCATENATE 'C:\' 'Shift_Depn_' SY-DATUM6(2) '.' SY-DATUM4(2)
    '.' SY-DATUM+0(4) INTO L_FILE_NAME.
    Pass the internal table (it_excel which is already populated )
    to the function module for excel download.
    CALL FUNCTION 'WS_EXCEL'
    exporting
    filename = L_FILE_NAME
    tables
    data = IT_EXCEL
    exceptions
    unknown_error = 1
    others = 2.
    if sy-subrc <> 0.
    message e001(ymm) with 'Error in exporting to Excel.'.
    endif.
    ENDFORM. " EXPORT_TO_EXCEL
    *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    When you click the button - Export to Excel ( GUI-Status) you'll be able to export the content of the Internal Table to an Excel file .......
    Regards,
    Abir
    Don't forget to award Points *

  • Need to Print the Report Output

    Hi,
    I want to print the report output. How to install a printer in Oracle Appls. If i give number of copies 1 or morethan 1(from SRS Window)...the report is completed-warning. pls advice
    Thanks in advance.

    Hi,
    I changed the printer to Epson LQ2170 and Epson LQ2180 but since I don't know the initialization and reset parameter (already search for the manual but couldn't find it, downloaded from Epson's website but couldn't find it either) so I register it with LQ1070. I'd tested to print the reports directly from Reports Builder 6i and it printed just as I wanted to but when I tried to print from oracle apps it only printed up to about 3/4 width of the paper. I tried to change the report's height and width, paper size, orientation but no luck. What should I do? Thanks

  • Transfer Report output to email body

    Hi,
    I have some problems in transferring my report output into the email body. As i know, there is a function to transfer the report output to the email as attachment. But for my current requirement, i would like to transfer the report output the the email body. My current report output is in table form and as i transfer the report output to the email body, it should be the same format as the report output in the email body. I am using write function to show this report. May i know how should i go about solving this problem?
    Appreciate if you could help.
    Thanks.
    Regards,
    Rachel

    Hi Rachel,
    Check this sample program which uses the standard FM for sending email .
    zdp_solisti1 is a structure having fields naming LINE of type LCHR and its length being 2500.
    *******Email declarations
    data : gv_delimit TYPE c,
    lv_lncnt1(5) TYPE c,
    tempread(10) TYPE c VALUE 0,
    objpack TYPE sopcklsti1 OCCURS 0 WITH HEADER LINE,
    objhead TYPE zdp_solisti1 OCCURS 1 WITH HEADER LINE,
    objbin TYPE soli OCCURS 0 WITH HEADER LINE,
    objtxt TYPE zdp_solisti1 OCCURS 0 WITH HEADER LINE,
    reclist TYPE somlreci1 OCCURS 0 WITH HEADER LINE,
    doc_chng LIKE sodocchgi1,
    tab_lines LIKE sy-tabix.
    CLEAR GV_DELIMIT.
    GV_DELIMIT = CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
    TEMPREAD = LV_LNCNT1.
    REFRESH OBJTXT.
    CONCATENATE 'The no. of error records are : ' TEMPREAD
    INTO OBJTXT-LINE.
    APPEND OBJTXT.
    CLEAR OBJPACK. REFRESH OBJPACK.
    CONCATENATE C_CODE
    C_CMMT
    C_COMMENT1
    INTO OBJTXT-LINE SEPARATED BY GV_DELIMIT.
    APPEND OBJTXT.
    LOOP AT IT_DATA INTO WA_DATA.
    CONCATENATE WA_DATA-ZCODE
    WA_DATA-ZCOMMENT
    WA_DATA-ZREASON
    INTO OBJTXT-LINE SEPARATED BY GV_DELIMIT.
    APPEND OBJTXT.
    ENDLOOP.
    CLEAR GV_DELIMIT.
    CLEAR OBJPACK. REFRESH OBJPACK.
    CLEAR DOC_CHNG.
    TAB_LINES = 0.
    OBJHEAD = REJFILE. APPEND OBJHEAD.
    DESCRIBE TABLE OBJTXT LINES TAB_LINES.
    READ TABLE OBJTXT INDEX TAB_LINES.
    DOC_CHNG-OBJ_NAME = REJFILE.
    MOVE TEXT-006 TO
    DOC_CHNG-OBJ_DESCR.
    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 = 1. " 3.
    OBJPACK-DOC_TYPE = 'RAW'.
    APPEND OBJPACK.
    FOR ASCII TO BINARY OBJECT FUNCTION
    TOTLINEXFER = 0.
    TOTXFER = 0.
    BINMAXLEN = 255.
    REFRESH OBJBIN.
    LV_CR = CL_ABAP_CHAR_UTILITIES=>CR_LF.
    TGTMAXLEN = BINMAXLEN.
    TGTLEN = 0.
    LOOP AT OBJTXT FROM 2.
    IF NOT OBJTXT-LINE CP 'The no. of records are '." AND
    CONCATENATE OBJTXT-LINE LV_CR INTO BUFFER.
    SRCOBJLEN = STRLEN( BUFFER ).
    SRCOBJPTR = 0.
    WHILE SRCOBJLEN > 0 .
    XFERLEN = TGTMAXLEN - TGTLEN.
    IF XFERLEN > SRCOBJLEN.
    XFERLEN = SRCOBJLEN.
    MOVE BUFFERSRCOBJPTR TO OBJBIN-LINETGTLEN.
    TGTLEN = TGTLEN + SRCOBJLEN.
    SRCOBJLEN = 0.
    CLEAR BUFFER.
    ELSE.
    MOVE BUFFER+SRCOBJPTR(XFERLEN) TO
    OBJBIN-LINE+TGTLEN(XFERLEN).
    APPEND OBJBIN.
    CLEAR OBJBIN-LINE.
    TGTLEN = 0.
    SRCOBJLEN = SRCOBJLEN - XFERLEN.
    SRCOBJPTR = SRCOBJPTR + XFERLEN.
    TOTLINEXFER = TOTLINEXFER + 1.
    ENDIF.
    TOTXFER = TOTXFER + XFERLEN.
    ENDWHILE.
    ENDIF.
    ENDLOOP.
    IF TGTLEN > 0.
    APPEND OBJBIN.
    TOTLINEXFER = TOTLINEXFER + 1.
    ENDIF.
    CLEAR OBJPACK-TRANSF_BIN.
    OBJPACK-TRANSF_BIN = 'X'.
    OBJPACK-HEAD_START = 1.
    OBJPACK-HEAD_NUM = 0.
    OBJPACK-BODY_START = 1.
    OBJPACK-BODY_NUM = TOTLINEXFER.
    OBJPACK-DOC_TYPE = 'XLS'.
    OBJPACK-OBJ_NAME = REJFILE.
    OBJPACK-OBJ_DESCR = 'Rejected Entries File'.
    OBJPACK-DOC_SIZE = TOTXFER.
    APPEND OBJPACK.
    REFRESH RECLIST.
    MAIL1 = 'xxxxxxxx' " Email Address
    RECLIST-RECEIVER = MAIL1.
    RECLIST-REC_TYPE = 'U'.
    APPEND RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    DOCUMENT_DATA = DOC_CHNG
    PUT_IN_OUTBOX = 'X'
    COMMIT_WORK = 'X'
    TABLES
    PACKING_LIST = OBJPACK
    OBJECT_HEADER = OBJHEAD
    CONTENTS_BIN = OBJBIN
    CONTENTS_TXT = OBJTXT
    RECEIVERS = RECLIST.
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
           As per your requirement, In  the above program you need to fill OBJTXT with the contents of your internal table as per your requirement. This is the data which is displayed as the body of your mail.
    Hope this is helpful to you. If you need further information, revert back.
    Reward all the helpful answers.
    Regards
    Nagaraj T

  • Need to download the report output list to a Excel file.

    Hi,
       I have a report output list, which i need to download to an Excel file, could any body suggest how to do this with out writing the ws_download.
    My report data is coming from two internal tables, one internal table for left side reprt display and another internal table for right side report display, both the internal tables having the same fields.
    suggest me how to combine these two internal table data in one internal table.
    2 internal table structure is same but data is different.
    Sunil

    Hi,
    in the o/p list use the below menu path.
    LIST>SAVE/SEND>FILE,
    then a pop-up window with different formates will appear,then choose u r required format.
    Thanks,
    Anji

  • Display Report Output in Email Body (EBS).

    Hi,
    I was wondering if it is possible to display the output of a BIP report within the body of an email using bursting instead of having the report in an attachment.
    Thanks in advance
    Carl

    Hi Carl,
    I use the API directly:
         // Parse RTF og lav XSL
                   ByteArrayOutputStream xsl;
                   xsl = new ByteArrayOutputStream(1024);
                   RTFProcessor rtfProc = new RTFProcessor(rtfPath);
                   rtfProc.setOutput(xsl);
                   rtfProc.process();
                   xsl.flush();
                   xsl.close();
                   // Lave rtf udfra xml og det nye xsl
                   BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(output));
                   ByteArrayInputStream xmlStream = new ByteArrayInputStream(xml);
                   FOProcessor foProc = new FOProcessor();
                   foProc.setTemplate(new ByteArrayInputStream(xsl.toByteArray()));
                   foProc.setData(xmlStream);
                   foProc.setOutput(bout);
                   foProc.setOutputFormat(FOProcessor.FORMAT_RTF);
                   foProc.generate();
                   bout.flush();
                   bout.close();
    I can change the output format to HTML (haven't tried) -> and then send the email with contenttype html. Can I email directly via the api ?

  • Publishing crystal report output in Email body

    Hi,
    I had a very basic requirement to broadcast/publish the output of crystal report in the email body of mail recepient. I have not found any options for this ans im able only to generate pdf outputs.
    Thanks,
    Ariel.

    Hi,
    I also have the same requirement cn any one help me out with this.
    Regards,
    Pratik

  • Password reset function--Need to send the sap userid+NT email address

    Hi experts,
       We would like to implement the password reset function in one of our systems. we have the existing code, which accepts <b>sap-user id</b> , resets the password and sends email to the user. Now the loophole is anyone can reset the password of others if he/she knows the <b>sapuserid</b>.
    1. Is there any solution for this.
    2. Can we pass the (sapid+NT email address) to the SAP system, when we enter <b>sap id</b> and press submit in the UI.
    Please advice...
    Thanks,
    Harini

    Hi chimsik K:
    Excellent, SAP 4.7E is built on WAS6.20 you can enable the SMTP plug-in; follow the steps mentioned in the following OSS Note 455140, let me know if you have additional questions.
    https://websmp210.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700011536752001
    Regards,
    Federico

  • Call CR XI from C++ routine, need to run the report without display and send the resulting report to the printer

    <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"></tr><tr><td height="1" style="font-size: 1pt"></td></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>I initiate a CR XI from a C++ routine using  ShellExecute command, the report file is opened and the C++ program continues to execute, this is working fine, now I need the following two things:</p><p>1. When the report is invoked I would like it to run and print the result either to a printer or to a file.</p><p>2. I need to send the report parameters since it will not prompt for it if it runs automatically.</p><p>Thanks in advance for your help.</p></td></tr><tr></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>&#160;</p></td></tr></tbody></table></blockquote></blockquote>

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • Central Management server - executed a query but how to send the query output in the form of mail?

    Hi All,
    i have used CMS in SQL 2008 R2. i have added couple of servers in its group. i have executed a query & i need to send the query output in the form of email.
    basically query is checking the rows count from couple of user tables in servers.
    issue here is how to copy the data that is used by CMS? i need to work on automate the rows count in difft user table in db servers
    could you please suggest how can i achieve this?

    Copy to what?
    SELECT COUNT(*) FROM sys.objects
    Running the above statement returns two columns (server name and count)
    All the servers SS2005  and onwards , then use
    EXEC msdb.dbo.sp_send_dbmail 
         @profile_name = 'name', 
         @recipients = '[email protected]', 
         @query = 'SELECT COUNT(*) FROM sys.objects', 
         @subject = 'Count rows'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Send report output via email as zipped attachment

    Is it possible for the report output to be zipped before being attached to an email when running on a windows reports_server? On unix we theoretically have the ability to modify the mail.sh shell script that performs the mail operation for reports.

    Hi Richard
    This is a Reports 9i solution.
    You may create a batch file that runs the report, compresses the file and invokes, say, a Java application that mails the given .zip file.
    More "advanced" options would be:
    You may create a pluggable destination that captures report output. Next, your code does the compresses the output file and mails it.
    A simpler solution would be to run two reports. First, that creates the reports output file. In its AFTER_REPORT trigger, call Java method (thru. Java Importer), that picks up the output file and compresses it. Second, that uses XML distribution feature of Reports 9i and mails the .zip file as a file attachment using appropriate construct.
    Regard
    Sripathy

Maybe you are looking for

  • IPhone 3GS 32gb - iOS4.0.1 - iTunes 9.2.1.4 - Sync issues / Set up as new

    Hello. I've had issues with my iPhone ever since I upgraded from iOS 3.1.3 to iOS 4 (and subsequently iOS4.0.1), to be more precise, my issues are with syncing my phone. When I upgraded to iOS4, I had an error and had to restore my iPhone while upgra

  • Display in browser blob files (.doc, .pdf...) stored in the Database

    Hi, I want to display blob file from de DB to the browser, but when I click on the link of the document I want to open, nothing append. If I check the length of the file it is correct. I tried to write it in a directory to see what appends. I can onl

  • Replace document name

    How could I replace a open document name with a new name? I have a script that creates the new name but I can't figure out how to send the new name back to photoshop replacing the open document name. Here is the current script: layerN = activeDocumen

  • Auto startup script in 10g rel2

    According to the Grid Control release 2 documentation, the out-of-the-box installation is supposed to configure and startup the database, OMS, listener and agent automatically when the server reboots. This is not the case when I reboot my server (RHE

  • Need help for "Numeric field Overflow" error in excel 2003.

    Hello, a friend of mine have a problem exporting Business Objects 5.1.8 to excel 2003 (turning on windows 2000). Each time she want to export her reporting in excel format (.XLS), she obtain a "Numeric field Overflow (3349)" error. So, she export in