RSNAST00 creating spool-id

Hi guys,
If I execute the program RSNAST00 for the first time with invoice number, appl type, msg type, medium.... it perfectly works and creates a spool-id.  
However if i execute second time with same invoice number, it's not generating the new invoice number.
Could anyone help me with this.

Hello,
I face the same problem, the solution that I'm testing is call the external routine einzelnachricht from rsnast00( it don't check the field VSTAT, so you can print and reprint, the standard use the same routine in the FM J_1BNFE_CALL_RSNAST00 ) :
PERFORM einzelnachricht IN PROGRAM rsnast00 USING sy-subrc
Informing previosuly the structure NAST declared as TABLES, you can use the FM RV_MESSAGE_READ to inform the NAST structure, when the external routine is executed a new spool is created, then I update the NAST register using the FM RV_MESSAGE_UPDATE changing the field DSUF2 with the new spool request, like "abap consultnat" said you can find it using the FM RSPO_FIND_SPOOL_REQUESTS. I update the DSUF2 because if I want to create a new spool for each execution, if I don't change the DSUF2 each execution for the same message is collected in the same last spool.
I hope this is helps and I'm open to discuss this solution too
Luis
Edited by: Luis pérez on Jul 14, 2011 9:33 AM

Similar Messages

  • How to create spool in an online report

    Hi All,
    I have a requirement where the ALV report output has customers and details related to it.For example My report output has three customers(with a check box against it) and each customer has 5 line items.The user will select first and the last customer and press a push button provided.Once he clicks this push button, I should get the customers which are selected by the users and the line items related to this customers.I am able to capture all this.Now the real problem here is that I have to create a pdf document for each customer along with line items and send it as an email.In effect, in this scenario I have to create two pdf documents since the user has selected two customers on the output screen and send it to the email of that particular customer.Is there any FM available to create spool in the background for each of these customers(along with line items data) and make use of this spool number to generate a pdf document using CONVERT_ABAPSPOOLJOB_2_PDF.Once I get this I can send the email.
    Please help!
    Thanks in advance
    Sandeep

    The following steps shows how to download the output data in to PDF.
    1.Provide Spool Parameters using following function module 'GET_PRINT_PARAMETERS'.
    --This function module will provide the print parameters for creating the output in the spool; the required parameters are passed to the ‘OUT_PARAMETERS’ import parameter.
    2.Submit the report to generate the output in the spool.
    SUBMIT (sy-repid) TO SAP-SPOOL WITHOUT SPOOL DYNPRO
                         SPOOL PARAMETERS wa_mstr_print_parms
                         WITH SELECTION-TABLE  i_int_tab
                         AND RETURN.
    --Submit the report to generate the output in the spool as i_int_table is an internal table with structure RSPARAMS. As variant allows you to set the names and contents of the parameter and selection options dynamically at runtime, we need to use the function module RS_REFRESH_FROM_SELECTOPTIONS to read the contents of the parameters and selection options of the current program into an internal table i_int_table with the structure RSPARAMS and pass that internal table in above manner.
    3.To Find the spool number from the table TSP01
    Data: l_rq2name LIKE tsp01-rq2name.
    *Concatenate the report and User name as per the value available in the table   
    TSP01.
      CONCATENATE f_repid+0(9)
                  f_uname+0(3)
        INTO l_rq2name.
    *Fetch the most recent spool from the TSP01 table
      SELECT * FROM tsp01 WHERE  rq2name = l_rq2name
      ORDER BY rqcretime DESCENDING.
        l_rqident = tsp01-rqident.
        EXIT.
      ENDSELECT.
    4.Convert Spool to PDF using the FM : CONVERT_ABAPSPOOLJOB_2_PDF.
    5.Download to local file by using the FM : DOWNLOAD
    This function module returns an internal table data_tab contains the PDF formatted output.
    Using above points your can create the output in the PDF from there you can send the email.
    Hope your reqirement can met using the above five points.
    Reward points please
    Thanks,
    Ravi Kanth

  • Create spool in a program and read spool in same program

    hi all,
    i have a requirement like i have to create a spool in a program and should read that spool and send a email in same program.
    i m done with creating spool and sending email but the problem is when i execute a program the spool is created only after total program execution, is there a way to create a compleate spool before finishing the report execution.
    thanks,

    Solution:
    call function 'GET_PRINT_PARAMETERS'
          exporting
            destination    = 'LP01'
            copies         = count
            list_name      = 'ZTEST'
            list_text      = 'ZTESTSPOOL'
            immediately    = ' '
            release        = 'X'
            new_list_id    = 'X'
            expiration     = days
            line_size      = 90
            line_count     = 65
            layout         = 'X_PAPER'
            sap_cover_page = 'X'
            receiver       = 'SAP*'
            department     = 'System'
            no_dialog      = 'X'
          importing
            out_parameters = params
            valid          = valid.
        new-page print on parameters params no dialog.
    write : hi this is the test for spool.
    new-page print off.
        commit work.
    write : / sy-spono.   "system variable for spool no
    solved thanks
    anupama.

  • Create Spool from Internal table & converrt the spool to PDF

    Hi All,
    My requirement is take data from a table and find amount specific to each Vendors . So I took all the data into ITAB and do all the calculation. Later after calculation I have to create a spool from this ITAB and this spool have to convert to PDF. Later this PDF have to seend via email.
    To convert the internal table to Spool , I used
    LOOP AT t_summ INTO wa_summ.
        w-amount = wa_summ-remittanceamount.
        CONCATENATE wa_summ-vendorcode
                    wa_summ-controlnum
                    w-amount INTO wa_textdata SEPARATED BY space.
        APPEND wa_textdata TO t_textdata.
      ENDLOOP.
      DESCRIBE TABLE t_textdata .
      w-file_length = syst-tfill * 1022.
      l_doctype = 'LIST'.
      l_layout = 'X_POSTSCRIPT'.
      CONCATENATE ' Listbill Summary Report for' syst-datum INTO
                          l_title SEPARATED BY space.
      l_receiver = syst-uname.
    * Create Spool
      CALL FUNCTION 'RSPO_SR_OPEN'
       EXPORTING
          dest                   = 'LOCL'
    *   LDEST                  =
          layout                 = l_layout
          name                   = 'SUMREP'
    *   SUFFIX1                =
    *   SUFFIX2                =
       copies                 = '1'
    *   PRIO                   =
    *      immediate_print        = ' '
    *   AUTO_DELETE            =
          titleline              = l_title
          receiver               = syst-uname           "
    *      division               = l_pri_params-prabt " abteilung
    *      authority              = l_pri_params-prber           "
    *   POSNAME                =
    *   ACTTIME                =
    *   LIFETIME               = '8'
    *   APPEND                 =
    *   COVERPAGE              =
    *   CODEPAGE               =
          doctype                = l_doctype
    *   ARCHMODE               =
    *   ARCHPARAMS             =
    *   TELELAND               =
    *   TELENUM                =
    *   TELENUME               =
         IMPORTING
          handle                 = l_spool_handle
          spoolid                = w-spoolid
    EXCEPTIONS
       device_missing         = 1
       name_twice             = 2
       no_such_device         = 3
       operation_failed       = 4
       OTHERS                 = 5
                .                                            "#EC DOM_EQUAL
      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 'SLVC_C1022_TO_C255'
        EXPORTING
          i_file_length = w-file_length
        TABLES
          it_c1022      = t_textdata
          et_c255       = lt_spool.
      l_length = w-file_length.
      LOOP AT lt_spool INTO ls_spool.
        l_length = l_length - 255.
        IF ( l_length > 0 ).
          l_line_length = 255.
        ELSE.
          l_line_length = l_length + 255.
        ENDIF.
    *   Write contents to spool
        CALL FUNCTION 'RSPO_SR_WRITE'
          EXPORTING
            handle = l_spool_handle
            text   = ls_spool
            length = l_line_length.
      ENDLOOP.
    * Close Spool
      CALL FUNCTION 'RSPO_SR_CLOSE'
        EXPORTING
          handle                 = l_spool_handle
         pages                  = 1
      FINAL                  = 'X'
       EXCEPTIONS
         handle_not_valid       = 1
         operation_failed       = 2
         OTHERS                 = 3
    By this I can see the spool with data in SP02.
    Then to conver to PDF, I used
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
        EXPORTING
          src_spoolid                    = w-spoolid
          no_dialog                      = 'X'
          DST_DEVICE                     = 'LOCL'
    *      PDF_DESTINATION                =
        IMPORTING
    *      PDF_BYTECOUNT                  =
    *      PDF_SPOOLID                    =
          list_pagecount                 = list_pagecount
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
       TABLES
         pdf                            = t_pdf
       EXCEPTIONS
         err_no_abap_spooljob           = 1
         err_no_spooljob                = 2
         err_no_permission              = 3
         err_conv_not_possible          = 4
         err_bad_destdevice             = 5
         user_cancelled                 = 6
         err_spoolerror                 = 7
         err_temseerror                 = 8
         err_btcjob_open_failed         = 9
         err_btcjob_submit_failed       = 10
         err_btcjob_close_failed        = 11
         OTHERS                         = 12
      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 'GUI_DOWNLOAD'
        EXPORTING
    *   BIN_FILESIZE                    =
          filename                        = 'D:\t\t.pdf'
         filetype                        = 'BIN'
        TABLES
          data_tab                        = t_pdf
    *   FIELDNAMES                      =
       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
         OTHERS                          = 22
    But later when I go and open the PDF, I am getting an error saying'Page cannot be open because it dont have any pages'
    Please help me
    Regards,
    Nikhil

    Hi Nikhil,
    <li>If you are still not able to find out the problem. You can an alternative way , which is used for the same purpose.
    <li>Try this way. It creates spool and and same CONVERT_ABAPSPOOLJOB_2_PDF fm is used to convert spool to PDF. It works. Test this test program.
       REPORT ztest_notepad.
       DATA:g_val         TYPE c,
            w_pripar      TYPE pri_params,
            w_arcpar      TYPE arc_params,
            i_pdf         TYPE TABLE OF tline,
            spoolid       LIKE tsp01-rqident,
            l_no_of_bytes TYPE i,
            l_pdf_spoolid LIKE tsp01-rqident,
            l_jobname     LIKE tbtcjob-jobname,
            l_jobcount    LIKE tbtcjob-jobcount.
       DATA:it_t001 TYPE TABLE OF t001 WITH HEADER LINE.
       START-OF-SELECTION.
         SELECT * FROM t001 INTO TABLE it_t001.
         "Read, determine, change spool print parameters and archive parameters
         CALL FUNCTION 'GET_PRINT_PARAMETERS'
           EXPORTING
             in_archive_parameters  = w_arcpar
             in_parameters          = w_pripar
             layout                 = 'X_65_132'
             line_count             = 65
             line_size              = 132
             no_dialog              = 'X'
           IMPORTING
             out_archive_parameters = w_arcpar
             out_parameters         = w_pripar
             valid                  = g_val.
         IF g_val  NE space AND sy-subrc = 0.
           w_pripar-prrel = space.
           w_pripar-primm = space.
           NEW-PAGE PRINT ON  NEW-SECTION PARAMETERS w_pripar ARCHIVE PARAMETERS w_arcpar NO DIALOG.
         ENDIF.
         LOOP AT it_t001.
           WRITE:/ it_t001.
         ENDLOOP.
         NEW-PAGE PRINT OFF.
         CALL FUNCTION 'ABAP4_COMMIT_WORK'.
         spoolid = sy-spono.
         CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
           EXPORTING
             src_spoolid   = spoolid
             no_dialog     = ' '
           IMPORTING
             pdf_bytecount = l_no_of_bytes
             pdf_spoolid   = l_pdf_spoolid
             btc_jobname   = l_jobname
             btc_jobcount  = l_jobcount
           TABLES
             pdf           = i_pdf.
         CALL FUNCTION 'GUI_DOWNLOAD'
           EXPORTING
             filename = 'C:\temp\test.pdf'
             filetype = 'BIN'
           TABLES
             data_tab = i_pdf.
    Thanks
    Venkat.

  • How to create Spool through ABAP program

    How to create spool request for Smartforms through program. So I can go in TCODE SP01 and see the output of my smartforms.

    Include the below code in ur program .......
      DATA: PRINT_PARAMETERS TYPE PRI_PARAMS,
            VALID_FLAG       TYPE C LENGTH 1.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
      IMMEDIATELY = 'X' "C_IMMEDIATELY
    *LAYOUT = 'Z_48_144'
    *LINE_COUNT = '48'
      LINE_SIZE = '255'
    *NEW_LIST_ID = C_NEW_LIST_ID
      NO_DIALOG = 'X'
      RELEASE = 'X'
      IMPORTING
      OUT_PARAMETERS = PRINT_PARAMETERS
      VALID = VALID_FLAG
      EXCEPTIONS
      ARCHIVE_INFO_NOT_FOUND = 1
      INVALID_PRINT_PARAMS = 2
      INVALID_ARCHIVE_PARAMS = 3
      OTHERS = 4 .
      G_PDEST = PRINT_PARAMETERS-PDEST.
      NEW-PAGE PRINT ON PARAMETERS PRINT_PARAMETERS
                        NO DIALOG.
    List of write statements to be output.......
    NEW-PAGE PRINT OFF.
    Reward if useful..............

  • Creating spool file for  Mass printing of smartforms

    Hi all
    My requirement is Mass printing of Development Plans,
    In this case is i need to select all the smartforms depending upon the selection screen data.& i need to pass all the smartforms to newly created spool file..
    how should I use TSP01 & Function Module 'GET_PRINT_PARAMETERS' for this smartform spool.
    so can any body explain me in detail..
    How to create spool ID, ?
    how to create spool file in this case..??
    How to pass smartform data to that new spool file../??
    Any sample codes for this…./??
    Thanx in advance,
    Regards,
    Kalam A.

    Check the links -
    Re: How to create a spool?
    How to create a spool request
    Regards,
    Amit
    Reward all helpful replies.

  • Submit statemet not creating spool in back ground

    Hi,
    My program works perfectly fine(creates spool) when I execute in foreground. But it doesn't create the spool when I execute in back ground. Pls help...
            SUBMIT rkaep000
                   WITH p_tcode = 'KOB2'
                   WITH aufnr   IN r_aufnr
                   WITH r_budat IN r_date
                   WITH p_disvar = '/SCORP 1404'
                   TO SAP-SPOOL SPOOL PARAMETERS params
                   WITHOUT SPOOL DYNPRO
                   AND RETURN .

    Hi Chesat bs,
    check demo program DEMO_LIST_SUBMIT_TO_SPOOL.
    Hope this helps.
    Thanks
    Lakshman

  • Creating Spool from function module

    Hi friends,
    I want to create a spool from my function module. I dont knw it is possible or not. Currently I am creating spool by submitting another report from my function module and exporting the values calculated in memory ID and importing in report which is not  a good practise, kindly suggest some other way.
    Thanks,
    Brijesh

    No. Spool is not possible from Function Module. You have to use that FM from one report/program.
    Thanks
    Subhankar

  • How to create spool for RFC

    How to create spool in a RFC? I have the data in an internal table in the RFC, How to send this data to a spool.

    hello,
    i'm facing at the same probelm, do you solved it ?
    tks,
    Roberto.

  • Pop problem while creating spool request in reuse_alv_grid_display

    Hi Experts,
    I am trying to create a spool request of alv
    and problem is that i do not want pop-up window for asking output devices,
    actually i am calling reuse alv in loop and following steps i have done:
    w_print-print = 'X'.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          I_BYPASSING_BUFFER = 'X'
          I_CALLBACK_PROGRAM = SY-REPID
          IT_FIELDCAT         = FIELDCAT[]
          I_DEFAULT           = 'X'
          I_SAVE                = 'X'
          is_print                 = w_print
        TABLES
          T_OUTTAB           = T_FINAL
        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.
    Please give the solution.
    Thanks
    Pankaj

    Hi,
    Use FM GET_PRINT_PARAMETERS ,  and  use command NEW-PAGE PRINT ON PARAMETERS <wa_params> NO DIALOG. before calling the alv FM.
    ls_print-print = 'X'.
    DATA: lwa_params TYPE pri_params,
          lv_valid TYPE c.
    CLEAR: lwa_params, lv_valid.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
      EXPORTING
        in_parameters          = lwa_params
        layout                 = 'X_65_132'
        line_count             = 65
        line_size              = 132
        no_dialog              = 'X'
      IMPORTING
        out_parameters         = lwa_params
        valid                  = lv_valid
      EXCEPTIONS
        archive_info_not_found = 1
        invalid_print_params   = 2
        invalid_archive_params = 3
        OTHERS                 = 4.
    MOVE-CORRESPONDING lwa_params TO ls_print-print_ctrl-pri_params.
    ls_print-print_ctrl-pri_params-pdest = 'LP01'. " your printr device
    NEW-PAGE PRINT ON PARAMETERS lwa_params NO DIALOG.
    then call FM CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'.
    this will work.
    refer link [ALV - print - create spool request;
    Regards,
    Ravi.

  • FM "open form  ; how to craete create SPOOL REQUEST

    Hi.
    I have a Z program n layout . We have used a FM "open form."
    But when I run, i dont get spool      
    In this case I want to create SPOOL REQUEST whenever I run program.Can anyone
    suggest what fields I need to mark in ITCPO and NAST or more than these.

    Hi,
    Check this link :
    http://www.thespot4sap.com/articles/SAPscript_example_code.asp
    Regards
    Appana

  • ALV - print - create spool request

    Hi all,
    We have made SAP Query (The majority and 'was written in ABAP code), a report using ALV grid (function 'REUSE_ALV_GRID_DISPLAY'). There is a 'Print' button on the grid. If the user presses this button the system will send a screen where the user can choose print parameters (name of printer, printing, direct or not, etc..) If the user presses 'Continue' a spool request is then created.
    But the users do not want to see the screen parameters.
    After pressing the button 'Print' on the grid, the spool request should be immediately created using the parameters seted in the ABAP program, the same program that creates ALV.
    Any idea how to do this?
    Thanks in advance

    Hi,
    Please refer to the link to add button in the ALV tool bar:
    [http://www.sapalv.net/2009/07/sap-alv-tutorial-4-%E2%80%93-add-button-to-toolbar/]
    For creating spool on click of this pushbutton you can use the following:
    * Set the Spool Parameters
      DATA: lwa_params TYPE pri_params,
            lv_valid TYPE c.
      CLEAR: lwa_params, lv_valid.
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          in_parameters          = lwa_params
          layout                 = 'X_65_132'
          line_count             = 65
          line_size              = 132
          no_dialog              = 'X'
        IMPORTING
          out_parameters         = lwa_params
          valid                  = lv_valid
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc EQ 0.
        NEW-PAGE PRINT ON PARAMETERS lwa_params NO DIALOG.
    *                  Write code for displaying the ALV here......
        NEW-PAGE PRINT OFF.
      ENDIF.
    Regards,
    Aparna Alashe.

  • Create Spool after ALV

    hi
       I need to create spool after ALV display. I used this fn module RSPO_OPEN_SPOOLREQUEST and pass only the destination parameter - 'LP01'.
       Spool erquest is created but no pages.. Pages 0.. Pls advise if there is any other parameter I need to fill for this fn module or any other way to achieve this.
    Thanks
    Arunachala.G

    Hello Arunachala,
    Please use the below steps :
    1.>
    form build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
    gd_layout-totals_text       = 'Totals'(201).
      gd_layout-box_fieldname     = 'CHK'.
      gd_layout-box_tabname       = 'IT_SPOOL'.
    gd_layout-totals_only        = 'X'.
    gd_layout-f2code            = 'DISP'.  "Sets fcode for when double
                                            "click(press f2)
    gd_layout-zebra             = 'X'.
    gd_layout-group_change_edit = 'X'.
    gd_layout-header_text       = 'helllllo'.
    endform.
    2.>   call function 'REUSE_ALV_GRID_DISPLAY'
           exporting
                i_interface_check        = ' '
                i_callback_program      = gd_repid
                i_callback_pf_status_set = 'SET_PF_STATUS'
               i_callback_top_of_page   = ''
                i_callback_user_command = 'USER_COMMAND'
               i_grid_title           = outtext
                is_layout               = gd_layout
                it_fieldcat             = fieldcatalog[]
               it_special_groups       =
               IT_EVENTS                =
                i_save                  = 'X'
               is_variant              =
           tables
                 t_outtab                = it_spool[].
    3. >Function :RSPO_OUTPUT_SPOOL_REQUEST
    exporting
             spool_request_id          = ls_spool_id-id.
    NB:   data : ls_spool_id type sp01r_id,
    Please try to do like this...
    Any problem you have then please ask me...and tell me your task in details...and program also...what you have done..
    Regards,
    sujeet

  • Creating spool before displaying output

    Hi,
    I want to create spool while executing the program in online ( NOT IN BACKGROUND OR BACTCH JOB) and before displaying out put ( list ).
    Means before writing or displaying the output from final internal table. I want create a spool for final internal table.
    Please provide sample code to create spool for normal report online report ( not background )
    we required created spool number also
    Thanks,
    Raju

    Hi Raju,
    Use this sample code to solve your problem.
    TYPE-POOLS: slis.
    TYPES: BEGIN OF str_mara,
            matnr TYPE mara-matnr,
            ersda TYPE mara-ersda,
            ernam TYPE mara-ernam,
            laeda TYPE mara-laeda,
            aenam TYPE mara-aenam,
            vpsta TYPE mara-vpsta,
      END OF str_mara.
    DATA: i_mat TYPE TABLE OF str_mara,
          wa_mat LIKE LINE OF i_mat.
    DATA:params LIKE pri_params.
    DATA: days(1) TYPE n VALUE 2,
          valid TYPE c.
    DATA: obj TYPE REF TO cl_salv_table.
    SELECT matnr
           ersda
           ernam
           laeda
           aenam
           vpsta
       UP TO 10 ROWS FROM mara INTO CORRESPONDING FIELDS OF TABLE i_mat.
    TRY.
        CALL METHOD cl_salv_table=>factory
          IMPORTING
            r_salv_table = obj
          CHANGING
            t_table      = i_mat.
      CATCH cx_salv_msg .
    ENDTRY.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
         destination                    = 'QAS'
       list_name                      = 'ZTEST_VERTEX'
       list_text                      = 'TEST'
       no_dialog                      = 'X'
       immediately                    = ' '
       expiration                     = days
    IMPORTING
      OUT_ARCHIVE_PARAMETERS         =
      out_parameters                  = params
      valid                           = valid
      VALID_FOR_SPOOL_CREATION       =
    EXCEPTIONS
      archive_info_not_found         = 1
      invalid_print_params           = 2
      invalid_archive_params         = 3
      OTHERS                         = 4
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    TRY .
        NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
      CATCH cx_sy_nested_print_on .
    ENDTRY.
    CALL METHOD obj->display.
    NEW-PAGE PRINT OFF.
    Regards,
    Vijay

  • Can't create spool file

    Hi,
    I've problems in creating spool file. I've some PL-SQL scripts, running monthly with sqlplus on Windows 2000, that have always generated spool file using the statements "spool filename.log".
    Two days ago, I run this scripts and I noticed that they didn't create the log file, but nothing has been changed.
    I noticed that changing the script with "spool c:\filename.log" the spool file is correctly generated.
    I run the script using sqlplus user/pwd@db @c:\script.sql and in the body of the script there is:
    whenever oserror exit SQL.OSCODE rollback
    whenever sqlerror exit SQL.SQLCODE rollback
    spool faXXXXX_X.log
    Set autocommit off timing on echo on feedback on termout on serveroutput on
    set escape ^
    DECLARE
    Why "spool filename.log" suddenly stop to work? There is some enviroment variable who determine the default directory of spooled file?

    My PATH variable has a lot of directories, some of them are "C:\oracle\ora81\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\orant\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;"
    I make a "search" for the spooled file in all the directories of the hard disk; the problem is that the spooled file has not been created but the SQL script terminated succesfully. What's the possible reason?

Maybe you are looking for