Old spool is appending

Hi,
when ever i run the script, it is generating output to spool. but every time when i run the script it is appending the old spool.
It is not generating the new spool request. we are working in ECC 6.0
Any clue?

Hi,
Do you have a z Print program for your script???
If yes.. Then found where are you calling OPEN_FORM ..
There is a Parameter in this form called OPTIONS ,, Pass here *TDNEWID = 'X' * .. It will always generate a new spool request for your form..
Code like below..
data : s_itcpo type itcpo.    
s_itcpo-tdimmed  = 'X'.
  s_itcpo-tddelete = 'X'.
  s_itcpo-tdnewid  = 'X'.
  s_itcpo-TDNEWID = 'X'   " here a new spool request parameter is set
*     Display one dialog for user. Then enable several SAP-Script
  call function 'OPEN_FORM'
    exporting
      device   = 'PRINTER'
      dialog   = 'X'
      language = sy-langu
      options  = s_itcpo ----- > here is the structure
    importing
      language = sy-langu
    exceptions
      canceled = 1
      device   = 2
      form     = 3
      options  = 4
      unclosed = 5
      others   = 6.
Edited by: Lokesh Tarey on Jul 16, 2010 12:16 PM

Similar Messages

  • Spool filename append

    Hey Everyone,
    I am using oracle version: 9.2
    I wanted to know if spool filename append command is available?
    I want to display the query results on an html page that has a calender i have created using javascript. And not to spool the output to a new html page but to an already existing one. how to do so?

    spool is a sqlplus command. Which means you can use a 10g or 11g client to query your 9iR2 database.

  • Old spool requests are not deleting

    Hello All,
    Old spool requests are not deleting automatically in production system,
    if we schedule the standard job sap_reorg_spool.
    any one please resolve this issue
    thanks in advance

    Hi,
    Please go through the below note,
    [1422843|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1422843]
    Thanks
    Hrishi

  • Displaying the latest spool for old spool

    Hi,
    I generated to 2 spool request. When i display the old spool request, it is displaying the latest spool request.
    Can anyone help me with this? are there any SAP notes for this problem?
    Thanks

    I cannot help you with this but I know who can. Ask your question under ABAP Printing, they helped me with questions about this printing details and spool jobs before. Otto

  • Spool with append

    Hi experts,
    Oracle version 10G
    Am trying to connect from my unix machine if am giving "sqlplus -V" it is showing me 9.2 version
    my question is if am useing spool with append as bellow
    SPOOL <path/filename.log APPEND
    select statements
    SPOOL OFF
    it is not creating any log file in said path why is it like this ? hwo can i get this Append featuer ? is this version issue?
    Many thanks,
    Kalinga

    Hi,
    Kalinga wrote:
    ... hwo can i get this Append featuer ? is this version issue?Yes, SPOOL ... APPEND was introduced in SQL*Plus 10.
    It doesn't matter what version of the database you have; SPOOL is a SQL*Plus feature.

  • How to retrive the old spool requests

    Hi team
    In one of our system we ran a job, the spool requests are created.
    When i tried to view it was deleted. Is there any way to see the old spool and retrive the old spool back.
    This is a critical issue, please help me out.
    Regards,

    Hai,
    It is not possible to retrive data after it has been deleted from the table.
    Deleted means by the housekeeping jobs. You will not find the entries in the table as a result you cannot query the table to get the results you needed.
    Restore means when a database is damaged it can be returned to a correct and consistent state with a restore procedure.
    In your case if you want the old spool request you can restore the backup of a particular date corresponding to the date of the spool request.
    http://help.sap.com/SAPHELP_NW70/helpdata/EN/f2/31ad56810c11d288ec0000e8200722/frameset.htm
    Regards,
    Yoganand.V

  • How I set the auto delete old spool request

    Hi
    I would like to know , how to auto delete old spool request. Have any option in SAP.
    I want spool requests on server for 3 days only.
    Pls suggest.
    Tapovardhan

    As a default background job SAP schedules<b> RSPO0041</b> program in background, this program's variant has the <b>Minimum age in days</b> value.
    Can you check with what variant this program is running. 
    This program needs to be scheduled daily with <b>Minimum age in days</b> field.
    Regds
    Manohar

  • Append one more page in old spool number

    Hi friend's,
    I'm having a script for pick list, now my problem is, if igive the production order for 2nd time, the first spool number has append one more page. what is the solution?
    Thanks in Advance.
    Vallamuthu.M

    Hi,
    I guess your application uses a Smartform or a Sapscript form to create spools.
    For sapscripts, when the application call the function module you can useparameters ITCPO-TDNEWID and ITCPO-TDFINAL. For smartforms when you call the function module of the Smartform, you can set  'OUTPUT_OPTIONS-TDDEST' and 'OUTPUT_OPTIONS-TDNEWID'.
    regards,
    Aidan

  • Old spool requests delete

    Hi all,
    still we are facing spool over flow issue, even though we installed kernel level-236/64bit.
    We had scheduled a batch job to convert spool request deletion date with the report-RSPO2010, and it is running fine.(it run daily before spool reorg job run).  SPOOL_REORG job also finishing with out errors but still spool numbers volume is very high.
    SAP_BASIS level is 18.
    Any idea to over come this issue. Please guide me.

    Hi Nani,
    Please refer to the following post:
    Re: Database error: TemSe->XRTAB(3)->1 for table TST01 key
    This over flow may occur due to lot of spool requests being generated as a result of certain background jobs or manual requests from users while generating some reports. During busy time of business this happens.
    To know which job is responsible to genereate more number of spool request please do following:
    T-Code: SM37
    Job name: "*"
    User name: "*"
    Select "FINISHED" check box.
    Job Start Condition:
    From date: Past 10 days to cureent day (date) and click execute button.
    In the resulting window within "Ln" column you will see a mat like symbol representing the job generated spools. Select that particualr job and right click and select "Spool List" which will display number of spools generated by the job. You can contact the owner of the job and communicate with him if the number is too big.
    Please let the community know if more information is required.
    Regards,
    Nani Chowdary.

  • How to find out which job delete old spool requests?

    Dear Experts,
    We have a problem with spool requests being deleted automatically, we've checked job RSPO1041 and made sure it was not scheduled to run, but somehow spool requests are gone. We also checked all the jobs on the day requests were deleted but nothing stands out. I would really appreciate it if any of you can help us find out which job is doing this or how to avoid requests being deleted.
    Thank you!
    Ling

    Hi,
    Please check the value of parameter 'rspo/req_lifetime' as it decides the lifetime of the spool requests which are generally stored in TemSe.Go through note 48400,this may help you understand how spool requests are stored and reorganized.
    Thanks

  • Append new records for a spool file

    Hello,
    I am running a query and sending the output to a spool file.
    The query never returns the same data because it is run every 2
    hours
    How can I make the spool to append the new records and not
    overwrite the old records?
    Thanks
    Carlos

    SPOOL.SPO[OL] [filename[.ext]|OFF|OUT]
    Oracle documentation provides no indication that any append
    functionality exists for the sql*plus command SPOOL.
    I can recommend two solutions:
    1. Spool to a temporary file in sql*plus, then perform a
    concatenation using the OS. Automate the process with a shell
    script (or batch file, as the case may be).
    2. Write the file using DBMS_OUTPUT.
    -Kevin

  • New spool number is not created .. appending to prevoius  spool

    Hi friends
    we have requirement to print smartform labels for each Delivery item.
    i created smartform and written code in User Exit..
    but spool is creating first time and next label onwards label is appending to the old spool instead of creating new spool( for the second label new spool is not created,its taking prevoius spool number , checked in debugg as well)
    Please help me..
    i have writeem code as follows:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = p_sf_name
    IMPORTING
    fm_name = fm_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    wa_outop-tdimmed = 'X'.
    wa_control_parameters-no_dialog = 'X'.
    wa_control_parameters-device = 'PRINTER'.
    wa_control_parameters-preview = ''.
    wa_control_parameters-langu = 'EN'.
    wa_outop-tdarmod = 1.
    wa_outop-tdimmed = 'X'.
    CALL FUNCTION fm_name
    EXPORTING
    output_options = wa_outop
    user_settings = space
    wa_label_data = wa_label
    control_parameters = wa_control_parameters
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    Thanks
    Ramesh

    Hi,
    You need to pass X to parameter OUTPUT_OPTIONS-TDNEWID
    Try like below:
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = p_sf_name
    IMPORTING
    fm_name = fm_name
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3.
    wa_outop-tdimmed = 'X'.
    wa_control_parameters-no_dialog = 'X'.
    wa_control_parameters-device = 'PRINTER'.
    wa_control_parameters-preview = ''.
    wa_control_parameters-langu = 'EN'.
    wa_outop-tdarmod = 1.
    wa_outop-tdimmed = 'X'.
    wa_output-TDNEWID = 'X' .            "ADD
    CALL FUNCTION fm_name
    EXPORTING
    output_options = wa_outop
    user_settings = space
    wa_label_data = wa_label
    control_parameters = wa_control_parameters
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    Regards,
    Himanshu

  • Append spool file

    Hi friends,
    i am using oracle 9.2.0.4.0. Totallly i have 9 instances (5 in windows 2000 and remaining in linux)... I need to take some reports from my all databases weekly basis... i dont have idea to append the results into spool file. Can you please give me the idea to create single output file instead of nine files? (Can i append the all the result into single file is any option?) please guide me...
    Regards,;
    Karthik

    Can this help for you ?
    Re: spool/save append?

  • Send spool by fax

    Hi all,
    I would send the spool of several reports via fax using SAP standard. I know there is a standard trx SCOT to check the fax/mail sent.
    My question is: what I have to customize to send spool via fax?
    Now, I'm sending fax in this way: I prepare a VBS file with the statments to send a fax and I execute this VBS using function module WS_EXECUTE. In this VBS file I indicate also the PDF file (produced by a SAP spool) to use in the fax.
    Many thanks.
    Luca

    check below code...
    How can you send a fax from within ABAP/4 programs? 
    The following program shows you how to send a fax from within ABAP/4. The report is delivered
    in the standard system and is used in Transaction SCOM for the function "Send test fax".
    Only the method via the call of SAPscript with DEVICE='TELEFAX', described below, ensures the
    generation of a correct transmission request, independent of the R/3 release and of the used
    fax server solution and its configuration.
    The regular printing (for example, with NEW-PAGE PRINT ON...) on an output device created in
    the spool administration of the device class 'Telefax' does generally not work!
    REPORT RSKSENDF MESSAGE-ID SK.
    Test report to send a test fax
    sends a fax to the number <TO_CNTRY>-<TO_NMBER>
    containing an automatically generated message text.
    TABLES: USR03.
    PARAMETERS: TO_CNTRY LIKE T005-LAND1 OBLIGATORY,
    TO_NMBER LIKE TSP01-RQTELENUM OBLIGATORY,
    FROM_USR(30) TYPE C DEFAULT SY-UNAME,
    TO_RECIP(30) TYPE C DEFAULT SY-UNAME.
    SAPscript content ITAB
    DATA: BEGIN OF TEST_DOC OCCURS 10.
    INCLUDE STRUCTURE TLINE.
    DATA: END OF TEST_DOC.
    SAPscript header struct
    DATA BEGIN OF HEADER.
    INCLUDE STRUCTURE THEAD.
    DATA END OF HEADER.
    INITIALIZATION.
    get county from user addres in usr03
    system->user profile->user address
    check if not empty
    SELECT SINGLE * FROM USR03 WHERE BNAME = SY-UNAME.
    IF SY-SUBRC = 0 AND USR03-LAND1 <> SPACE.
    TO_CNTRY = USR03-LAND1.
    ENDIF.
    START-OF-SELECTION.
    PERFORM FILL_UP_TEST_DOC.
    PERFORM SHOW_TEST_DOC.
    AT PF08.
    PERFORM SEND_FAX TABLES TEST_DOC USING TO_CNTRY
    TO_NMBER.
    AT SELECTION-SCREEN ON TO_NMBER.
    PERFORM CHECK_NUMBER USING TO_CNTRY TO_NMBER.
    *& Form CHECK_NUMBER
    FORM CHECK_NUMBER USING
    COUNTRY
    NUMBER.
    DATA: SERVICE LIKE TSKPA-SERVICE VALUE 'TELEFAX',
    LEN LIKE SY-FDPOS.
    FIELD-SYMBOLS <P>.
    windows GUI push the ? from mandatory input instead
    of overwriting it
    LEN = STRLEN( TO_NMBER ).
    IF LEN > 1.
    SUBTRACT 1 FROM LEN.
    ASSIGN TO_NMBER+LEN(1) TO <P>.
    IF <P> = '?'.
    <P> = SPACE.
    ENDIF.
    ENDIF.
    official check FM
    CALL FUNCTION 'TELECOMMUNICATION_NUMBER_CHECK'
    EXPORTING
    COUNTRY = COUNTRY
    NUMBER = NUMBER
    SERVICE = SERVICE.
    on old 21?/22? release you may have to handle the
    exception
    because the Function uses RAISE instead of
    MESSAGE... RAISING....
    ENDFORM. " CHECK_NUMBER
    *& Form FILL_UP_TEST_DOC
    fills test text in itab TEST_DOC *
    real life example needs to get real life data *
    FORM FILL_UP_TEST_DOC.
    DATA: DATUM(12) TYPE C,
    UZEIT(10) TYPE C.
    SAPscript initialization
    of course, you may want to set a few parameter
    (FORM,LAYOUT,....)
    CALL FUNCTION 'INIT_TEXT'
    EXPORTING
    ID = 'ST '
    LANGUAGE = SY-LANGU
    NAME = 'FOO-BAR'
    OBJECT = 'TEXT'
    IMPORTING
    HEADER = HEADER
    TABLES
    LINES = TEST_DOC
    EXCEPTIONS
    OTHERS = 1.
    IF SY-SUBRC <> 0.
    MESSAGE A400 WITH 'INIT_TEXT'.
    ENDIF.
    PERFORM ADD_EMPTY_LINE.
    WRITE: SY-DATUM TO DATUM.
    WRITE: SY-UZEIT TO UZEIT.
    PERFORM ADD_LINES USING 'This is test Telefax'(001)
    DATUM UZEIT.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'From: &'(002) FROM_USR SPACE.
    PERFORM ADD_LINES USING 'To: &'(003) TO_RECIP SPACE.
    PERFORM ADD_LINES USING 'Fax number: & &'(004)
    TO_CNTRY TO_NMBER.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'This is a test fax send by Report RSKSENDF'(005)
    SPACE SPACE.
    PERFORM ADD_LINES USING 'on SAP system & '(006)
    SY-SYSID SPACE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING
    'the quick brown fox jumps over the lazy dog.'(101)
    SPACE SAPCE.
    PERFORM ADD_LINES USING
    'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'(102)
    SPACE SAPCE.
    PERFORM ADD_EMPTY_LINE.
    PERFORM ADD_LINES USING 'End of test'(007) SPACE
    SPACE.
    ENDFORM. " FILL_UP_TEST_DOC
    *& Form ADD_LINES
    printf a line an appends it in test_doc *
    --> cformat format.
    --> p1 param1
    --> p2 param2
    FORM ADD_LINES USING CFORMAT P1 P2.
    TEST_DOC-TDFORMAT = '/'.
    TEST_DOC-TDLINE = CFORMAT.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P1 INTO TEST_DOC-TDLINE.
    IF TEST_DOC-TDLINE CA '&'.
    REPLACE '&' WITH P2 INTO TEST_DOC-TDLINE.
    ENDIF.
    ENDIF.
    APPEND TEST_DOC.
    ENDFORM. " ADD_LINES
    *& Form ADD_EMPTY_LINE
    appends an empty line to test_doc *
    FORM ADD_EMPTY_LINE.
    TEST_DOC-TDFORMAT = '/'.
    CLEAR TEST_DOC-TDLINE.
    APPEND TEST_DOC.
    ENDFORM. " ADD_EMPTY_LINE
    *& Form SHOW_TEST_DOC
    lists the test doc for aproval *
    *>>>> this is for fun only because PRINT_TEXT also
    offers a preview *
    FORM SHOW_TEST_DOC.
    FORMAT COLOR COL_BACKGROUND INTENSIFIED OFF.
    WRITE: / 'Test fax would look like this:'(020).
    ULINE.
    SKIP.
    LOOP AT TEST_DOC.
    IF TEST_DOC-TDLINE <> SPACE.
    WRITE:/ TEST_DOC-TDLINE.
    ELSE.
    SKIP.
    ENDIF.
    ENDLOOP.
    SKIP.
    ULINE.
    FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
    WRITE: 'Press PF8 to send it'(021).
    ENDFORM. " SHOW_TEST_DOC
    *& Form SEND_FAX
    send fax by calling SAPscript *
    Note: Instead of using PRINT_TEXT you may also *
    call OPEN_FORM / WRITE_FORM_LINES / CLOSE_FORM, *
    this allows you to use a similar program structure *
    as with NEW-PAGE PRINT ON / WRITE / NEW-PAGE PRINT
    OFF *
    FORM SEND_FAX
    TABLES DOC2FAX STRUCTURE TEST_DOC
    USING COUNTRY
    NUMBER.
    DATA: SID(5) TYPE N.
    DATA BEGIN OF POPT.
    INCLUDE STRUCTURE ITCPO.
    DATA END OF POPT.
    DATA BEGIN OF PRES.
    INCLUDE STRUCTURE ITCPP.
    DATA END OF PRES.
    CLEAR POPT.
    POPT-TDCOPIES = 1. " one copy
    POPT-TDDEST = " done internaly by script,
    POPT-TDPRINTER = " do not fill !!!
    POPT-TDNEWID = 'X'. " do not reuse old spool request
    POPT-TDDATASET = 'TEST'(022). " fill as you want
    POPT-TDSUFFIX1 = 'FAX'(023). " fill as you want
    POPT-TDSUFFIX2 = SY-UNAME. " fill as you want
    POPT-TDIMMED = 'X'. " send now
    POPT-TDLIFETIME = 8. " keep 8 days in spool
    POPT-TDTELENUM = NUMBER. " number without country code
    POPT-TDTELELAND = COUNTRY. " country of recipient
    POPT-TDCOVER = 'test fax'(024).
    POPT-TDCOVTITLE = 'test fax'(024).
    POPT-TDIEXIT = 'X'.
    CALL FUNCTION 'PRINT_TEXT'
    EXPORTING
    APPLICATION = 'TX'
    ARCHIVE_INDEX = ' '
    ARCHIVE_PARAMS = ' '
    DEVICE = 'TELEFAX' "<<< here we say: fax it !
    DIALOG = 'X'
    HEADER = HEADER
    OPTIONS = POPT
    IMPORTING
    RESULT = PRES
    TABLES
    LINES = DOC2FAX
    EXCEPTIONS
    OTHERS = 01.
    do not bother with exception in sample code
    CANCELED = 01
    DEVICE = 02
    FORM = 03
    OPTIONS = 04
    UNCLOSED = 05
    UNKNOWN = 06
    FORMAT = 07
    TEXTFORMAT = 08
    EXTERNAL = 09.
    IF SY-SUBRC = 0.
    arriving here means we could send:
    SID = PRES-TDSPOOLID.
    IF SID > '00000'.
    MESSAGE S433 WITH SID.
    ENDIF.
    LEAVE .
    ELSE.
    do not bother with exception in sample code
    MESSAGE A400 WITH 'PRIN_TEXT'.
    ENDIF.
    ENDFORM. " SEND_FAX

  • Spool request Error

    HI Experts,
                    MOst of the time Users encounter Spool Request Error while giving printouts. So for that Ihave to manualy delete sppol requests from SP01. Is there any where I can Schedule Programm where I set parameters to delete spool requests before reaching its maximum limit. Urgent.
    Thanks.
    Khan

    Hi Khan,
    Try this FM RSPO_R_RDELETE_SPOOLREQ.
    Have a look in this post
    How I set the auto delete old spool request
    Regards,
    Satish

Maybe you are looking for

  • Video card options question.

    Hello guys, i'm wondering if u can configure your video options like on a PC. I'm using a 15"MPB, when i'm playing WC3 online, it seems so laggy. I'm new to Mac computers, please help out. Thanks in advance!

  • DM doesn't recognize PB 2.0 Software version

    I did a complete reset of my PB to get the bridge files working with 2.0 and during the process my DM (latest version) didn't recognize my PB. So I did a complete reinstall of DM which included removing all files, disc clean up and reload the DM. At

  • Column name change in Interactive Reports

    Hi, I am new to Interactive reporting. We have a report that is resulted from Essbase query. Now in the report, we want to change the column names which are basically the essbase dimension member name. Is it possible to chang ethe names per our requi

  • CS5 not compatible with Mavericks 10.9.3?

    I just spent 2 grands with the new iMac Mavericks 10.9.3 and now someone told me all my CS5 apps are not compatible with it and I have to upgrade?  Seriously????

  • Issue while doing GR (MIGO).

    Hi All, In my case, I need an automatically created inspection lot via GR in order to record the result. So the procedure in this case is first to create a PO, then GR and then tranfer order (LT01), this will create an auto inspection lot. So I creat