<?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: How to use Submit Statement for mutiple Spools. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4647000#M1093677</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your guidance.&lt;/P&gt;&lt;P&gt;I can not use this Function Module in my Program due to some Performance Issues.&lt;/P&gt;&lt;P&gt;Is there any other way to obtain the same functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Oct 2008 04:56:30 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-10-22T04:56:30Z</dc:date>
    <item>
      <title>How to use Submit Statement for mutiple Spools.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646997#M1093674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;I have a requirement wherein I need to Submit a Report Program to SAP-SPOOL which generates output for multiple Idocs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each Idoc I need to attach the spool to a particular object_id.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As of now I am doing this by putting the Submit statement in a loop.&lt;/P&gt;&lt;P&gt;I want to meet the same functionality without using a loop for different Idocs.&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT IDOCS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'GET_PRINT_PARAMETERS'&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;   .&lt;/P&gt;&lt;P&gt;    . &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'JOB_OPEN'&lt;/P&gt;&lt;P&gt; .&lt;/P&gt;&lt;P&gt;  .&lt;/P&gt;&lt;P&gt;   .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SUBMIT YFAPINV_IDOC_RPTS  TO SAP-SPOOL    "USING SELECTION-SCREEN '1000'&lt;/P&gt;&lt;P&gt;    WITHOUT SPOOL DYNPRO&lt;/P&gt;&lt;P&gt;    SPOOL PARAMETERS print_parameters&lt;/P&gt;&lt;P&gt;    WITH CREDATE IN CREDATE&lt;/P&gt;&lt;P&gt;    WITH CRETIME IN CRETIME&lt;/P&gt;&lt;P&gt;    WITH DOCNUM IN DOCNUM&lt;/P&gt;&lt;P&gt;    WITH VENDOR IN VENDOR&lt;/P&gt;&lt;P&gt;    WITH V_INVOIC IN V_INVOIC&lt;/P&gt;&lt;P&gt;    WITH MESCODE IN MESCODE&lt;/P&gt;&lt;P&gt;    WITH DOCSTAT IN DOCSTAT&lt;/P&gt;&lt;P&gt;    WITH DC_NBR IN DC_NBR&lt;/P&gt;&lt;P&gt;    WITH DOC_TYPE IN DOC_TYPE&lt;/P&gt;&lt;P&gt;    WITH S_BSART IN S_BSART&lt;/P&gt;&lt;P&gt;    WITH ap1_flag eq 'X'&lt;/P&gt;&lt;P&gt;    AND RETURN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'JOB_CLOSE'&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;      .&lt;/P&gt;&lt;P&gt;       .&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT  rqident rqcretime FROM tsp01&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INTO (rqident,rqcretime)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE rqowner = sy-uname&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ORDER BY rqcretime DESCENDING.&lt;/P&gt;&lt;P&gt;  EXIT.&lt;/P&gt;&lt;P&gt;ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF rqident IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'&lt;/P&gt;&lt;P&gt;    .&lt;/P&gt;&lt;P&gt;     .&lt;/P&gt;&lt;P&gt;      .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; DATA l_line TYPE docs-lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT l_tline.&lt;/P&gt;&lt;P&gt;    CLEAR l_line.&lt;/P&gt;&lt;P&gt;    MOVE l_tline-tdline TO l_line.&lt;/P&gt;&lt;P&gt;    l_docs-lines = l_line.&lt;/P&gt;&lt;P&gt;    APPEND l_docs.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 12:24:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646997#M1093674</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T12:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Submit Statement for mutiple Spools.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646998#M1093675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  submit XXXXXXXX1 exporting list to memory&lt;/P&gt;&lt;P&gt;           with p_docno = xdocno&lt;/P&gt;&lt;P&gt;           with p_netcb = 'X'&lt;/P&gt;&lt;P&gt;           with p_item  = 'X'&lt;/P&gt;&lt;P&gt;           with p_hold  = 'X'&lt;/P&gt;&lt;P&gt;           and return.&lt;/P&gt;&lt;P&gt;then use &lt;/P&gt;&lt;P&gt;  call function 'LIST_FROM_MEMORY'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or  use call function LIST_TO_ASCI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 12:35:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646998#M1093675</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-10-21T12:35:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Submit Statement for mutiple Spools.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646999#M1093676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Each submit will create only one spool. So I dont think this is possible. Yes what you can do though is that submit the program for all the IDocs at once ( provided your program YFAPINV can handle this) and then process the spool and separate the output for each IDoc after you retrieve the data from spool. &lt;/P&gt;&lt;P&gt;To retrieve the data from the spool, you can use the function 'RSPO_RETURN_ABAP_SPOOLJOB' pass the spool request number and it will return you a internal table with the spool data.&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;Advait&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2008 12:50:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4646999#M1093676</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-21T12:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Submit Statement for mutiple Spools.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4647000#M1093677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your guidance.&lt;/P&gt;&lt;P&gt;I can not use this Function Module in my Program due to some Performance Issues.&lt;/P&gt;&lt;P&gt;Is there any other way to obtain the same functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Oct 2008 04:56:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-use-submit-statement-for-mutiple-spools/m-p/4647000#M1093677</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-10-22T04:56:30Z</dc:date>
    </item>
  </channel>
</rss>

