W2reprint not creating spool

I am working on setting up the online W2 functionality for my client in USA. The W2 reprint request is not creating a spool in SP01.When I tried to debug the (W2FORM) object, the submit statement SUBMIT rpctrpu0 is returning with found = X.
When I checked SP11, I see a temse file HRL*** and its content has the following lines:
Main form not found in table T51T8
No results exist in the cluster for the given criteria.
While debugging I did see it picking up the values from T51T8, so I am at this point not sure how else to troubleshoot this.
Can someone please help?
Thanks,
Maria.

Hi Ameet.
I deleted all the test PCL4 data in the sandbox client. The reprint method is taking the correct date for the W2 reprint by checking v_5uxy_a table. So, I tried this on our dev system. It created the HRL spool in SP11, and this time it has two lines in the content, which has the form number and control number with the date/year information of the W2 reprint. Again, no spool in SP01.
I hope this might work in prod system. If you have any inputs for me please do comment below.
Thanks,
Gracias,
Maria.

Similar Messages

  • Payment Program F110 is not creating spool

    Hello experts,
    We are very close to the go-live and facing a major issue with Automatic Payment Program F110. We asked the dev to design Z check form for F110. Our form works well with manual Run ( F-58), we can see spool as well as print but when we Run the F110 the same form does not create any spool nor print anything. Even though its create the check, done the posting but no spool no print. The error we are getting it is  'No printer fonts maintained for Message no. TD327' . IT people sets all the fonts but no luck.
    appritiate the comments.
    Thanks

    Hi,
    take a look on this sap note.
    i hope it help you.
    Regds
    Note 391852 - Message TD327 (No printer fonts maintained for &)
    Summary
    Symptom
    The system displays error message TD327 (No printer fonts maintained for &) during the print although the device type of the printer has a base device type with printer fonts.
    Additional key words
    IW31, IW32, IW3D, IW21, IW22, IW23
    Cause and prerequisites
    The device type has not separate printer fonts but inherits them from the base device type.
    Solution
    Implement the program correction as specified in the

  • Sapscript not creating spool

    Hello gurus, is it possible to create a spool, when seeing and printing the sapscript at run-time?
    I am using FM GET_TEXT_PRINT_PARAMETERS but is not creating any spool.
    Thanks in advance!

    Hi,
    Try like this:
    FORM open_form.
      DATA : tmp_answer.
    itcpo-tdimmed = 'X' .
      perform fill_itcpo.
      itcpo-tdgetotf = 'X'.          
      itcpo-tdpreview = space.      
      CALL FUNCTION 'OPEN_FORM'
           EXPORTING
                form                        = layout
                language                    = sy-langu
                options                     = itcpo
                device                      = 'PRINTER'
               dialog                      = ' '
               options                     = it_itcpo
           EXCEPTIONS
                canceled                    = 1
                device                      = 2
                form                        = 3
                options                     = 4
                unclosed                    = 5
                mail_options                = 6
                archive_error               = 7
                invalid_fax_number          = 8
                more_params_needed_in_batch = 9
                OTHERS                      = 10.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.
    form fill_itcpo .
      REFRESH it_itcpo.
      CLEAR   it_itcpo.
      it_itcpo-TDPAGESLCT = SPACE.
      it_itcpo-TDCOPIES   = SPACE.
      it_itcpo-TDDEST     = 'LOCL'.
      it_itcpo-TDPRINTER  = SPACE.
      it_itcpo-TDPREVIEW  = SPACE.
      it_itcpo-TDNOPREV   = SPACE.
      it_itcpo-TDNOPRINT  = SPACE.
      it_itcpo-TDNEWID    = 'X'.
      it_itcpo-TDDATASET  = SPACE.
      it_itcpo-TDSUFFIX1  = SPACE.
      it_itcpo-TDSUFFIX2  = SPACE.
      it_itcpo-TDLIFETIME = SPACE.
      it_itcpo-TDSCHEDULE = SPACE.
      it_itcpo-TDSENDDATE = SPACE.
      it_itcpo-TDSENDTIME = SPACE.
      it_itcpo-TDTELELAND = SPACE.
      it_itcpo-TDTELENUM  = SPACE.
      it_itcpo-TDTITLE    = SPACE.
      it_itcpo-TDTEST     = SPACE.
      it_itcpo-TDPROGRAM  = 'Z_1IEWT_CERT_F01'.
      it_itcpo-TDSCRNPOS  = SPACE.
      it_itcpo-TDCOVER    = SPACE.
      it_itcpo-TDCOVTITLE = SPACE.
      it_itcpo-TDRECEIVER = SPACE.
      it_itcpo-TDDIVISION = SPACE.
      it_itcpo-TDAUTORITY = SPACE.
      it_itcpo-TDARMOD    = SPACE.
      it_itcpo-TDIEXIT    = SPACE.
    it_itcpo-TDGETOTF   = 'X'.
      it_itcpo-tdgetotf = space.
      it_itcpo-TDFAXUSER  = SPACE.
      it_itcpo-TDIMMED    = 'X'.
      it_itcpo-TDDELETE   = SPACE.
    endform.                    " fill_itcpo
    call function 'CLOSE_FORM'
    IMPORTING
       RESULT                         = LS_ITCPP
    TABLES
       OTFDATA                        = it_otfdata       
    EXCEPTIONS
       UNOPENED                       = 1
       BAD_PAGEFORMAT_FOR_PRINT       = 2
       SEND_ERROR                     = 3
       OTHERS                         = 4.
    if sy-subrc eq 0.
       submit rstxpdft4 with spoolno = ls_itcpp-tdspoolid and return. 
    endif.     
    Regards,
    Bhaskar

  • Report in background not create spool when no data found

    Hello  ,
    I created simple rapport that should run in background. When I  execute background job (sm37) I noticed that the  spool exists only
    for when the some data is found. When data is not found for any reason I do not have spool , and I need one saying
    'records passed 0'. I am not sure what I can do about it. I saw insome programs that is possible but I cannot find how it was done.  Please advice .
    Krsto

    Hi,
    You might be checking if the Final Internal table has data in it or not (May be in END-OF-SELECTION). If you are not do have check on this and simple code a write statement like below.
    IF IT_FINAL IS NOT INITIAL.
    CREATING A SPOOL.
    ELSE.
    WRITE : / 'Records Passed are 0'.
    ENDIF.
    Let me know if you need any further help on this.
    Regards,
    SRinivas

  • 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

  • Executing a program in background is not creating spool

    Hi all,
    I am facing a small problem with one of the program. Below are the details.
    Its a simple program of uploading file from local machine and displaying the output. when I am running in foreground, the contents of file are copied into internal table and getting displayed in List.
    Where as when I run background, No spool is getting created. Also I found that, the internal table is getting cleared. I  have put an IF NOT INITIAL check and found that, Internal table is getting cleared and error message is written in the spool .
    There is no problem with file upload in background or foreground.
    Please advise.

    Hi
    What you means with "uploading file from local machine":
    - Presentation Server or Application Server?
    If u're using the fm as GUI_UPLOAD or WS_UPLOAD in order to upload the data from a file of Presentation Server u should consider those fms work foreground only.
    So how do u upload the file?
    Max

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

  • Automatic payment program spool not created

    HI Exeperts
    i am assing same role both users both user while doing f110 posting one use is succesed and another user was some time was sucesse ful and sometime getting error spool not created i tested in testing client same role here sucess.i checked in sm37 also but no error user go to sp02  some time he can display. whenever got the errore massage  he cann't see the display option.i cann't understand this problem.
    any body help me.
    thank's
    chandra.

    Dear expert
    My guess is your user  SPAD - ADMIN ( Check over there )setup is incomplete, but as this is generally a BASIS responsibility
      spool requested is not created.
    http://sap.ittoolbox.com/groups/technical-functional/sap-acct/payment-program-f110-is-not-creating-spool-nor-print-1848411#M1851567
    Regards
      Ajeesh.s

  • Batch Job not Generating Spool No

    Hi Experts,
    We had a custom program where we are printing multiple invoice in a single go i.e all invoices for a particular sales office are printed in a single spool request. for foreground execution it is running fine. But after creating variant of it on selection screen & submitting the program to Batch job it is not creating spool no when the job is finished what could be the reason.?
    Also i would like to tell you that we are asking user to give a invoice no range on the selection screen.
    Edited by: priyeshosi on Jan 4, 2012 5:03 PM

    Hi priyeshosi ,
           If you use function modules start with GUI_* or  WS_* in your report , then you can't generate the spool.
    reason for this, Please check this link,
    http://www.sap-img.com/ab004.htm
    Regards,
    Selva M

  • 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

  • I have problem sending a email ..spool not created using custom FM

    Hi experts,
    i have problem sending a email ..spool not created using custom FM...this the custom FM
    * Send email notification
          lv_subject = text-037.
          lv_attachment = text-038.
          CALL FUNCTION 'Z_SEND_EMAIL_FROM_SPOOL'
            EXPORTING
              email1            = lv_email1
              email2            = lv_email2
              email3            = lv_email3
              subject           = lv_subject
              attachment_name   = lv_attachment
            EXCEPTIONS
              spool_not_created = 1
              OTHERS            = 2.
    Source code
    this is the source code for this FM
    IF sy-batch EQ 'X'.
        PERFORM get_job_details.
        PERFORM obtain_spool_id.
        PERFORM convert_spool_to_pdf.
        IF sy-subrc IS NOT INITIAL.
          MESSAGE e040(zhrcd) RAISING spool_not_created.
        ENDIF.
        PERFORM process_email USING email1
                                    email2
                                    email3
                                    subject
                                    attachment_name.
        WAIT UP TO 5 SECONDS.
        SUBMIT rsconn01 WITH mode   = 'INT'
                        WITH output = 'X'
                        AND RETURN.
      ENDIF.....
    Please let me know
    Edited by: Thomas Zloch on Nov 16, 2010 5:53 PM - please use code tags

    Hi srinivas ,
    Could you please Check
    FORM summary_report .
      DATA: lv_success TYPE i,
              lv_error TYPE i,
              lv_total TYPE i.
      DESCRIBE TABLE gt_data LINES lv_success.
    DESCRIBE TABLE gt_error LINES lv_error.
      DESCRIBE TABLE gt_message LINES lv_error.
    lv_total = lv_success + lv_error.
      lv_total = lv_success.
      gwa_summary-record = text-008."Number of Successful records.
      gwa_summary-number = lv_success.
      APPEND gwa_summary TO gt_summary.
      gwa_summary-record = text-009."Number of error records'.
      gwa_summary-number = lv_error.
      APPEND gwa_summary TO gt_summary.
      gwa_summary-record = text-010."Total number of records processed.
      gwa_summary-number =  lv_total.
      APPEND gwa_summary TO gt_summary.
    CLEAR gt_fieldcat.
      gwa_fieldcat_summ-col_pos = 1 .
      gwa_fieldcat_summ-fieldname  = 'RECORD'.
      gwa_fieldcat_summ-tabname = 'GT_SUMMARY'.
      gwa_fieldcat_summ-seltext_l  = text-011."Records
      gwa_fieldcat_summ-outputlen = '70'.
      APPEND gwa_fieldcat_summ TO gt_fieldcat_summ.
      gwa_fieldcat_summ-col_pos = 2 .
      gwa_fieldcat_summ-fieldname  = 'NUMBER'.
      gwa_fieldcat_summ-tabname = 'GT_SUMMARY'.
      gwa_fieldcat_summ-seltext_l  = text-012."Number
      gwa_fieldcat_summ-outputlen = '10'.
      APPEND gwa_fieldcat_summ TO gt_fieldcat_summ.
    ENDFORM.                    " SUMMARY_REPORT
    *&      Form  ERROR_REPORT
    FORM error_report .
    gt_fieldcat_err[] = gt_fieldcat[].
      gv_fieldcat_err-col_pos = 1.
      gv_fieldcat_err-fieldname  = 'PERNR'.
      gv_fieldcat_err-tabname = 'GT_MESSAGE'.
      gv_fieldcat_err-seltext_l  = text-070."Employee Number
      gv_fieldcat_err-outputlen = '20'.
      APPEND gv_fieldcat_err TO gt_fieldcat_err.
      gv_fieldcat_err-col_pos = 2.
      gv_fieldcat_err-fieldname  = 'MESSAGE'.
      gv_fieldcat_err-tabname = 'GT_MESSAGE'.
      gv_fieldcat_err-seltext_l  = text-071."Error Message
      gv_fieldcat_err-outputlen = '80'.
      APPEND gv_fieldcat_err TO gt_fieldcat_err.
    ENDFORM.                    " ERROR_REPORT
    *&      Form  FINAL_REPORT
    FORM final_report .
      DATA:lv_layout TYPE slis_layout_alv,
             lt_events_summ TYPE slis_t_event,
             lv_events_summ LIKE LINE OF lt_events_summ,
             lt_events_det TYPE slis_t_event,
             lv_events_det LIKE LINE OF lt_events_det,
             lt_events_err TYPE slis_t_event,
             lv_events_err LIKE LINE OF lt_events_det,
             lt_events_msg TYPE slis_t_event,
             lv_events_msg LIKE LINE OF lt_events_det.
      lv_events_summ-name = 'TOP_OF_PAGE'.
      lv_events_summ-form = 'TOP_OF_PAGE1'.
      APPEND lv_events_summ TO lt_events_summ.
      lv_events_det-name = 'TOP_OF_PAGE'.
      lv_events_det-form = 'TOP_OF_PAGE2'.
      APPEND lv_events_det TO lt_events_det.
      lv_events_err-name = 'TOP_OF_PAGE'.
      lv_events_err-form = 'TOP_OF_PAGE3'.
      APPEND lv_events_err TO lt_events_err.
      lv_events_msg-name = 'TOP_OF_PAGE'.
      lv_events_msg-form = 'TOP_OF_PAGE4'.
      APPEND lv_events_msg TO lt_events_msg.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
        EXPORTING
          i_callback_program = sy-repid.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                        = lv_layout
          it_fieldcat                      = gt_fieldcat_summ
          i_tabname                        = 'IT_SUMMARY'
          it_events                        = lt_events_summ
      IT_SORT                          =
      I_TEXT                           = ' '
        TABLES
          t_outtab                         = gt_summary
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 2
      OTHERS                           = 3
    IF CHK_DTL IS NOT INITIAL.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout                        = lv_layout
          it_fieldcat                      = gt_fieldcat
          i_tabname                        = 'gt_data'
          it_events                        = lt_events_det
      IT_SORT                          =
      I_TEXT                           = ' '
        TABLES
          t_outtab                         = gt_data
    EXCEPTIONS
      PROGRAM_ERROR                    = 1
      MAXIMUM_OF_APPENDS_REACHED       = 2
      OTHERS                           = 3
    ENDIF.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
       EXPORTING
         is_layout   = lv_layout
         it_fieldcat = gt_fieldcat_err
         i_tabname   = 'gt_error'
         it_events   = lt_events_err
       TABLES
         t_outtab    = gt_error.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
       EXPORTING
         is_layout   = lv_layout
         it_fieldcat = gt_fieldcat_msg
         i_tabname   = 'gt_message'
         it_events   = lt_events_msg
       TABLES
         t_outtab    = gt_error.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = lv_layout
          it_fieldcat = gt_fieldcat_err
          i_tabname   = 'gt_message'
          it_events   = lt_events_err
        TABLES
          t_outtab    = gt_message.
    IF GT_MESSAGE[] IS NOT INITIAL.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
        EXPORTING
          is_layout   = lv_layout
          it_fieldcat = gt_fieldcat_msg
          i_tabname   = 'gt_message'
          it_events   = lt_events_msg
        TABLES
          t_outtab    = gt_message.
    ENDIF.
      CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
    EXPORTING
       i_interface_check             = ' '
      IS_PRINT                      =
       i_screen_start_column         = 0
       i_screen_start_line           = 0
       i_screen_end_column           = 0
       i_screen_end_line             = 0
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER       =
      ES_EXIT_CAUSED_BY_USER        =
    EXCEPTIONS
      PROGRAM_ERROR                 = 1
      OTHERS                        = 2
    ENDFORM.                    " FINAL_REPORT
    *&      Form  top_of_page
          text
    FORM top_of_page1.                                          "#EC CALLED
      WRITE text-013."SUMMARY REPORT.
    ENDFORM.                    "top_of_page
    *&      Form  top_of_page2
          text
    FORM top_of_page2.                                          "#EC CALLED
      WRITE text-014."DETAIL REPORT.
    ENDFORM.                    "top_of_page
    *&      Form  top_of_page3
          text
    FORM top_of_page3.                                          "#EC CALLED
      WRITE text-015."ERROR REPORT
    ENDFORM.                    "top_of_page
    *&      Form  EMAIL_NOTIFICATION
    FORM email_notification .
      DATA: lv_email1  TYPE somlreci1-receiver,
           lv_email2  TYPE somlreci1-receiver,
           lv_email3  TYPE somlreci1-receiver,
           lv_subject TYPE char200,
           c_flag     TYPE c           VALUE 'X',
           lv_attachment TYPE char50.
      CLEAR: lv_email1,
             lv_email2,
             lv_email3,
             lv_subject,
             lv_attachment.
      SELECT SINGLE email1
                    email2
                    email3
        FROM zhr_interface_pr
        INTO (lv_email1,lv_email2,lv_email3)
        WHERE zinterfaceid EQ gc_objectid.
      IF sy-subrc EQ 0.
        IF sy-batch EQ 'X'.
    Send email notification
          lv_subject = text-037.
          lv_attachment = text-038.
          CALL FUNCTION 'Z_SEND_EMAIL_FROM_SPOOL'
            EXPORTING
              email1            = lv_email1
              email2            = lv_email2
              email3            = lv_email3
              subject           = lv_subject
              attachment_name   = lv_attachment
            EXCEPTIONS
              spool_not_created = 1
              OTHERS            = 2.
          IF sy-subrc <> 0.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    "
    Edited by: katewinslate@SAP on Nov 17, 2010 12:50 PM

  • Spool not creating when executing in background

    Hi All
    When i try to execute background printing for transaction code MCBA, system is finishing the job but not creating the spool. But for other transactions it is creating the spool corectly.
    Please Advice.
    Thanks
    Ravindra Suvarna

    Hi ravindra,
    1. U are right.
    2. The output does not come when we run this
       in background.
    3. The reason in the program for mcba.
    4. Its program name is :
       RMCB0100
    5. inside this there is one include RMCS00AL
    6. Which has the condition
       <b>IF SY-BATCH</b>
      (for background detecting)
    7. Now what it does afterwords, i could not detect,
      but
    8. This program DOES SOMETHING / DOES NOT DO SOMETHING
       specially for BACKGROUND PROCESS,
       BY DETECTING IT THRU
       SY-BATCH.
    regards,
    amit m.

  • Spool Not created

    Hi,
    I'm trying to convert SAP script form to PDF format and sending it via mail as
    attachment. I am able to do it. But, the problem is I need to get the spool
    number of the form in the output log of the report.
    Now, my form is not listed in the spool. I've set following parameters in the
    ITCPO structure.
    itcpo-tdgetotf = 'X'.
    itcpo-tdpreview = 'X'.
    itcpo-tddataset = sy-prdsn.
    itcpo-tdnewid = 'X'.
    itcpo-tdtitle = 'Test'.
    itcpo-tdtest = ' '.
    itcpo-tdimmed = 'X'.
    itcpo-tddelete = ' '.
    I'm passing this structure to OPEN_FORM .yet, i'm not getting spool ID.Can anyone help me know Where i've done the mistake.
    Regards,
    Bharathi

    Hi,
    Check with this.
    While calling smartform, paas control_parameters and output_options as mentioned below and set
    user_settings = ' '.
    It will send the smartform output to spool.
    DATA: wa_output_options TYPE ssfcompop,
    wa_ctrl TYPE ssfctrlop.
    wa_output_options-tdimmed = 'X'.
    wa_output_options-tddelete = 'X'.
    wa_output_options-tdimmed = ' '.
    wa_output_options-tddest = 'LOCL'.
    wa_ctrl-no_dialog = 'X'.
    CALL FUNCTION lv_fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    control_parameters = wa_ctrl
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    output_options = wa_output_options
    user_settings = ' '
    x_adrp = x_adrp
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    IF sy-subrc 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Kumar(Reward if helpful).

  • Not getiing  spool if zprogram excutes in background which calls a submit

    Dear All,
    I have two programs with same selection screen , one is a z one and the other a standard one .
    i am calling the standard program from my z program using Submit with some restriction value in the selection screen of the standard program.
    Everything is OK , now the thing is i am not getting a spool in SM37 when i execute the z report (which calls the standards program with submit) in background .
    I want in  the one  spool like i am getting if i execute the standard program manually in background.
    Regards

    Hi Try this way..
    now it creates two spools...
    **** Subroutine to get the print parameters
      PERFORM get_print_parameters.
      CONCATENATE 'QU'
                   sy-datum+4(4)
                   sy-uzeit INTO
                   wa_pri_params-plist.
    *   Submit report in background and creating spool
      SUBMIT <Reportname> USING SELECTION-SET p_var
          TO SAP-SPOOL WITHOUT SPOOL DYNPRO
          SPOOL PARAMETERS wa_pri_params AND RETURN.
      COMMIT WORK AND WAIT.
    *   To fetch the spool number from TSP01 table
      IF sy-subrc EQ 0.
        SELECT rqident
               FROM tsp01
               INTO p_spool
    *             UP TO 1 ROWS
               WHERE rq2name = wa_pri_params-plist.
        ENDSELECT.
      ENDIF.
    FORM get_print_parameters .
    * Function Module to get the print parameters
      CALL FUNCTION 'GET_PRINT_PARAMETERS'
        EXPORTING
          destination            = 'BC01'                       "'LP01'
          list_name              = 'TEST'
          list_text              = 'SUBMIT ... TO SAP-SPOOL'
          immediately            = ' '
          line_size              = '2000'
          no_dialog              = 'X'
        IMPORTING
          out_parameters         = wa_pri_params
          valid                  = w_valid
    *** Begin of insert PJ051810
        EXCEPTIONS
          archive_info_not_found = 1
          invalid_print_params   = 2
          invalid_archive_params = 3
          OTHERS                 = 4.
      IF sy-subrc <> 0.
        WRITE : 'Invalid Printer assigned'.
      ENDIF.
    *** End of insert PJ051810
    ENDFORM.                    " GET_PRINT_PARAMETERS
    Prabhudas

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

Maybe you are looking for

  • New 4th gen ipod touch will not let me sign in.

      ID has been set up and verified.  itunes account is also set up.  When we try the sign in on the device, we get the message "Could not sign in...The request timed out"  Any ideas to get this kid rolling?

  • Macbook Air 2013 256ssd , sandisk or samsung?

    Hello , I just wonder which ssd I have in my Macbook , It says : APPLE SSD SD0256F Is it sandisk or samsung?

  • Dynamic SQL for selection-option???

    Hi, I am trying to select a table from the parameters (range ) , but every time i run it give me a dump witn error in  where ...(itab) First i declare : data : cond(72) TYPE C,          itab LIKE TABLE OF cond . select-options: p_auart  FOR vbak-auar

  • Announcement:  Move recent snapshot build posted

    We have posted a more recent interim build in the download areas for WLS 6.1 beta. If you are interested in trying it out. Proceed to the actual download area by selecting your platform on: http://commerce.bea.com/downloads/weblogic_server.jsp Login

  • Problems with MSVCR80.dll

    It seem that the MSVCR80.dll is missing from my computer. This only happened today, when I tried to access Apple I-Tunes. How to I:- a) Get the file b) install it in the appropriate space. Please Help! Tony