Creating spool requests

Hi Friends,
I have to print like 5000 checks . In my custom program I need to create new spool for every 1000 checks so that I can send them to 5 printers from the Spool .
Please advise What paramenters I need to take care of .
Thanks,

You can write simple logic ,just fill the ITCPO Structure in OPEN_FORM FM's
count the records in internal table.
if internal table data reaches 1000 records then use below logic.
if i_data-count = 1000.
  itcpo-tddest      =  p_print.
  itcpo-tdnewid     = 'X'.
  itcpo-tdpreview   = 'X'.
  itcpo-tdimmed     = 'X'.
  itcpo-tdcopies    = '1'.
endif.
  call function 'OPEN_FORM'
       exporting
            device   = 'PRINTER'
            dialog   = ' '
            form     = 'ZAUTO_REPLPRINT'
            language = sy-langu
            options  = itcpo.
Thanks
Seshu

Similar Messages

  • 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

  • Saving a delivery, does not create spool request

    Hi,
    I have a delivery and 2 output types. The print program of first output type already exists and I created one for the second one.
    When I save the delivery, spool request gets created for the first output type but doesn for the one I created. Can anyon tell why?

    hi,
    It has to be assigned to the second output type, the first one is for a different purpose.
    Is there any change need to be done in program to correct it?
    But, It does work when run through transaction.

  • Creating Spool request

    Hi friends,
    as per the old message I am trying to create a spool request which further will be downloaded to PDF format. I am facing a problem, as per message  when I try to do write in worte_perform I am receving ABAP dumps with Illegal page number
    anyidea why is it so .
    Thanks
    Lakhbir
    data: loc_dest like pri_params-pdest .
      clear : wf_listname , loc_dest , wf_listtext .
      move: 'List name' to   wf_listname .
      move: 'List header text' to   wf_listtext .
    select single spld into usr01-spld from usr01 where bname eq sy-uname .
      if sy-subrc eq 0 .
        move: usr01-spld to loc_dest .
      endif .
      call function 'GET_PRINT_PARAMETERS'
           exporting
                destination    = loc_dest
                copies         = wf_copies
                list_name      = wf_listname
                list_text      = wf_listtext
                immediately    = ' '
                release        = ' '
                new_list_id    = 'X'
                expiration     = wf_days
                line_size      = 200
                line_count     = 65
                layout         = 'X_65_200'
                sap_cover_page = 'X'
                receiver       = 'SAP*'
                department     = ''
                no_dialog      = 'X'
           importing
                out_parameters = wf_params
                valid          = wf_valid.
      if wf_valid <> space.
        new-page print on parameters wf_params no dialog.
        perform write_summary .
        new-page print off.
      endif .
    within the write_summary do a normal write operation.
    loop at <itab> .
    write:/
    endloop .

    We encountered a similar problem on 4.6C using a custom BAPI to save invoices to PDF for an internal web app.  We used a BDC/call transaction to access the output function from there.  This was only supposed to be a temporary workaround but has been working and we probably won't revisit until our next upgrade.  Hopefully this idea will help on your version, if so I am new here and need points!
    *Generate Transaction
      PERFORM dynpro USING :
                     'X' 'SAPMV60A'   '0101'   ,
                     ' ' 'VBRK-VBELN' v_invoice ,
                     ' ' 'BDC_OKCODE' '=DRCK'   .
      PERFORM dynpro USING :
                     'X' 'SAPLVMSG'   '0110'   ,
                     ' ' 'DNAST-KSCHL' v_kschl,
                     ' ' 'BDC_OKCODE' '=STAR'   .
      SELECT * UP TO 1 ROWS
        FROM nast WHERE objky = v_invoice
                  AND   vstat = '1'
                  AND   kappl = 'V3'
                  AND   kschl = v_kschl
                  AND   aktiv = space.
      ENDSELECT.
      IF sy-subrc = 0.
        PERFORM dynpro USING :
                       'X' 'SAPLSPO1'   '0300'   ,
                       ' ' 'BDC_OKCODE' '=YES'   .
      ENDIF.
      PERFORM dynpro USING :
                     'X' 'SAPLVMSG'   '0100'   ,
                     ' ' 'NAST-LDEST' 'TD06',
                     ' ' 'NAST-DIMME'  space,
                     ' ' 'NAST-TDOCOVER' space,
                     ' ' 'NAST-TDRECEIVER' space,
                     ' ' 'NAST-DELET' 'X',
                     ' ' 'BDC_OKCODE' '=STAR'   .
      CALL TRANSACTION   'VF03'
           USING         i_bdcdata
           MODE          v_mode
           UPDATE        'S'
           MESSAGES INTO i_bdcmsgcoll.

  • Creating spool requests using smartforms

    hi folks,
    I need help in this area...
    I have an ABAP print program that I run to create monthly statements. There are two categories while running the monthly statements identified by the code '6' or '7' Now, i have to create separate spool requests so that while running the print program for these monthly customers.
    How can I do this?
    Santhosh

    Ok,  first lets say that ACCITAB has the records that are printed in the main window of the form.  The number of pages for each customer depends on how many records are present in the ACCITAB for the customer.
    For example....   ACCITAB.
    <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    1234      08/26/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    1234      08/27/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/21/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/22/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/23/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/24/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/25/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    5678      08/26/2005        <b>Customer  Invoice Date  Passed Due</b>
    1234      08/25/2005        $1.00
    1234      08/26/2005        $1.00
    1234      08/27/2005        $1.00
    5678      08/21/2005        $1.00
    5678      08/22/2005        $1.00
    5678      08/23/2005        $1.00
    5678      08/24/2005        $1.00
    5678      08/25/2005        $1.00
    5678      08/26/2005        $1.00
    .00
    Lets say we have two customers in our table, customer 1234 has only two records associated with him,  customer 5678 has like 75 lets say.  Here you will need to loop at this table and count how many records are there for each customer and store it in another internal.  Maybe you can have a separate internal table for each category.
    Types: begin of titab,
           kunnr type kna1-kunnr,
           count type i,
           end of titab.
    Data:  itab_1   type table of titab with header line.
    Data:  itab_2_5 type table of titab with header line.
    Data:  itab_6_M type table of titab with header line.
    One for 1 pagers,  one of 2-5 pagers, and one for 6 and more pages.
    Now loop thru ACCITAB and at the end of a customer you need to write a record to one of these tables with the record count.  Use the AT END statement.  You will need to determine the maximum number of printed lines that your form handles in the MAIN window.  Example,  how many printed lines does it take to make the form go to the next page.  You need to find what this number is.
    When you have this number, now you can do some logic which will split the customers into there categorys.
    Let's say that the max is 50 lines per page.
    Data: counter type i.
    LOOP AT ACCITAB.
    counter = counter + 1.
    at end of kunnr.
    IF counter < '50'.
    itab_1-kunnr = accitab-kunnr.
    itab_1-count = counter.
    append itab_1.
    elseif counter => '51'
       and counter =< '250'.
    itab_2_5-kunnr = accitab-kunnr.
    itab_2_5-count = counter.
    append itab_2_5.
    elseif counter => '251'.
    itab_6_m-kunnr = accitab-kunnr.
    itab_6_m-count = counter.
    append itab_6_m.
    ENdif.
    clear counter.
    endat.
    ENDLOOP.
    Now you have the customers split out into separate internal tables depending on how many pages for thier statement.  Now you can start printing.
    call fucntion 'OPEN_FORM'.
    Loop at itab_1.
    * Do the logic which prints your form.
    endloop.
    call fucntion 'CLOSE_FORM'.
    call fucntion 'OPEN_FORM'.
    Loop at itab_2_5.
    * Do the logic which prints your form.
    endloop.
    call fucntion 'CLOSE_FORM'.
    call fucntion 'OPEN_FORM'.
    Loop at itab_6_m.
    * Do the logic which prints your form.
    endloop.
    call fucntion 'CLOSE_FORM'.
    Please remember to award points for helpful answers. Thanks.
    Regards,
    Rich Heilman

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

  • Don't create spool request

    Hi averybody,
    Is there any parameter to avoid I create a spool request? I work with Smartforms.
    thanks in advance
    Regards

    Hi,
    You need pass these parameter in the OUTPUT_OPTIONS parameter of Smartform FM
    OUTPUT_OPTIONS-TDNEWID  = ' '  "---> No Spool Request
    OUTPUT_OPTIONS-TDIMMED = 'X'  " --> Print Immdietly

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

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

  • Spool request to printer

    Hello,
       I created spool requests for the samartforms by executing in background.
    Can any one tell me how to send the the spool request to printer? I would like to send from ABAP program not using tcode sp02.
    Thank you

    Hi
    We can use FM: <b>RSPO_OUTPUT_SPOOL_REQUEST</b> for the same.
              CALL FUNCTION 'RSPO_OUTPUT_SPOOL_REQUEST'
                EXPORTING
                  device           = <printer>
                  spool_request_id = <request>.
    Regards
    Eswar

  • Close spool request

    Hi,
    I have one program, that calls transaction code CIP2. When I run in backgound, it creates spool request but with 0 pages.
    And have the message:
    ERROR => missing close of spool request [rspoooh.c    1173]
    If I run this program without background and calls CIP2, it runs well and no spool is created.
    Any idea how to solve this problem? or close the spool request?
    All ideias are welcome.
    Best regards,
    Anabela Fernandes

    Hi Harsh,
    When my program run in background it is done by one job and run when one event occurs.
    My program calls CIP2 with FM PROCESS_CC2_MESSAGES_PARALLEL. So I can't use the command SUBMIT.
    The spools request are created in backgound.
    I was think to do like: at end of program if sy-batch = 'X' -> Close the pending spool requests. But I don't know how to do it. Any idea?
    Thanks in advance.
    Regards,
    Anabela Fernandes

  • SAP-Script Spool Requests over 2 GB

    Hi Experts,
    if I make a dunning run the created spool requests are over 2 GB and the printing will be cancelled by the system. I use SAPF150D2 for printing the SAP script dunning froms. According to SAP it's not possible to handle spool files with  more than 2 GB in Temse.
    I don't have any idea why the spool request take so much space. I only generate 2000 pages in one spool request without any graphics, only text and some table lines. On the same system we make invoice forms also in SAP script with more than 4000 pages and there is no problem.
    Has anybody an idea what reasons could be that the request take so much space???
    Regards
    CD

    Hi Christian,
    It still looks strange to me that spool request is so big. If it would be output request then I would say that problem lies in your printer - it doesn't recognize Arial font and because of that data have to be send as images and not text, but spool....hmmm. I guess there is still a lot to learn That way or other thanks for info. It may be useful in future.
    Best regards
    Marcin Cholewczuk

  • Saving spool request  in PDF format  using background job

    Hi,
    We have some important jobs which create spool requests. My requirement is to save those spool requests either on front end  or on application server in pdf format. I tried with  program RSTXPDF4 but i can save those files only when pdf conversion is done online and I want it to run in background  as some of the spool request have more then 3000 pages and also i'm not looking for ABAP development.
    It is fine with me to save it in text format but some of the spool request have around 3000 pages and  i cannot save the whole request in one shot using option system->list->save->local file
    It is appreciated if someone has any alternative for the above one.
    Regards,
    Chaitanya

    Hi,
    Just check Is it solve your purpose... When you are creating background jobs mention your email / user id as spool list recipient...
    I think you will recv. the spool output in the mailbox in pdf
    Edited by: Mrinal Das on Jan 3, 2011 2:37 PM

  • Process Spool Request from RFC

    We are creating an Output in a Delivery with a bapi from a Remote system. The Output is created successfully, but do you have any ideas how to print this output from a remote device?
    Is there a RFC to convert this into PDF? If so, how do we process this.
    I appreciate any help.
    Thanks -

    Hello Brijo
    Maybe this can help you?
    Create Spool Request Number for Smartform?
    Best regards
    Thomas

Maybe you are looking for

  • JDBC Thin Driverr for Oracle 8.1.5 on NT

    I Installed the above said driver from Cd and followd the instructions givne the documentation and updated as CLASSPATH=[Oracle Home]/jdbc/lib/classes111.zip and when Im trying to make sure I can compile and run the java as said in the documentation.

  • A500 slot-loading drive doesn't work

    I started using my A500 on the 24th of December 2009. Now my slot-loading drive just spits out every disc i put in it. I've also noticed that most of my toshiba softwares like disc creator loads with these errors when starting: Unexpected error occur

  • Suggestion needed urgently !!!!!

    Hi Experts, Our system configuration is Usage: Central User Administration Component Version: Web AS 620 ABAP Operating System: AIX 5.2 Database: 9.2.0.6 DB Size: 110 GB We also have GRC products installed and as per OSS notes there are limitations o

  • On the left side of my address bar it is showing that firefox has blocked content that is insecure, whenevr I'm using facebook or any other apps related to it.

    Firefox is blocking content from almost all the websites. It is even showing that for this page. Every time I refresh the facebook page/ an app on the facebook this will appear. Previously it used to crash firefox, then I upgraded it but since then i

  • Change colour of led

    I have a small problem...the default color of a boolean led is green and i want to change it's color to red if some condition is true. I used property node (the property being colors[4]) for the LED and wired a color box constant with value red to it