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

Similar Messages

  • 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......

  • 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 *

  • Problems with sending the Job_ID with activity EMAIL from a processflow

    Hello everybody,
    i have a problem with a simple process flow.
    I want to send an EMail that contains in the MESSAGE_BODY the Job_ID from the started workflow. For that reason i wrote a function with a select statement that gives back the number.
    Code:
    l_owb_id VARCHAR2(20);
    BEGIN
    select to_char(top_level_execution_audit_id)
    into l_owb_id
    from ALL_RT_AUDIT_EXECUTIONS
    where task_name = 'XYZ'
    and created_on like sysdate;
    return (l_owb_id);
    END;
    The function works fine. So i placed it into my workflow. Now i wanted to bind the MESSAGE_BODY from the activity EMAIL with the parameter of the function. But when i click validate it shows following error:
    VLD-10042: Parameter MESSAGE_BODY of EMAIL is incorrectly bound. Output of cannot be converted into a constant value.
    VLD-10042: Activity MESSAGE_BODY of EMAIL is currently bound to parameter GET_OWB_ID of .Activities must be bound through an intermediate variable
    Can anyone help me how to fix that proplem. How can i send the Process ID per activity EMAIL in a Workflow. On the internet i didn't found anything helpful, so any help would be appreiciated.
    Kind regards,
    Daniel

    You need to create Variable and then bind the value from your function to that variable and than use that variable as parameter for email MESSAGE_BODY.
    So you will have:
    Variable: p_id
    Return parameter of your function will be bind to p_id and message_body of your email will be bind to p_id.

  • Error when sending report output to printer from Forms 10g

    Hi,
    I have a simple report that I am running from a form using run_report_object built-in. I can successfully send the report output to a file but when I send the report output to a printer my report is
    terminated with report status of 'TERMINATED_WITH_ERROR'. I am using the default forms service and reports server that comes with the forms builder. How do I specify the reports server to user my default network printer ?Following is the code that runs my report.
    Thanks,
    Anna
    PROCEDURE SEND_TO_PRINTER IS
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(50);
    rep_server system_variables.reports_server%type;
    alldone          exception;
    BEGIN
         select reports_server
         into rep_server
         from system_variables;
         if rep_server is null then
              msg_alert('Error getting the reports server name', 'I', FALSE);                
              raise alldone;
         end if;
         :ctrl.run_report_errors := 'N';                    
         repid := find_report_object('REP_OBJ1');
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,rep_server);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
         IF :ctrl.rg_print = 'P' THEN
              --Send the output to printer.
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt');
         ELSIF :ctrl.rg_print = 'R' THEN
              --Rich Text Format
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE);
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'rtf');
              SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,:ctrl.filename);
         END IF;
         v_rep := RUN_REPORT_OBJECT(repid);
         rep_status := REPORT_OBJECT_STATUS(v_rep);
         WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
         LOOP
              rep_status := report_object_status(v_rep);
         END LOOP;
         IF rep_status = 'FINISHED' THEN
              null;
         ELSE
              :ctrl.run_report_errors := 'Y';
              msg_alert('Error when running report.' || rep_status, 'I', FALSE);           
         END IF;
    EXCEPTION
         when no_data_found then
              msg_alert('Error getting the reports server name', 'I', FALSE);      
         when alldone then
              null;     
    END;

    If you use Windows the user that runs the reports server is usually LocalSystem. Check this in the Windows Services panel.
    LocalSystem has no printer access. To be able to print, you have to use a real domain user that has access to the printer. So, change the Log on properties in the Services panel.

  • When send the report directly to the printer from Oracle IDS 9i

    Hi.....
    I m using Oracle IDS 9i, Oracle AS 9i and Database 9i for my new project.But i m facing a problem when i m trying to show a report from oracle IDS 9i.When i send the report directly to the printer without showing it,then the printer connected to the application server is working.But the printer connected to with PC(From where a send the command) is not working but printer connected with AS is working,but not that one which one i m wanting.....Why this problem is happening?Can anyone help me?
    KSI

    Note:It is always better to have network based printers rather then PC shared printers. What that means is your printer is not connected to a PC. It has a direct connection to the network via NIC. You would then setup the printer on your AS in the printers setup. If the AS is rebooted you do not need to authenticate the printer shares again with a network based printer.
    If I understand you correctly, you have a printer connected to your AS(application server) and a printer connected to your PC. You can submit a report direct to the printer connected to the AS but cannot send a report direct to your printer connected to your PC.
    From the symptoms you described, the problem is usually associated with the AS not being able to see the printer shared on your PC. You either have the address to your printer address defined wrong or your AS is trying to direct a job to your printer but doesn't have rights to do it.
    First, Try to print a notepad job to your printer attached to your PC from the AS. This will tell you if you have access to do so or not.
    - If it can't, you need to figure out why? This has nothing to do with oracle.
    Second, thing to check is your Oracle "Report Queue Manager" on the AS. Make sure that you can submit a report manually from the Report Queue Manager. If it fails the "Report Queue Manager" will give you useful errors as to why it failed. This will help you isolate the problem.
    Third, Once you can submit a job from the reports queue manager manually to your shared printer you should be able to submit from your application direct. If it still does not work your address to the printer is incorrect. Try submitting manually through the reports queue manager again. When selecting printer you will be given a list of accessible printers from the AS. Select the one connected to your PC. Once selected the full network address will appear. Copy and use this as the printer location in your job submission through your application.
    That's it... Where using this right now and it works great. Hope this helps.
    Eric.

  • 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

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

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

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

  • Problem to send a report to an Email address

    Hi All,
    I am using 10g forms and reports.I want to send a report to an email address using web.show_document();
    code is:WEB.SHOW_DOCUMENT('http://localhost:post/reports/rwservlet?userid=ur/ps@db&report='report_name&destype=mail&desformat=RTF&from=[email protected]&desname=[email protected]&paramform=no&_blank') ;
    this code generates an error message:
    REP-50159: Executed successfully but there were some errors when distribute the output
    I already configure my rwbuilder.conf and report_server.conf file.
    Although I am able to send this mail from report builder from FILE->mail menu.
    plz help me ASAP.
    thanks in advance.
    Sanjit

    Ok, did you add your smtp server to your <reports>.conf file is located at the end of the file.
    Because if it has been working for other destype it's probably security smtp related.
    so check if the correct smtp server is written there and that you can access it too because otherwise it would be impossible to send e-mail, if you're not the e-mail admin contact him and ask hin if he sees an attempt to send on the smtp engine log for your from user
    Erwin

  • Report output as email

    Hi All,
    I need to send report output as email text. is anybody has done this sort of work or any function module for this.
    Please help if anyone knows it.
    Cheers,
    Lokesh

    Hi
      Check the code for similar requirement I was faced earlier.
    Type for binary attachment table.
      types: l_ty_tab_objbin type solisti1 occurs 0.
      data: l_objbin type l_ty_tab_objbin.
    Tables to hold PDF data
      data: t_doctab type docs occurs 0,
            t_line  type tline occurs 0.
      tables : soli.             "SAPoffice: line, length 255
      tables : zpsdsalrep.       "ZPSDSALREP
      data: l_email type soli-line.
      data: l_email1 type soli-line.
      data: l_adrnr like kna1-adrnr.
      data: l_objky type nast-objky.
      data: l_zzterrmg type zpsdsalrep-zzterrmg.
      data: l_zsupervisor type zpsdsalrep-zsupervisor.
      data: l_kunnr type kna1-kunnr.
      data: l_kunnr1 type vbak-kunnr.
      data: l_reclist like somlreci1 occurs 0 with header line.
      data: l_objtxt    like solisti1 occurs   0 with header line.
      data: l_objpack   like sopcklsti1 occurs 0 with header line.
      data: l_doc_chng  like sodocchgi1.
      data: l_objhead   like solisti1 occurs   0 with header line.
      data: l_tab_lines like sy-tabix.
      constants: k_true type boolean_flg value 'X'.
      data: l_mail type somlreci1-receiver.
      data: l_mail1 type somlreci1-receiver.
      data:
    l_l_mail2 TYPE somlreci1-receiver.
    l_l_mail type somlreci1-receiver.
      data: l_zzsalesrep type zpsdsalrep-zzsalesrep.
      data: l_recipents type somlreci1-receiver.
      constants: k_x(1) type c value 'X',
                 k_u(1) type c value 'U',
                 k_raw(3) type c value 'RAW'.
      call function 'CONVERT_OTF_2_PDF'
    EXPORTING
      USE_OTF_MC_CMD               = 'X'
      ARCHIVE_INDEX                =
    IMPORTING
      BIN_FILESIZE                 =
        tables
          otf                          = t_otfdata
          doctab_archive               = t_doctab
          lines                        = t_line
          exceptions
         err_conv_not_possible        = 1
         err_otf_mc_noendmarker       = 2
         others                       = 3.
      if sy-subrc <> 0.
        write: / 'error', sy-subrc.
      endif.
    ***/ Convert the PDF format to the table type required for the
    **attachment.
      call function 'QCE1_CONVERT'
        tables
          t_source_tab         = t_line
          t_target_tab         = l_objbin
        exceptions
          convert_not_possible = 1
          others               = 2.
      if sy-subrc <> 0.
        write: / 'error', sy-subrc.
      endif.
      select single kunnr from vbak into l_kunnr1
             where vbeln = nast-objky.
      select single adrnr from kna1 into l_adrnr
             where kunnr = l_kunnr1.
      check sy-subrc is initial.
      select single smtp_addr from adr6 into l_email
             where addrnumber = l_adrnr.
    SELECT SINGLE zzterrmg FROM zpsdsalrep INTO l_zzterrmg
            WHERE zzsalesrep = l_kunnr1.
    SELECT SINGLE zsupervisor FROM zpsdsalrep INTO l_zsupervisor
         WHERE  zzterrmg = l_zzterrmg.
    SELECT SINGLE kunnr FROM kna1 INTO l_kunnr
           WHERE sortl = l_zsupervisor.
    SELECT SINGLE zsupervisor FROM zpsdsalrep INTO l_zsupervisor
           WHERE  zzsalesrep = l_kunnr1.
    SELECT SINGLE zzsalesrep FROM zpsdsalrep INTO l_zzsalesrep
           WHERE zzterrmg = l_zsupervisor.
    SELECT SINGLE adrnr FROM kna1 INTO l_adrnr
              WHERE kunnr = l_zzsalesrep.
    CHECK sy-subrc IS INITIAL.
    SELECT SINGLE smtp_addr FROM adr6 INTO l_email1
            WHERE addrnumber = l_adrnr.
    SELECT SINGLE adrnr FROM kna1 INTO l_adrnr
            WHERE kunnr = l_kunnr.
    CHECK sy-subrc IS INITIAL.
    SELECT SINGLE smtp_addr FROM adr6 INTO l_email1
            WHERE addrnumber = l_adrnr.
      l_mail = l_email.
    l_mail1 = l_email1.
    l_l_mail2 = text-006.
      l_l_mail = text-007.
    Creation of the document to be sent
    File Name
      l_doc_chng-obj_name = 'SENDFILE'.
    Mail Subject
      concatenate text-001 nast-objky into l_doc_chng-obj_descr.
    l_doc_chng-obj_descr = text-001.
    Completing the recipient list
      l_reclist-receiver = l_mail.
      l_reclist-rec_type = k_u.
      append l_reclist.
    l_reclist-receiver = l_mail1.
    l_reclist-rec_type = 'U'.
    APPEND l_reclist.
      l_reclist-receiver = l_l_mail.
      l_reclist-rec_type = k_u.
      append l_reclist.
    l_reclist-receiver = l_l_mail2.
    l_reclist-rec_type = 'U'.
    APPEND l_reclist.
    Mail Contents
      l_objtxt = text-002.
      append l_objtxt.
      clear l_objtxt.     " put in a blank line
      append l_objtxt.
      data: l_subject type solisti1.
      concatenate text-003 '-' nast-objky into l_subject.
      l_objtxt = l_subject.
      append l_objtxt.
      l_objtxt = text-004 .
      append l_objtxt.
    Calculate email size in bytes
      describe table l_objtxt lines l_tab_lines.
      read table l_objtxt index l_tab_lines.
      l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + strlen( l_objtxt ).
    Creation of the entry for the compressed document
    for the email text
      clear l_objpack-transf_bin.
      l_objpack-head_start = 1.
      l_objpack-head_num = 0.
      l_objpack-body_start = 1.
      l_objpack-body_num = l_tab_lines.
      l_objpack-doc_type = k_raw.
      append l_objpack.
    Creation of the document attachment
    (Assume that the data in OBJBIN is in BMP format)
      describe table l_objbin lines l_tab_lines.
      l_objhead = text-001  .
      append l_objhead.
      clear l_objpack.
    **/ Creation of the entry for the compressed/attached document
      l_objpack-transf_bin = k_true.
      l_objpack-head_start = 1.
      l_objpack-head_num = 1.
      l_objpack-body_start = 1.
      l_objpack-body_num = l_tab_lines.
      l_objpack-doc_type = 'PDF'.
      l_objpack-obj_name = text-005.
      l_objpack-obj_descr = text-001.
      l_objpack-doc_size = l_tab_lines * 255.
      append l_objpack. "/ .
      delete  l_reclist where receiver = ''.
    Sending the document
      call function 'SO_NEW_DOCUMENT_ATT_SEND_API1' " IN UPDATE TASK "/ .
        exporting
          document_data              = l_doc_chng
          put_in_outbox              = k_x
        tables
          packing_list               = l_objpack
          object_header              = l_objhead
          contents_bin               = l_objbin
          contents_txt               = l_objtxt
          receivers                  = l_reclist
        exceptions
          too_many_receivers         = 1
          document_not_sent          = 2
          operation_no_authorization = 4
          others                     = 99.
      if sy-subrc <> 0.
        write: / 'unsuccessful', sy-subrc.
      else.
        concatenate l_mail ',' l_mail1 ',' l_l_mail into l_recipents.
        syst-msgid = '8I'.
        syst-msgno = '000'.
        syst-msgty = 'S'.
        syst-msgv1 = text-008.
        skip.
        syst-msgv2 = text-009.
        syst-msgv3 = l_recipents.
        clear:  syst-msgv4. "syst-msgv2, syst-msgv3,
        perform protocol_update.
        write:  / 'successful'.
      endif.
    **/Take_note it is a requirement to do a commit work for the
    email to go into transaction SOST.
    COMMIT WORK.   "/Take_note .
    if sy-subrc eq 0.
    endif.
    Regards,
    Sreeram

  • 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

  • Fax the report output

    Hi all,
    I want to fax the report output to vendors. I created a calssical report. I need to sane that to some vendors...Can anyone help me with that?
    Thanks,
    Pranav

    Hi Pranav,
    Did you get any break through in sending the fax. If so pls share the details as I am facing the similar problem. We have upgraded our system from 4.6C to ECC 6.0 and the fax functionality which we used in 4.6c is now not working in ECC 6.0 as the technology has changed from SAPCOM to SAPConnect.
    All the settings in SCOT for fax are correct. Now I am searching for any sample program which can send the Normal list output in the fax. I am tyring to use the fn module SO_NEW_DOCUMENT_ATT_SEND_API1 but lost in filling all the required parameters for FAX..
    Answers will be rewarded!!!
    Thanks,
    Sanjay.
    _Code used in 4.6C._
    Call magic C-routine to fax spool request
      MOVE:
       SY-SPONO          TO L_IDENT,
       'TF01'            TO TSP01-RQDEST,
       1                 TO TSP01-RQCOPIES,
       3                 TO TSP01-RQPRIO,
       SPACE             TO TSP01-RQTITLE,
       SY-UNAME          TO TSP01-RQRECEIVER,
       SPACE             TO TSP01-RQDIVISION,
       L_FAXNO           TO TSP01-RQTELENUME,
       0                 TO L_START,
       0                 TO L_END.
      CALL 'RSPOAEPJ'  ID 'ID' FIELD L_IDENT
        ID 'DEST'      FIELD TSP01-RQDEST
        ID 'COPY'      FIELD TSP01-RQCOPIES
        ID 'PRIO'      FIELD TSP01-RQPRIO
        ID 'TITLE'     FIELD TSP01-RQTITLE
        ID 'RECEIVER'  FIELD TSP01-RQRECEIVER
        ID 'DIVISION'  FIELD TSP01-RQDIVISION
        ID 'TELENUM'   FIELD TSP01-RQTELENUME
        ID 'STARTPAGE' FIELD L_START
        ID 'ENDPAGE'   FIELD L_END
        ID 'RC'        FIELD L_RC
        ID 'ERRMSG'    FIELD L_ERRMSG.

Maybe you are looking for