<?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: SUBMIT statement not generating SPOOL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853886#M1320149</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;The values passed during SUBMIT are not taken over until the event INITIALIZATION has been processed, i.e. default values set at INITIALIZATION are overwritten if values are passed for the PARAMETER or SELECT-OPTION during SUBMIT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Jul 2009 06:39:15 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-07-08T06:39:15Z</dc:date>
    <item>
      <title>SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853881#M1320144</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;I am using SUBMIT statement to call a Z program. I am using the code specified below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        &lt;/P&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 &amp;lt;Z-PROG&amp;gt; TO SAP-SPOOL
        SPOOL PARAMETERS MSTR_PRINT_PARMS
        WITHOUT SPOOL DYNPRO
        VIA JOB NAME NUMBER NUMBER
        WITH PLNT = PLANT
        WITH QUOT IN QUOT
        WITH MAT IN V_MATNR
        WITH LIF IN V_LIFNR AND RETURN.

        IF SY-SUBRC EQ 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 2 SECONDS.

            CLEAR WA_TBTCP.
            SELECT SINGLE * FROM TBTCP INTO WA_TBTCP WHERE JOBCOUNT = NUMBER.
          ENDIF.
        ENDIF.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is &lt;STRONG&gt;WA_TBTCP&lt;/STRONG&gt; contains spool number as zero (0000).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Premal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 05:18:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853881#M1320144</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T05:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853882#M1320145</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;I guess the session is created in SM35, and you need to manually reprocess the session to complete the execution, then only it will be executed completely and spool will be created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First check in SM35. Also check any spool is created in the table TSP01.&lt;/P&gt;&lt;P&gt;Also check SM37.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the standard program RSBDCBTC_SUB for processing the SM35 session immediately.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Santhosh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:03:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853882#M1320145</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T06:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853883#M1320146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the submit statement in the below format...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA:      v_user_print_params LIKE pri_params.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    v_user_print_params-primm = space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        SUBMIT &amp;lt;Z-PROG&amp;gt; TO SAP-SPOOL&lt;/P&gt;&lt;P&gt;        SPOOL PARAMETERS v_user_print_params&lt;/P&gt;&lt;P&gt;        WITHOUT SPOOL DYNPRO&lt;/P&gt;&lt;P&gt;        VIA JOB NAME NUMBER NUMBER&lt;/P&gt;&lt;P&gt;        WITH PLNT = PLANT&lt;/P&gt;&lt;P&gt;        WITH QUOT IN QUOT&lt;/P&gt;&lt;P&gt;        WITH MAT IN V_MATNR&lt;/P&gt;&lt;P&gt;        WITH LIF IN V_LIFNR AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:10:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853883#M1320146</guid>
      <dc:creator>former_member212005</dc:creator>
      <dc:date>2009-07-08T06:10:10Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853884#M1320147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Santosh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked in SM35 there was no session created pertaining to my program and in SM37, the JOB that I was creating in my program  was successfully completed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853884#M1320147</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T06:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853885#M1320148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried in the format that you specified bu t still the spool number is ZERO &lt;SPAN __jive_emoticon_name="sad"&gt;&lt;/SPAN&gt; ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:16:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853885#M1320148</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T06:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853886#M1320149</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;The values passed during SUBMIT are not taken over until the event INITIALIZATION has been processed, i.e. default values set at INITIALIZATION are overwritten if values are passed for the PARAMETER or SELECT-OPTION during SUBMIT .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Prashant&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:39:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853886#M1320149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-07-08T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853887#M1320150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Prashant,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not used INITILIZATION section in my code. .. How ever my queries are written under STAR-OF-SELECTION. Can you please elaborate you reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Premal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 06:54:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853887#M1320150</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T06:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853888#M1320151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still facing the problem .... the SUBMIT statement is not generating the SPOOL Number.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 07:32:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853888#M1320151</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T07:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: SUBMIT statement not generating SPOOL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853889#M1320152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to all for replying ... the problem was solved. I used another method which I have shown below for those seeking solution like me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*-- Setup the Print Parmaters

  CALL FUNCTION 'GET_PRINT_PARAMETERS'
    EXPORTING
      COPIES                 = '1'
      NO_DIALOG              = 'X'
      USER                   = SY-UNAME
      ABAP_LIST              = 'X'
      NEW_LIST_ID            = 'X'
      EXPIRATION             = '9'
      PRIORITY               = '1'
    IMPORTING
      OUT_PARAMETERS         = MSTR_PRINT_PARMS
      VALID                  = MC_VALID
    EXCEPTIONS
      ARCHIVE_INFO_NOT_FOUND = 1
      INVALID_PRINT_PARAMS   = 2
      INVALID_ARCHIVE_PARAMS = 3
      OTHERS                 = 4.


*-- Make sure that a printer destination has been set up
*-- If this is not done the PDF function module ABENDS
      IF MSTR_PRINT_PARMS-PDEST = SPACE.
        MSTR_PRINT_PARMS-PDEST = 'LP01'.
      ENDIF.

*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
      MSTR_PRINT_PARMS-LINSZ = '255'.
      MSTR_PRINT_PARMS-PAART = 'X_65_255'.

* Store the current selection screen details
      CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
        EXPORTING
          CURR_REPORT     = SY-REPID
        TABLES
          SELECTION_TABLE = I_RSPARAMS
        EXCEPTIONS
          NOT_FOUND       = 1
          NO_REPORT       = 2
          OTHERS          = 3.

* SUBMIT TO GET THE SPOOL NUMBER
      SUBMIT &amp;lt;Z-PROGRAM&amp;gt; WITH SELECTION-TABLE I_RSPARAMS
      TO SAP-SPOOL
      SPOOL PARAMETERS MSTR_PRINT_PARMS
      WITHOUT SPOOL DYNPRO
      AND RETURN.

      WAIT UP TO 2 SECONDS.

* SELECT THE RECENTLY CREATED SPOOL
      SELECT MAX( RQIDENT ) INTO MI_RQIDENT FROM TSP01
      WHERE RQCLIENT = SY-MANDT
      AND RQOWNER = SY-UNAME.

*REPORT TO GENERATE SPOOL NUMBER FOR PDF CONVERT
      SUBMIT RSTXPDF5 WITH SPOOLNO = MI_RQIDENT
      WITH DSTDEVIC = 'LP01' AND RETURN .

      IF SY-SUBRC EQ 0.
        CLEAR MI_RQIDENT.

* SELECT THE RECENTLY CREATED SPOOL FOR PDF
        SELECT MAX( RQIDENT ) INTO MI_RQIDENT FROM TSP01
        WHERE RQCLIENT = SY-MANDT
        AND RQOWNER = SY-UNAME.

*REPORT TO DOWNLOAD PDF SPOOL TO GUI

        SUBMIT RSTXPDFT5 WITH SPOOLID = MI_RQIDENT
        AND RETURN.
      ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the link which helped to get the solution.&lt;/P&gt;&lt;P&gt;[http://sapprograms.blogspot.com/2008/11/create-pdf-from-abap.html]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2009 10:24:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/submit-statement-not-generating-spool/m-p/5853889#M1320152</guid>
      <dc:creator>premal_mistry2</dc:creator>
      <dc:date>2009-07-08T10:24:24Z</dc:date>
    </item>
  </channel>
</rss>

