<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue with Spool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714984#M1454409</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are submitting to spool with same report name , the it will be recursion and will result in infinite loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To resolve this, we need to use ABAP memory and Export a flag variable with a dummy value to restrict the execution of Submit statement, only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Mar 2010 04:55:01 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-03-05T04:55:01Z</dc:date>
    <item>
      <title>Issue with Spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714981#M1454406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My requirement is to create spool and then send spool as PDF attachment. &lt;/P&gt;&lt;P&gt;PDF is created using FM CONVERT_ABAPSPOOLJOB_2_PDF.&lt;/P&gt;&lt;P&gt;Spool is created using following statements -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   NEW-PAGE PRINT ON PARAMETERS x_print_parameters NO DIALOG.&lt;/P&gt;&lt;P&gt;   NEW-PAGE PRINT OFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will create spool and I retrieve the spool using sy-spono.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine in foreground processing. But when I execute report for 4 cost centers.  This should create 4 spools and then send 4 mails.&lt;/P&gt;&lt;P&gt;But program only creates 1 spool and rest of the spools are not created  though I am able  to fetch the spool number using sy-spono.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vnair09 on Mar 4, 2010 11:20 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:19:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714981#M1454406</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-04T10:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714982#M1454407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN __default_attr="blue" __jive_macro_name="color"&gt;Hi, 
&amp;lt;li&amp;gt;Try to call function module &lt;STRONG&gt;ABAP4_COMMIT_WORK&lt;/STRONG&gt;  after NEW PAGE-PRINT OFF . 

   &lt;PRE&gt;&lt;CODE&gt;NEW-PAGE PRINT OFF.
   CALL FUNCTION 'ABAP4_COMMIT_WORK'.&lt;/CODE&gt;&lt;/PRE&gt;

Thanks
Venkat.O&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:34:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714982#M1454407</guid>
      <dc:creator>venkat_o</dc:creator>
      <dc:date>2010-03-04T10:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714983#M1454408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How about submitting 4 jobs one with each cost center. You need to place sy-batch check in appropriate places.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Vinod.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Mar 2010 19:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714983#M1454408</guid>
      <dc:creator>vinod_vemuru2</dc:creator>
      <dc:date>2010-03-04T19:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714984#M1454409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are submitting to spool with same report name , the it will be recursion and will result in infinite loop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To resolve this, we need to use ABAP memory and Export a flag variable with a dummy value to restrict the execution of Submit statement, only once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Mar 2010 04:55:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714984#M1454409</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-05T04:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with Spool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714985#M1454410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a requirement to create Spool request using set_table_for_first_display method in foreground without showing print window. then from that spool, i have to create PDF file and send as e-mail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have done everything. but stuck with spool creation step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my code for spool creation step looks like this.In this,variable v_spono everytime showing 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;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                         = C_NUM3_UNKNOWN
*     COVER_PAGE                     = C_CHAR_UNKNOWN
*     DATA_SET                       = C_CHAR_UNKNOWN
*     DEPARTMENT                     = C_CHAR_UNKNOWN
*     DESTINATION                    = C_CHAR_UNKNOWN
*     EXPIRATION                     = C_NUM1_UNKNOWN
     immediately                    = ' '
*     IN_ARCHIVE_PARAMETERS          = ' '
*     IN_PARAMETERS                  = ' '
*     LAYOUT                         = C_CHAR_UNKNOWN
*     LINE_COUNT                     = C_INT_UNKNOWN
     line_size                      = 220
*     LIST_NAME                      = C_CHAR_UNKNOWN
*     LIST_TEXT                      = C_CHAR_UNKNOWN
     mode                           = 'CURRENT'
*     NEW_LIST_ID                    = C_CHAR_UNKNOWN
*     PROTECT_LIST                   = C_CHAR_UNKNOWN
     no_dialog                      = 'X'
*     RECEIVER                       = C_CHAR_UNKNOWN
     release                        = 'X'
*     REPORT                         = C_CHAR_UNKNOWN
*     SAP_COVER_PAGE                 = C_CHAR_UNKNOWN
*     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
*     WITH_STRUCTURE                 = C_CHAR_UNKNOWN
*     SUPPRESS_SHADING               = C_CHAR_UNKNOWN
*     PO_FAX_STORE                   = ' '
*     NO_FRAMES                      = C_CHAR_UNKNOWN
   IMPORTING
*     OUT_ARCHIVE_PARAMETERS         =
     out_parameters                 = st_print-print_ctrl-pri_params
*     VALID                          =
*     VALID_FOR_SPOOL_CREATION       =
   EXCEPTIONS
     archive_info_not_found         = 1
     invalid_print_params           = 2
     invalid_archive_params         = 3
     OTHERS                         = 4
            .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  NEW-PAGE PRINT ON PARAMETERS st_print-print_ctrl-pri_params
  NO DIALOG.
*  st_print-print = ' '.

*  IF sy-batch = 'X'.
  st_print-print = ' '.
  st_print-prnt_info = 'X'.
  st_print-print_ctrl-pri_params-prnew = 'X'.
*  ENDIF.

  gs_layout_alv-zebra = 'X'.
  gs_layout_alv-cwidth_opt = selected.

*  display alv
  CALL METHOD grid-&amp;gt;set_table_for_first_display
       EXPORTING
*        i_buffer_active               =
*        i_bypassing_buffer            =
*        i_consistency_check           =
*        i_structure_name              =
*        is_variant                    =
*        i_save                        =
*        i_default                     = 'X'
           is_layout                     = gs_layout_alv
           is_print                      = st_print
*        it_special_groups             =
*        it_toolbar_excluding          =
*        it_hyperlink                  =
*        it_alv_graphics               =
*        it_except_qinfo               =
*        ir_salv_adapter               =
    CHANGING
            it_outtab                     = git_summary[]
            it_fieldcatalog               = gt_fieldcat_lvc[]
*        it_sort                       =
*        it_filter                     =
    EXCEPTIONS
         invalid_parameter_combination = 1
         program_error                 = 2
         too_many_lines                = 3
         OTHERS                        = 4
          .
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  NEW-PAGE PRINT OFF.
  CALL FUNCTION 'ABAP4_COMMIT_WORK'.

*  SELECT * FROM tsp01 INTO tsp01
*           WHERE rq2name = st_print-print_ctrl-pri_params-plist
*           ORDER BY rqcretime DESCENDING.
*    v_spono = tsp01-rqident.
*    EXIT.
*  ENDSELECT.
*
*  IF sy-subrc NE 0.
*    CLEAR v_spono.
*  ENDIF.

*convert spool to pdf and send as attachment to sap inbox.
  MOVE sy-spono TO v_spono.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;waiting for early reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 05:43:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-spool/m-p/6714985#M1454410</guid>
      <dc:creator>MKM</dc:creator>
      <dc:date>2012-01-10T05:43:23Z</dc:date>
    </item>
  </channel>
</rss>

