New Spool Request

Hi all,
Whenever i create Purchase Order, spool is generated. But when i create one more purcahse Order new spool is not getting generated.
It is goind inside the same pool.
I want the spool number, so i can generate the pdf for the PO form and send it through mail through workflow.
Kindly adivce me how to generate new spool evertime when new PO is created.
Regards,
Rahul.

Hi,
Check the TDNEWID parameter while generating the spool.
Check this link : [http://help.sap.com/saphelp_nw04/helpdata/en/84/1f14b517aa11d5b67b006094192fe3/content.htm]
Please post this question in ABAP section.
Cheers,
Raja.D

Similar Messages

  • Always generation of new spool request when using message type WNAK

    Hey!
    I have one question regarding the printout of message type WNAK.
    In SAP standard the print program RWBNASTV and entry routine ENTRY_ABR_NATRAB is used.
    Now I want to ensure that at every printout generates a new spool request.
    Problem is that when a user prints a purchase order and after that a Sett. Crdt Agrmt (WNAK) the second printout is attached to the previous spool.
    How can I ensure that there is always a new spool file generated without copying the print program and the corresponding function modules before OPEN_FORM?
    In the print conditions I only know the function "Immediately print" but that is no help if the printout is attached to the purchase order which was printed before.
    Is there no flag which escpecially ensures that for this message type should be always be generated a new spool request?!?!
    I hope you know something else.
    With kind regards.
    Mark

    I alreadey copied the print program and the function modules but I am still looking for another solution because I think that is not the best solution for the problem.
    I changed following in include LWNPNFO0 (copied to LYWNPNFO0):
    --- Konvertierung der Kommunikationsdaten:                         --
      MOVE-CORRESPONDING pi_nast TO lvs_snast.
      MOVE sy-repid              TO lvf_program.
      CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
        EXPORTING
          pi_comm_type              = lvs_comm_type
          pi_comm_values            = lvs_comm_values
          pi_screen                 = pi_screen
    pi_newid                  = 'X'
          pi_country                = pi_tocountry
          pi_repid                  = lvf_program
          pi_snast                  = lvs_snast
        IMPORTING
          pe_itcpo                  = lvs_itcpo
          pe_device                 = lvf_device
          pe_mail_recipient         = lvs_recipient
          pe_mail_sender            = lvs_sender
        EXCEPTIONS
          comm_type_not_supported   = 1
          recipient_creation_failed = 2
          sender_creation_failed    = 3
          OTHERS                    = 4.
      IF sy-subrc <> 0.
        MOVE sy-subrc TO po_retcode.
        PERFORM error_message_arrang_append_sy TABLES ptx_error_messages
                                                    USING  pi_kona
                                                           dummy_vake.
      ENDIF.
      CHECK po_retcode = 0.
    *--- Öffnen des Formulars:
      CALL FUNCTION 'OPEN_FORM'
        EXPORTING
          archive_index  = toa_dara
          archive_params = arc_params
          device         = lvf_device
          dialog         = ' '
          form           = pi_formular
          language       = pi_nast-spras
          OPTIONS        = lvs_itcpo
          mail_sender    = lvs_sender
          mail_recipient = lvs_recipient
        EXCEPTIONS
          canceled       = 1
          device         = 2
          form           = 3
          OPTIONS        = 4
          unclosed       = 5
          mail_options   = 6
          archive_error  = 7
          OTHERS         = 8.
      IF sy-subrc NE 0.
    Edited by: Mark Müller on Jul 30, 2009 10:36 PM

  • How to create new spool request in smartforms??????

    hi all,
    i have to ctreate a new spool request for a smartform...
    The driver program for this smartform is a standard program.
    when i run the transaction, the spool for standard sap-script gets created but not for my smartform.
    the code is something like this:-
    wa_ssfcompop-TDDEST = 'LOCL'.
    wa_ssfcompop-TDIMMED  = space.
    wa_ssfcompop-TDNEWID = 'X'.
    wa_ssfcompop-TDFINAL = 'X'.
    *wa_ssfcompop-XSF = 'X'.
    wa_SSFCTRLOP-no_dialog = 'X'.
      CALL FUNCTION v_fm_name
        EXPORTING
         CONTROL_PARAMETERS = wa_SSFCTRLOP
          OUTPUT_OPTIONS     = wa_ssfcompop
          wa_rldri         = xrldri
          wa_rldrp         = xrldrp
          wa_rldru         = xrldru
          wa_t329p         = xt329p
          wa_resb          = xresb
          wa_rldrc         = xrldrc
          wa_vblkk         = xvblkk
          wa_vblkp         = xvblkp
          wa_rldrh         = xrldrh
          wa_rlvek         = xrlvek
          wa_reftab        = xreftab
          wa_lthu          = xlthu
          v_date           = v_date
          v_time           = v_time
          v_label          = v_label
          v_bzeit          = v_bzeit
          v_name1          = v_name1
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
        TABLES
          it_rldri         = xrldri
          it_rldrh         = xrldrh
          it_rldrc         = xrldrc
          it_vblkk         = it_vblkk
          it_vblkp         = it_vblkp
          it_rldrp         = it_rldrp
          it_rldru         = it_rldru
          it_t329p         = it_t329p
          it_resb          = it_resb
          it_rlvek         = it_rlvek
          it_reftab        = it_reftab
          it_lthu          = it_lthu
        EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 4
          OTHERS           = 5.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Help would be greatly appreciated and definitely rewarded

    hi
    good
    Use the function module 'GET_PRINT_PARAMETERS'.
    sample:
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
    ARCHIVE_ID = C_CHAR_UNKNOWN
    ARCHIVE_INFO = C_CHAR_UNKNOWN
    ARCHIVE_MODE = C_CHAR_UNKNOWN
    ARCHIVE_TEXT = C_CHAR_UNKNOWN
    AR_OBJECT = C_CHAR_UNKNOWN
    ARCHIVE_REPORT = C_CHAR_UNKNOWN
    AUTHORITY = C_CHAR_UNKNOWN
    copies = g_copies
    COVER_PAGE = C_CHAR_UNKNOWN
    DATA_SET = C_CHAR_UNKNOWN
    department = ''
    destination = g_destination
    expiration = g_days
    immediately = ' '
    IN_ARCHIVE_PARAMETERS = ' '
    IN_PARAMETERS = ' '
    layout = 'X_65_200'
    line_count = 65
    line_size = 200
    list_name = g_listname
    list_text = g_listtext
    MODE = ' '
    new_list_id = 'X'
    PROTECT_LIST = C_CHAR_UNKNOWN
    no_dialog = 'X'
    receiver = 'SAP*'
    release = ' '
    REPORT = C_CHAR_UNKNOWN
    sap_cover_page = 'X'
    HOST_COVER_PAGE = C_CHAR_UNKNOWN
    PRIORITY = C_NUM1_UNKNOWN
    SAP_OBJECT = C_CHAR_UNKNOWN
    TYPE = C_CHAR_UNKNOWN
    USER = SY-UNAME
    USE_OLD_LAYOUT = ' '
    UC_DISPLAY_MODE = C_CHAR_UNKNOWN
    DRAFT = C_CHAR_UNKNOWN
    ABAP_LIST = ' '
    USE_ARCHIVENAME_DEF = ' '
    DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN
    PO_FAX_STORE = ' '
    NO_FRAMES = C_CHAR_UNKNOWN
    IMPORTING
    OUT_ARCHIVE_PARAMETERS =
    out_parameters = g_params
    valid = g_valid.
    IF g_valid <> space.
    NEW-PAGE PRINT ON PARAMETERS g_params NO DIALOG.
    IF NOT tb_output3[] IS INITIAL.
    LOOP AT tb_output3 INTO wa_output3.
    PERFORM write_summary.
    ENDLOOP.
    ENDIF.
    Reward if useful...
    thanks
    mrutyun^

  • Number of pages in new spool request

    Hello.
    I use FM RSPO_RETURN_ABAP_SPOOLJOB to extract lines from a given spool. Then I open a new spool with FM RSPO_SR_OPEN. Each line of the table coming out of RSPO_RETURN_ABAP_SPOOLJOB is written to the new spool. Afterwards i close the new spool with FM RSPO_SR_CLOSE.
    So far so good. This works fine.
    My problem is that when i take a look into transaction SP01 the old spool has a certain number of pages. SP01 maintains that the new spool has 0 pages.
    How does that come? How can I solve this?
    Thx in advance
    Mike

    Thank you all.
    My problem was that during the process of data extraction (old spool -> internal table) the NEW-PAGE-tags are deleted or at least they were not transferred into the table. And so the could not have been written into the new spool.
    Solution:
    Every 65 lines, that are written into the new spool request, I call RSPO_SR_PAGE_BREAK.
    Thank you anyway.
    MIKE

  • New Spool Request not generating

    Dear All,
    I have seen print preview of one PO and taken print which has created a spool request.
    Another PO also I have seen the preview and taken print, but it has added to previous spool request as second page.
    My problem is I need to generate new spool request for each PO. Where do I need to do setting for this. Pls guide.
    Rgds
    Srini

    Hi Srinivasan,
    In the print program, try setting the parameter TDNEWID  to  'X'.
    Following link can help you ..
    Stop the combining of spool request to an existing one

  • New Spool Request for each purchase order

    Hi all,
    Whenever i create Purchase Order, spool is generated. But when i create one more purcahse Order new spool is not getting generated.
    It is goind inside the same pool.
    I want the spool number, so i can generate the pdf for the PO form and send it through mail through workflow.
    Kindly adivce me how to generate new spool evertime when new PO is created.
    Regards,
    Rahul.

    Hi,
    Generated Spool request number is in table TSP01.
    Retrieve that number and pass to function module CONVERT_ABAPSPOOLJOB_2_PDF to generate PDF.
    SO_DOCUMENT_SEND_API1
    This function module enables you send a new document including any existing attachments. The document and the attachments are transferred in the same table. They are created when sent and can also be placed in the sender's outbox.
    Regards,
    Supriya.

  • How to create the multiple spool requests for a single report.

    Hi gurus,
                     I have one requirement to be completed , i need to send the out put of the report via mail in pdf format. for that what i did was, iam executing report in background and creating spool request and converting it to pdf and sending the file.
    now the problem is, its a customer ledger report, for each customer i need to create a new spool request and send mail to that particular customer, now my dought is how to create multiple spool requests for a single pro and how i need to go about it.
    And one more question is can we create a spool request for a report which is running in online.
    waiting for inputs frm gurus.

    Hello,
    As per my knowledge for creating new spool id you will have to set
    output_options-tdnewid = 'X'.
    and then using
    job_output_info-spoolids
    create a pdf using
    call function 'CONVERT_OTFSPOOLJOB_2_PDF'
    Rachana.

  • Cannot Open a new spool job

    Hi,
    I am tryiing to print the COBRA letters from the program RPUCOB02 and i am selecting uptodate radio button.
    I am not facing the error when i select one employee and give the letter print.when i try to select more that one employee and click on letter generate buton it is throwing an error "cannot generate a new spool job"
    It is working fine with the first employee.
    when i went to into the debug mode in the Inlcude for COB02F03 of the program RPUCOB02 , there is open_form and it is dispalying the 104 exception " Error when opening layout set printing" for the second ee.
    can anyone let me know how i can eliminate the error
    Thanks.

    Anjani & Raj,
    This worked for me as a bandaid fix.... didnt do much reasearch... looks like after printing first employee the system is trying to create a new spool request again.... follwoing work around worked for me and may work for you too....
    In the First component of the COBRA User Exit -  ZXPCOU01
    added the following peice of code... and it worked as the spool will be openend once...
    DATA: lc_flag TYPE c.
    IMPORT lc_flag = lc_flag FROM MEMORY ID 'COBRAUSER'.
    IF lc_flag IS INITIAL.
      lc_flag = 'X'.
      EXPORT lc_flag = lc_flag TO MEMORY ID 'COBRAUSER'.
      RAISE standard_procedure.
    ELSE.
      sy-subrc = 0.
    ENDIF.

  • How may spool request can I create in the backend?...

    Hi Experts,
    How may spool request can I create in the backend? If yes, is there anywhere in the system can I set this value to increase number of spool request per user.
    Is there any condition which can prevent me create a new spool request?
    Yes all of the answer above is answered, so is there any offfical document from SAP states them.
    Thanks!
    - Anthony-

    Thx for the feedback. But, in fact, what was the real issue, originally?
    I forgot to inform you of that:
    1) [Note 193638 - Calculating spool number from file names as of 4.0A|http://service.sap.com/sap/support/notes/193638] (indicates the algorithm of UNIX file names). This note also indicates "For Release 4.0A, the maximum spool number has been increased from 99000 to 2000000000. The maximum number of output requests per spool request has been increased to 32767 as well."
    2) I think I forgot one of your initial questions:
    > Is there any condition which can prevent me create a new spool request?
    By default, SAP tries to append pages to existing spools with same characteristics. If they are always different, a new spool request is always created. So, you may change some characteristics so that they are identical and SAP will reuse existing spools. See rules in [Note 85318 appending documents to existing spool requests|http://service.sap.com/sap/support/notes/85318].

  • Spool Request contains disrelated data

    Dear All
    I met a strange issue, the spool reqeust contains disrelated data.
    the phenomenon is:
    I created a JOB with function fronted. But when the JOB finished, I found other disrelated data in this spool request.
    I'm not sure whether one spool request can contain several print requests?
    When I create the request at the same time other function create in this spool request?

    By default, SAP merges forms in existing spool requests with same properties, listed here: [Note 85318 appending documents to existing spool requests|http://service.sap.com/sap/support/notes/85318]. You may force them to go in a new spool request using output parameters when printing the form (see the note).

  • Printing invoices with VF31 in only one spool request

    Hello,
    we want to print a number of invoices with VF31 using only one spool request, as at this time we become one spool request for each document.
    The problem is that VF31 calls indirectly RSNAST00 and this program makes a call to the print program where we have OPEN_FORM and END_FORM each time, so this creates one spool request every time the program is called.
    Is there a way to print in only one spool request without doing big changes to programs?
    Thanks and regards.

    Hi,
    To append to an existing spool, see the SAP Notes 85318 and 16410.
    For spools to be appended the parameters 'New spool request' and 'Do not Append Print Jobs' must be set to 'No' by the application creating the spools.
    For Sapscript, when the application call the function module OPEN_FORM in your print program, you can transfer a structure ITCPO to the parameter OPTIONS. Via ITCPO-TDNEWID, you can select the option 'New Spool Request'.Via ITCPO-TDFINAL, you can can select if the spool is closed.
    Regards,
    Aidan

  • Creating no. of spool requests based on data

    Hi all!
      I am preparing a smartform showing the schedule deliveries of purchase orders of all vendors within a specified period. A new spool request is to be generated for each vendor's schedule deliveries. How can I raise a new spool request when the vendor no. is changed? Is it possible? If yes,please suggest.
    Edited by: Jayasri P. on Apr 21, 2008 12:31 PM

    Hi Nehal!
      I have passed the parameter of type SSFCRESCL in the function module fm_name(i.e. 2nd f.module in my program).But it's throwing a dump when executing saying that parameter of specified type doesn't allow to pass through this function module an it allows only fields of a particular type .What is the type of LS_COMPOSER?
    I have declared the variable as : LS_COMPOSER TYPE SSFCRESCL .
    LS_COMPOSER-TDNEWID = 'X'.
    CALL FUNCTION FM_NAME
           Exporting
               t_lfa1 = t_lfa1
               OUTPUT_OPTIONS = LS_COMPOSER
           TABLES
               it_ekko =it_ekko
               it_ekpo = it_ekpo
               it_eket = it_eket.
    What's going wrong with this?

  • REQUIRE One spool request for n copies in one print command in smartform

    Hii Friends,
              I created a smartform..I require 5 copies of that form..There is a text which needs to be changed in evry copies...eg Original in first copy
                            Duplicate in second copy
                            Triplicate in third copy....n so on
    So i used a loop n i am calling smartform 5 times....The problem is i need one spool request to be created..
    Note: By default sometimes it create one spool request and sometimes 3 spool request...
    Pls share your inputs ............
    Thanks,
    Regards,
    Sujit.

    hi,
    this is more complicated see below description from help
    regards,darek
    Printing Several Forms in One Print Request
    Use
    You want to bundle several forms into one print job.
    Print Request vs. Spool Request
    SAP Smart Forms allows you to bundle several forms to form one output unit. This output unit is called a print request. A print request is different from a spool request:
    Whether a new spool job is created in the spool depends on the settings in the spool dialog.
    Whether a new print request starts depends on the standard parameters of the generated function module you set in SAP Smart Forms. For each print request, the spool dialog is called only once. If you suppress the dialog, you can pass parameters for spool processing only at the beginning of the print request.
    This means that a print request gathers several forms before submitting them to spool processing. Thus they cannot be spread over several spool requests. Vice versa however, you can include several print requests into one spool request.
    Procedure
    Use function module SSF_FUNCTION_MODULE_NAME to retrieve the name of the function module generated from the Smart Form (see also: Integrating the Smart Form Into the Application).
    Call the Smart Form for the first time and set the NO_CLOSE parameter of the control structure. This prevents the print request from being closed after accepting the output of the Smart Form and allows you to include all other form output into this print request as well. Leave the NO_OPEN parameter empty.
    Instead of calling the Smart Form for the first time you can also call function module SSF_OPEN .
    If you want to start a new spool request for the print request, set the TDNEWID field of the Output Options in this first call.
    For all other form output of the application program that you want to include into the print request, use a loop to set both the NO_OPEN field and the NO_CLOSE field of the control structure.
    To close the print request, in the call of the last Smart Form set the NO_OPEN parameter and unmark the NO_CLOSE parameter.
    Instead of calling the Smart Form for the last time, you can also call function module SSF_CLOSE .
    Result
    The forms you called in the steps described above are included into one print request. If in the first step you started a new spool request, you can now view its status in the spool request overview (transaction SP01 ).

  • Many documents into one spool request

    How can I control the opening & closing of spool requests in ABAP?
    The context is a program that prints dunning letters and their associated billing documents.
    We want the hard copies to appear in the correct order (dunnning letter, its billing documents, dunnning letter, its billing documents,...)
    One way to achieve this could be to have a single spool request for each "dunning letter + billing documents" set of documents.
    Currently the documents go into the spool-request list in the correct order (in separate spool requests), but that does not ensure the correct order for the hard copies, since we have more than one work process handling the spool queue.

    My program is working: for each dunning letter and its billing documents there is one spool request.  Thanks, Christian.
    Some key points...
    [1] Invoices in table MHND can be other than SD invoices.  The non-SD ones were disregarded - trying to print them as SD billing documents would fail, and maybe mess up the logic for opening/closing spool requests.
    [2] For each billing document, I used itcpo values exactly as for its dunning letter, except that:
    for the dunning letter, itcpo-tdnewid = 'X' and itcpo-tdfinal = ' ';
    for billing documents other than the last, itcpo-tdnewid = ' ' and itcpo-tdfinal = ' '.
    for the last billing document for the dunning letter, itcpo-tdnewid = ' ' and itcpo-tdfinal = 'X';
    If you use different values of any of tddest, tdreceiver, tddataset, tdsuffix1, tdsuffix2,..., for instance, then you will get a new spool request, whatever the values of tdnewid or tdfinal.
    [3] Fortunately we already use our own print program for billing documents.  So just before the CALL FUNCTION 'OPEN_FORM', I tested the value of sy-cprog, and if it was the name of my report then I assigned as in [2] to the structure for the OPTIONS (i.e. itcpo) parameter of OPEN_FORM.
    [4] To pass values for [3] from the report to the print program, I used export/import to/from memory.
    [5] Because I was controlling the itcpo values, I was able to arrange that something helpful to the user appears in the Title column in 'Own spool requests' (transaction SP02).  This title comes from the itcpo fields tddataset, tdsuffix1 & tdsuffix2, and I arranged that the dunning level and the customer number appears in Title.

  • How to control automatic deletion of spool requests while check printing

    hi friends
    When i do cheque payment run (F-58), my spool getting deleted after printing. In my User setting SU01,
    Delete after output is not selected, still it is getting deleted from spool. We have informed users to uncheck this option once the spool request is created at the end of this run. But our users feel there should be some way to disable/uncheck or save this option automatically rather than changing each spool request settings everytime the posting is run.
    Please could you suggest me how to disable/uncheck this option 'Delete after printing if no errors' permanently. I have done the necessary settings in user master record but still it's the same.
    please advice.
    Regards,

    Hi Nathan,
    Solution is only to maintain in SU01 , its picking from there only.
    May be your  user needs to log-off once status is changed in SU01, ask him to check what it is showing for him in SU3.
    So if you deactivate  option in SU01/SU3 , it should work as same is working in our environment.
    You can test yuorself using below steps
    1) Login with your ID , create one spool request
    2) check the status in SP01 and check if its ticked  or not
    3) change the tick mark in SU01 , logoff. and login again .
    4) create another spool request
    5) check status now for new spool request in SP01 and check if it is ticked.
    Regards,
    Edited by: Gagan Deep Kaushal on Oct 31, 2010 5:00 PM

Maybe you are looking for

  • Error while creating publisher change tables in CDC

    Hi, I am implementing Change Data Capture. I got getting following error while creating publisher change tables in Staging database. My database version is 10.2.0.2.0 . I appreciate your help. ERROR at line 1: ORA-29540: class oracle/CDC/PublishApi d

  • Dynamic Search Helps In An Input Field

    Hi Experts,           I need to populate an input field with different search helps based on the user action i.e when user selects "Audit"  i hav to show the audit search help for my input field, when he selects  "Audit Plan" i would hav to show audi

  • My iMac maybe sick?

    Hi, I have bought the new iMac - (24 inch - 3.06 Ghz - 4 GB DDR3) I have had it since its release date 04.03.09 and it been great. However recently its been feeling a little sluggish (Taking twice as long to shutdown and load up, opening apps ect). I

  • MM - Pricing Conditions - Mass Change for Planned delivery costs

    Dear gurus, Is there way to mass change the value of pricing conditions of Planned Delivery costs in the PO? Also the supplier? Any suggestion? Many Thanks for helping, Maria

  • Cannot Restore my S10!

    So I have been doing a lot of messing around with different configurations on my S10 (Linux, Win 7, etc.) and somewhere along the way,  I screwed up my hard drive partitions. I now want to restore my S10 to its original configuration and I have the r