<?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: Getting spool number after SUBMIT report statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688316#M1292726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SU01 default tab , if delete after ouput is X also no use. I am also having same problem,Please&lt;/P&gt;&lt;P&gt;let me know whether u got the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2009 04:49:45 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-06-16T04:49:45Z</dc:date>
    <item>
      <title>Getting spool number after SUBMIT report statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688313#M1292723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am using the following Submit statement  in my Z program.&lt;/P&gt;&lt;P&gt;  SUBMIT RKO7KO8G USING SELECTION-SET VARIANT&lt;/P&gt;&lt;P&gt;          TO SAP-SPOOL SPOOL PARAMETERS v_print_param&lt;/P&gt;&lt;P&gt;          ARCHIVE PARAMETERS archi_parameters&lt;/P&gt;&lt;P&gt;                       WITHOUT SPOOL DYNPRO&lt;/P&gt;&lt;P&gt;                       AND RETURN.&lt;/P&gt;&lt;P&gt;I am taking the spool number into a variable&lt;/P&gt;&lt;P&gt;DATA: v_spool  TYPE tsp01-rqident.&lt;/P&gt;&lt;P&gt;v_spool = sy-spono.&lt;/P&gt;&lt;P&gt;Using the Spool request, I am calling,&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'&lt;/P&gt;&lt;P&gt;    EXPORTING&lt;/P&gt;&lt;P&gt;      rqident              = v_spool&lt;/P&gt;&lt;P&gt;      first_line           = 22&lt;/P&gt;&lt;P&gt;      last_line            = 35&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      buffer               = i_buffer&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      no_such_job          = 1&lt;/P&gt;&lt;P&gt;      not_abap_list        = 2&lt;/P&gt;&lt;P&gt;      job_contains_no_data = 3&lt;/P&gt;&lt;P&gt;      selection_empty      = 4&lt;/P&gt;&lt;P&gt;      no_permission        = 5&lt;/P&gt;&lt;P&gt;      can_not_access       = 6&lt;/P&gt;&lt;P&gt;      read_error           = 7&lt;/P&gt;&lt;P&gt;      OTHERS               = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc &amp;lt;&amp;gt; 0.&lt;/P&gt;&lt;P&gt;    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno&lt;/P&gt;&lt;P&gt;            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;  perform send_mail&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am executing my Z program in background. But the job is getting cancelled and in the job log the following message is coming:&lt;/P&gt;&lt;P&gt; Spool request (number 0000052462) created without immediate output&lt;/P&gt;&lt;P&gt; Spool request 0 no longer exists                                  &lt;/P&gt;&lt;P&gt;Please tell me how to correct this. I need to read the spool using the spool number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neethu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 05:13:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688313#M1292723</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T05:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting spool number after SUBMIT report statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688314#M1292724</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;In the transaction  SU01 in the defualts tab, , check whether the checkbox for Delete after output is unchecked. May be because of this even if the spool is created, it gets deleted immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;Mansi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 05:20:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688314#M1292724</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T05:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting spool number after SUBMIT report statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688315#M1292725</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 am not having access to SU01. Is there any other option ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neethu.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2009 05:31:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688315#M1292725</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-04T05:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: Getting spool number after SUBMIT report statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688316#M1292726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In SU01 default tab , if delete after ouput is X also no use. I am also having same problem,Please&lt;/P&gt;&lt;P&gt;let me know whether u got the solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Harsha&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 04:49:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688316#M1292726</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T04:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting spool number after SUBMIT report statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688317#M1292727</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;in debugging did you check the value for v_spool.&lt;/P&gt;&lt;P&gt;i think it will be zero, because you have to collect the sy-spono in the program &lt;/P&gt;&lt;P&gt;your submitting  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: NUMBER    TYPE TBTCJOB-JOBCOUNT,
      NAME      TYPE TBTCJOB-JOBNAME VALUE 'TEST_SPOOL',
      PRINPAR   TYPE PRI_PARAMS,
      ARCPAR    LIKE ARC_PARAMS,
      WA_TBTCP  TYPE TBTCP,
      RQIDENT   TYPE TSP01-RQIDENT,
      VAL.

CALL FUNCTION 'GET_PRINT_PARAMETERS'
  EXPORTING
    LAYOUT                 = 'X_65_132'
    LINE_COUNT             = 65
    LINE_SIZE              = 132
  IMPORTING
    OUT_PARAMETERS         = PRINPAR
    OUT_ARCHIVE_PARAMETERS = ARCPAR
    VALID                  = VAL
  EXCEPTIONS
    ARCHIVE_INFO_NOT_FOUND = 1
    INVALID_PRINT_PARAMS   = 2
    INVALID_ARCHIVE_PARAMS = 3
    OTHERS                 = 4.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
CALL FUNCTION 'JOB_OPEN'
  EXPORTING
    JOBNAME          = NAME
  IMPORTING
    JOBCOUNT         = NUMBER
  EXCEPTIONS
    CANT_CREATE_JOB  = 1
    INVALID_JOB_DATA = 2
    JOBNAME_MISSING  = 3
    OTHERS           = 4.
IF SY-SUBRC = 0.

  SUBMIT  ZPRK_ALVLVC TO SAP-SPOOL
  SPOOL PARAMETERS PRINPAR
  WITHOUT SPOOL DYNPRO
  VIA JOB NAME NUMBER NUMBER
  AND RETURN.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;
  IF SY-SUBRC = 0.

    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        JOBCOUNT             = NUMBER
        JOBNAME              = NAME
        STRTIMMED            = 'X'
      EXCEPTIONS
        CANT_START_IMMEDIATE = 1
        INVALID_STARTDATE    = 2
        JOBNAME_MISSING      = 3
        JOB_CLOSE_FAILED     = 4
        JOB_NOSTEPS          = 5
        JOB_NOTEX            = 6
        LOCK_FAILED          = 7
        OTHERS               = 8.

    IF SY-SUBRC = 0.
      WAIT UP TO 5 SECONDS.
      CLEAR WA_TBTCP.
      SELECT SINGLE *
        FROM TBTCP
        INTO WA_TBTCP
       WHERE JOBCOUNT = NUMBER.

      WRITE 50 'spool-number.' COLOR 5.
      WRITE:/ WA_TBTCP-LISTIDENT HOTSPOT.
    ENDIF.
  ENDIF.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;R K.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2009 05:07:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-spool-number-after-submit-report-statement/m-p/5688317#M1292727</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-06-16T05:07:07Z</dc:date>
    </item>
  </channel>
</rss>

