<?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: GENERATE_SUBPOOL_DIR_FULL in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100745#M1183590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome on SCN. &lt;/P&gt;&lt;P&gt;I think you misunderstood a bit how subroutine pool works. Subroutinne pools consists of routines dynamically generated by developer. When you use &lt;STRONG&gt;GENERATE SUBROUTINE POOL&lt;/STRONG&gt; statement system automatically generates program name for this subroutine pool and pass you back its name. &lt;/P&gt;&lt;P&gt;Now inside that you may write your own routines and call them any number of times you want.&lt;/P&gt;&lt;P&gt;Look at the below example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS: n_calls TYPE i.

DATA: it_code TYPE TABLE OF string,
      prog LIKE sy-repid.

APPEND: 'PROGRAM subpool.' TO it_code,
        'FORM some_form USING n_time TYPE i.' TO it_code,    "my routine in subroutine pool
        'write: / ''Routine called'', n_time.' TO it_code,
        'ENDFORM.' TO it_code.

GENERATE SUBROUTINE POOL it_code NAME prog.   "after generation program name is stored in prog
IF sy-subrc = 0.
  DO n_calls TIMES.
    PERFORM ('SOME_FORM') IN PROGRAM (prog)
      USING sy-index IF FOUND.
  ENDDO.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you copy and paste it you will find out that you can call &lt;STRONG&gt;some_form&lt;/STRONG&gt; n_times depending on user input on selection screen. You don't call entire subroutine pool n_times, just appropraite routine which was coded inside that subroutine pool. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is clear now. If not don't hesitate to ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2009 13:10:01 GMT</pubDate>
    <dc:creator>MarcinPciak</dc:creator>
    <dc:date>2009-02-03T13:10:01Z</dc:date>
    <item>
      <title>GENERATE_SUBPOOL_DIR_FULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100744#M1183589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem with the generation of subrutine pool. I am calculating some formulas thar are in a table. What I am doing is to concatenate the operands and the operators and then I call this subrutine. The problem is that I need to call this much more times than 36 that is the limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I read in the documentation is this: "This statement generates a temporary subroutine pool. The source code of the subroutine pool is taken from the internal table itab. The generated subroutine pool is stored internally in the current internal mode."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know how to delete or clear this subrutine from the internal mode in order not to have the dump after the creation of 36 subrutine pools??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 12:43:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100744#M1183589</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T12:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: GENERATE_SUBPOOL_DIR_FULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100745#M1183590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alejandro,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Welcome on SCN. &lt;/P&gt;&lt;P&gt;I think you misunderstood a bit how subroutine pool works. Subroutinne pools consists of routines dynamically generated by developer. When you use &lt;STRONG&gt;GENERATE SUBROUTINE POOL&lt;/STRONG&gt; statement system automatically generates program name for this subroutine pool and pass you back its name. &lt;/P&gt;&lt;P&gt;Now inside that you may write your own routines and call them any number of times you want.&lt;/P&gt;&lt;P&gt;Look at the below example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

PARAMETERS: n_calls TYPE i.

DATA: it_code TYPE TABLE OF string,
      prog LIKE sy-repid.

APPEND: 'PROGRAM subpool.' TO it_code,
        'FORM some_form USING n_time TYPE i.' TO it_code,    "my routine in subroutine pool
        'write: / ''Routine called'', n_time.' TO it_code,
        'ENDFORM.' TO it_code.

GENERATE SUBROUTINE POOL it_code NAME prog.   "after generation program name is stored in prog
IF sy-subrc = 0.
  DO n_calls TIMES.
    PERFORM ('SOME_FORM') IN PROGRAM (prog)
      USING sy-index IF FOUND.
  ENDDO.
ENDIF.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you copy and paste it you will find out that you can call &lt;STRONG&gt;some_form&lt;/STRONG&gt; n_times depending on user input on selection screen. You don't call entire subroutine pool n_times, just appropraite routine which was coded inside that subroutine pool. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is clear now. If not don't hesitate to ask.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Marcin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:10:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100745#M1183590</guid>
      <dc:creator>MarcinPciak</dc:creator>
      <dc:date>2009-02-03T13:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: GENERATE_SUBPOOL_DIR_FULL</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100746#M1183591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks very much for the reply. I got the idea, I am going to change it in order to see if it works because i am calling it from a FM, but I think it should work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alejandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2009 13:26:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/generate-subpool-dir-full/m-p/5100746#M1183591</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-03T13:26:35Z</dc:date>
    </item>
  </channel>
</rss>

