How to send report output to  two  detinations at a time from command line?

Hi ,
how to send my report to two detinations at a time from command line i.e FILE and Mail ?
i created batchfile in that i mentioned one line for file(DESTYPE=FILE) perpose and another line for mail perpose(DESTYPE=Mail).i don't want to mention to lines.
i want to send my report out put two destinations at a time insted of running two times.
thx in advance.....
raghu

hello,
did you try to use distribution for that ? check out the reports distribution facilities available in 6i.
regards,
the oracle reports team

Similar Messages

  • Very urjent how to send report output in mail

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

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

  • How to send report output from SUBMIT statement

    Hi,
    I need to develop one report whcih can be use to send any report output in mail as attachment in txt of execl format. So i will be using SUBMIT statement to execute the report in my new report and i need to convert the reportout in txt or excel format and need to send as attachment in mail. This new report can be use to execute any report which may have ALV GRid, Normal outout screen. So what could be the best way to develop this kind of report.
    Br,
    Piyush

    >
    piyush mathur wrote:
    > Hi Suhas,
    >
    > LIST_TO_ASCI will give me data in lines. and its difficult to separate the columns in another internal table for attachment file. As this report is going to use to send any report output so i can not fixed the delimiter. So i am looking some function which can split the data in columns when I am reading from List.
    > Br,
    > Piyush
    No need to seperate nothing additionally, this will come automatically in the attached file. Draft below
    DATA list_tab TYPE TABLE OF abaplist.
    SUBMIT your_report EXPORTING LIST TO MEMORY
                  AND RETURN.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject = list_tab
      EXCEPTIONS
        not_found  = 1
        OTHERS     = 2.
    DATA string_tab TYPE list_string_table.
    "use table type appropriate for attchement
    DATA ascii_tab TYPE soli_tab.
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
       listasci                 = ascii_tab
       listobject               = list_tab.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename = 'C:\test.txt'
        filetype = 'ASC'
      TABLES
        data_tab = ascii_tab.
    DATA go_email_doc TYPE REF TO cl_document_bcs.
    go_email_doc = cl_document_bcs=>create_document(
                                          i_type = 'TXT'
    go_email_doc->add_attachment( i_attachment_type = 'TXT'
                                  i_attachment_subject = 'My Attachment'
                                  i_att_content_text = ascii_tab ).
    Regards
    Marcin

  • How to send report output to printer

    Hi,
    In Oracle applications one of my AR report has printer parameter
    when user submitting the request he needs to choose the printer name for that
    parameter then this report output needs to go to automatically to that printer after completion of report.
    Do I need to change report system parameter values for this?
    Could you help me in this?
    Thanks in advance.

    Hi,
    If you use ORARRP, you reports will automatically go to the default printers.
    Regards,
    Soumyajit

  • Parental Control, how can I know the remaining time (from command line)

    Hello,
    I did setup Parental Control on my kid's iMac.
    I configured a "Weekday Time Limit". On their desktop, they can get the information about the remaining time by clicking simply on the clock.
    I would like to know how I can get this information while I am connected via ssh
    Thank you in advance.

    Apparently all the Parental Controls preferences files are stored here:
    /Library » Application Support » Apple » ParentalControls » Users » username
    I imagine somewhere in there it keeps a record of the remaining time etc.  You'll need root authority to access Users onwards.

  • Why not all jars picked up by ojdeloy and how to generate build.xml from command line and not JDEV GUI - quick question

    Hi All
    We have 11.1.1.7 ojdeploy to compile our app.
    We notice in the log that not all jars are used in classpath arguments when we explicitly set them up for compilation.
    eg:
      <path id="classpath">
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/commons-el.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/jsp-el-api.jar"/>
        <pathelement location="../../Oracle/Middleware/oracle_common/modules/oracle.adf.share_11.1.1/oracle-el.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/a.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/b.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/c.jar"/>
        <pathelement location="interface/public_html/WEB-INF/lib/d.jar"/>
    </path>
    Log Output -
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/bin/javac
    [ora:ojdeploy] -g
      [ora:ojdeploy] -Xlint:all
      [ora:ojdeploy] -Xlint:-cast
    [ora:ojdeploy] -Xlint:-empty
      [ora:ojdeploy] -Xlint:-fallthrough
      [ora:ojdeploy] -Xlint:-path
      [ora:ojdeploy] -Xlint:-serial
      [ora:ojdeploy] -Xlint:-unchecked
      [ora:ojdeploy] -source 1.6
      [ora:ojdeploy] -target 1.6
      [ora:ojdeploy] -verbose
      [ora:ojdeploy] -encoding Cp1252
      [ora:ojdeploy] -classpath
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/resources.jar:
    [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/rt.jar:
      [ora:ojdeploy] /path/to/Oracle/Middleware/jdk160_24/jre/lib/jsse.jar:
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/a.jar"/>
        [ora:ojdeploy] /path/to/interface/public_html/WEB-INF/lib/c.jar"/>
    1- Is it because it depends on how jpr or jws are configured ?
    2- How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?

    The first  warning is happening because you're stating drivers for input devices without need. You haven't disabled hotplug so evdev gets used instead of kbd. This is normal, and you should change the driver line from kbd to evdev so that whatever options (if any) you've specified for the keyboard get parsed.
    The second warning is about you not installing acpid.
    The third I have no idea about, but look at the synaptics wiki. None of the (WW) are related to your video card.
    And every card that has 2 or more output ports show up as "two cards". You also don't need to specify the pci port in xorg.conf. edit: this is the general case with laptops, might be different for desktops.
    When I do lspci -v I get:
    00:02.0 VGA compatible controller: Intel Corporation Mobile 945GME Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0, IRQ 16
    Memory at dfe80000 (32-bit, non-prefetchable) [size=512K]
    I/O ports at d0f0 [size=8]
    Memory at c0000000 (32-bit, prefetchable) [size=256M]
    Memory at dff00000 (32-bit, non-prefetchable) [size=256K]
    Expansion ROM at <unassigned> [disabled]
    Capabilities: <access denied>
    00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
    Subsystem: Micro-Star International Co., Ltd. Device 0110
    Flags: bus master, fast devsel, latency 0
    Memory at dfe00000 (32-bit, non-prefetchable) [size=512K]
    Capabilities: <access denied>
    And it doesn't matter if it errs in trying to sli up with it self. That's just not a possibility.
    Last edited by gog (2009-10-15 23:59:49)

  • How to automatically generate a build file of the application from command-line

    Hi All
    How can we automatically generate a build file of the application from command-line (as opposed to using Jdev IDE to click to generate a build.xml) ?
    Thanks

    User, which jdev version do you use?
    I don't think you can do this. You can only create an ant build.xml from the project inside jdev.
    You can use ojdeploy to build the project.  This is the only method which will also make the necessary changes to the descriptors.
    Timo

  • How to send the output to PDF format in reports 6i?

    Hi,
    How to send the output to PDF format in reports 6i? I given Mode = BITMAP.
    DESTYPE = File, DESFORMAT = PDF, DESNAME = C:\x.pdf.
    Report is running fine. But PDF file not generated. I don't know what i missed. Any one can help this?
    Thanks
    Kavitha

    Hello,
    Do you get this problem only for DESFORMAT=PDF ?
    Test with :
    DESFORMAT = RTF, DESNAME = C:\x.rtf
    or
    DESFORMAT = HTMLCSS, DESNAME = C:\x.html
    does it work ?
    Check if DESNAME is modified in the reports itself.
    Regards

  • How To Send ALV Output By Email.

    Hi !
    I wanted to ask how to send ALV output of report by email.
    I know that i have to use the fms :
    1. 'WWW_HTML_FROM_LISTOBJECT' - in order to convert the table to HTML.
    2. 'SO_NEW_DOCUMENT_ATT_SEND_API1' - in order to  send the HTML file.
    My problem is how to convert the ALV screen output to the apropriate table parameter of the function 'WWW_HTML_FROM_LISTOBJECT' to listobject type ?
    thanks
    moshe

    Hi look at the following program.
    *& Report  ZSM17_EMAIL1
    REPORT  zsm17_email.
    tables : mara.
    data: begin of it_mara occurs 0,
          matnr like  mara-matnr,
          ernam like mara-ernam,
          mtart like mara-mtart,
          matkl like mara-matkl,
          end of it_mara.
    data: begin of it_final occurs 0,
          v_string(255),
          end of it_final.
    *DATA: objpack LIKE sopcklsti1 OCCURS  2 WITH HEADER LINE,
         objhead LIKE solisti1   OCCURS  1 WITH HEADER LINE,
         objbin  LIKE solisti1   OCCURS 10 WITH HEADER LINE,
         objtxt  LIKE solisti1   OCCURS 10 WITH HEADER LINE,
         reclist LIKE somlreci1  OCCURS  5 WITH HEADER LINE.
    DATA: objpack LIKE sopcklsti1 OCCURS  0 with header line,
          objhead LIKE solisti1   OCCURS  0 WITH HEADER LINE,
          objbin  LIKE solisti1   OCCURS 0 WITH HEADER LINE,
          objtxt  LIKE solisti1   OCCURS 0 WITH HEADER LINE,
          reclist LIKE somlreci1  OCCURS  0 WITH HEADER LINE.
    data: wa_objbin like line of objbin.
    DATA: doc_chng LIKE sodocchgi1.
    DATA: tab_lines LIKE sy-tabix.
    select-options s_matnr for mara-matnr.
    *--- Selecting data from mara
    select matnr
           ernam
           mtart
           matkl
           into table it_mara
           from mara
           where matnr in s_matnr.
    if sy-subrc ne 0.
    write:/ 'no data found'.
      exit.
    else.
    loop at it_mara.
       concatenate it_mara-matnr
                   it_mara-ernam
                   it_mara-mtart
                   it_mara-matkl
         into it_final-v_string separated by '~'.
        append it_final.
        clear it_final.
    endloop.
    endif.
    Creating the document to be sent
    doc_chng-obj_name = 'TEST'.   "name of the document
    title of document or subject
    doc_chng-obj_descr = 'Test Email program'.
    body of the mail
    objtxt = 'A test report'.
    APPEND objtxt.
    objtxt = 'is enclosed as an attachment.'.
    APPEND objtxt.
    *clear objtxt.
    DESCRIBE TABLE objtxt LINES tab_lines.
    Size of SAPoffice Document (for API1)
    doc_chng-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 0.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'RAW'.
    *objpack-obj_name   = 'ATTACHMENT'.
    *objpack-obj_descr = 'Test Email Program'.
    *objpack-doc_size   = tab_lines * 255.
    APPEND objpack..
    *--- Populating the records in the attachment
    data: w_str(255) TYPE c.
    loop at it_final into wa_objbin.
    append wa_objbin to objbin.
    append objbin.
    clear wa_objbin.
    endloop.
    DESCRIBE TABLE objbin LINES tab_lines.
    tab_lines = tab_lines + 1.
    objhead = 'test_report.txt'.
    append objhead.
    Creating the entry for the compressed attachment
    objpack-transf_bin = 'X'.
    objpack-head_start = 1.
    objpack-head_num   = 1.
    objpack-body_start = 1.
    objpack-body_num   = tab_lines.
    objpack-doc_type   = 'txt'.
    objpack-obj_name   = 'txt'.
    objpack-obj_descr = 'Test Email Program'.
    objpack-doc_size   = tab_lines * 255.
    APPEND objpack..
    *write:/ 'object text', objtxt.
    Entering names in the distribution list
    reclist-receiver = '[email protected]'.
    reclist-rec_type = 'U'.
    APPEND reclist.
    Sending the document
    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
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        operation_no_authorization = 4
        OTHERS                     = 99.
    CASE sy-subrc.
      WHEN 0.
        WRITE: / 'Result of the send process:'.
        LOOP AT reclist.
          WRITE:  reclist-receiver(48), ':'.
          IF reclist-retrn_code = 0.
            WRITE 'sent successfully'.
          ELSE.
            WRITE 'not sent'.
          ENDIF.
        ENDLOOP.
       loop at objbin.
         write: objbin-line.
       endloop.
      WHEN 1.
        WRITE: / 'no authorization to send to the specified number of' .
        "'recipients!'.
      WHEN 2.
        WRITE: / 'document could not be sent to any of the recipients!'.
      WHEN 4.
        WRITE: / 'no authorization to send !'.
      WHEN OTHERS.
        WRITE: / 'error occurred during sending !'.
    ENDCASE.

  • Send Report output as attachment in excel

    Hi All,
    I am scheduling background Job for Auto mail of standard SAP report. I am able to send the details in html format, please guide me how to send report details in excel format.
    I have already check SCN but unable to find exact solution for same.
    Regards
    Rashid

    Rashid,
    When u Go  SM37 Follow This Step Then U Get The Data In Excel Format.
    Follow step
    Select Spool Option
    Then U got the screen
    Select the type option then u got screen.
    In This Screen U Find the option save in Local File  then get the option.
    When U Select the Spreadsheet Option You can Able to save your data in excel format.
    Hope its help full for you

  • How to  send ALV output data into Excel sheet format via Mail to the user?

    Hi friends,
    I have a doubt ie,
    How to  send ALV output data into Excel sheet format via Mail to the user?
    regards
    Moosa

    Hi,
    Provide the output internal table to the objbin in the below FM
    Send Message
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
           EXPORTING
                document_data              = i_docdata
                put_in_outbox              = c_x
           TABLES
                packing_list               = i_objpack
                object_header              = i_objhead
                contents_bin               = i_objbin
                contents_txt               = i_objtxt
                receivers                  = i_reclist
    and specify the document type
      i_objpack-doc_type   = 'XLS'.
    and try.
    Regards,
    Nandha

  • How to send SMARTFORMS output as attachment through?

    how to send SMARTFORMS output as attachment through e-mail?
    after executing SMARTFORMS how to send that output via e-mail.
    Help me.
    thanks
    surya.
    Moderator Message: Please search for available information first
    Edited by: kishan P on Nov 7, 2010 7:19 PM

    hi Vinod,
    Can you please tell me how you have zipped the file.
    I am having a text file in application server. I need to zip that file. Then the middleware moves it to Legacy system.
    I used the following code. With this I am having the data in Binary format which my midleware cannot understand.
    What I need on the whole is just to reduce the size of the file.
    form ZIP_FILE .
    DATA: lt_data TYPE TABLE OF x255,
          lt_textdata TYPE TABLE OF x255.
    DATA: ls_data LIKE LINE OF lt_data.
    DATA: lv_dsn1(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEX.TXT'.
    DATA: lv_dsn3(100) VALUE '/ECD/120/GIS/FTP/IB/DNBPAYDEXZIP.zip'.
    *DATA: lv_dsn3(100) VALUE '/interfaces/SM5/test.zip'. " Contains sample1.xls and sample2.xls
    DATA: lv_file_length TYPE i.
    DATA: lv_content TYPE xstring.
    DATA: lo_zip TYPE REF TO cl_abap_zip.
    CREATE OBJECT lo_zip.
    Read the data as a string
    clear lv_content .
    OPEN DATASET lv_dsn1 FOR INPUT IN BINARY MODE.
    READ DATASET lv_dsn1 INTO lv_content .
    CLOSE DATASET lv_dsn1.
    lo_zip->add( name = 'sample.TXT' content = lv_content ).
    lv_content = lo_zip->save( ).
    *clear lv_content .
    Conver the xstring content to binary
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
    EXPORTING
    buffer = lv_content
    IMPORTING
    output_length = lv_file_length
    TABLES
    binary_tab = lt_data.
    OPEN DATASET lv_dsn3 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    LOOP AT lt_textdata INTO ls_data.
    TRANSFER ls_data TO lv_dsn3.
    ENDLOOP.
    CLOSE DATASET lv_dsn3.
    IF sy-subrc EQ '0'.
        MESSAGE s999(zfi_ap_gl) WITH text-t10.
      ENDIF.
    Can you please help.
    Thanks Aravind

  • How to send the output of one step as input to next step

    Hello All,
                   I have a question that how to send the output of the first step as the input to the next step.
     for e.g
                  consider a test sequence as below,
      1.battery ON.
      2. read Voltage
      3. Check battery voltage.
     as initially the battery gets ON when ever the test starts. in the second step it reads the voltage. let us assume that the voltage is 11.5V,
    in the third step we r checking/validating that battery voltage in the range 11V to 12 V. . I mean if the vloltage value is  less than 11V or greater than 12V te test has to FAIL.
     so in order to check that voltage we need to send the voltage read from the second step.
    so how can I send the voltage read from the second step to the third step so that I can check the battery voltage test.
    kindly suggest me this using LabVIEW/Test stand.

    Hi,
    Why do you need the third step, if the second step is a Numeric Limit Test step type, you can setup the limits of this step for your required limits of 11V and 12V. Your result is returned from your VI to Step.Results.Numeric which will be evaluated in the Status Expression giving you a Pass / Fail status.
    Look at the example TestStand\examples\demo\..\Computer Motherboard Test\computer.seq
    But to answer your reoriginal question, some additional information is required.
    What are your inputs and outputs assigned to in TestStand, do you use the Step properties, Locals, FileGlobals?
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Re : how to print report output in DOT MATRIX printer

    Hai
           how to print report output in DOT MATRIX printer.
    Thanks
    mani

    Check this
    [http://help.sap.com/saphelp_nw04/helpdata/en/90/78f078030211d399b90000e83dd9fc/frameset.htm]
    also check the SAP Note 129581

  • How to export report output into excel.

    Hi all
    how to export report output into excel sheet can any on give me answer step by step please as soon as possible
    kk

    Hi Prashanth,
    If you are executing Query from WAD  ---> Right click on Table (only on Characteristics Data)  --> Enhanced Menu ---> Export as --> CSV file or MS Excel
    assign points if this helps,
    Thanks,
    Sudhakar

Maybe you are looking for