<?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: Access the variables declared using generate subroutine pool in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-the-variables-declared-using-generate-subroutine-pool/m-p/7339067#M1539207</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Nov 2010 09:07:29 GMT</pubDate>
    <dc:creator>soumya_jose3</dc:creator>
    <dc:date>2010-11-08T09:07:29Z</dc:date>
    <item>
      <title>Access the variables declared using generate subroutine pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-the-variables-declared-using-generate-subroutine-pool/m-p/7339066#M1539206</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 decalring variables dynamically at run-time using generate subroutine pool.&lt;/P&gt;&lt;P&gt;Is there any way I can access the declared variables globally??.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CLEAR: g_s_repcode.&lt;/P&gt;&lt;P&gt;  REFRESH: g_t_repcode.&lt;/P&gt;&lt;P&gt;  g_s_repcode-line = text-035.&lt;/P&gt;&lt;P&gt;  APPEND g_s_repcode TO g_t_repcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_s_repcode-line = FORM dyn_var.&lt;/P&gt;&lt;P&gt;  APPEND g_s_repcode TO g_t_repcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF p_stat[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;    g_text = 'lv_stat'.&lt;/P&gt;&lt;P&gt;    PERFORM dynamic_var_decl USING p_stat.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  g_s_repcode-line = ENDFORM.&lt;/P&gt;&lt;P&gt;  APPEND g_s_repcode TO g_t_repcode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  GENERATE SUBROUTINE POOL g_t_repcode NAME g_prog&lt;/P&gt;&lt;P&gt;                           MESSAGE g_msg.&lt;/P&gt;&lt;P&gt;  IF sy-subrc NE 0.&lt;/P&gt;&lt;P&gt;    WRITE:/ text-040.&lt;/P&gt;&lt;P&gt;  ELSE.&lt;/P&gt;&lt;P&gt;    PERFORM dynamic_var IN PROGRAM (g_prog).&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM dyn_var_decl  USING  p_par.&lt;/P&gt;&lt;P&gt;  DATA: l_count TYPE string,&lt;/P&gt;&lt;P&gt;        l_var TYPE string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT p_stat.&lt;/P&gt;&lt;P&gt;    CLEAR: l_count, l_var, g_s_repcode.&lt;/P&gt;&lt;P&gt;    l_count = sy-tabix.&lt;/P&gt;&lt;P&gt;    CONCATENATE g_text l_count INTO l_var.&lt;/P&gt;&lt;P&gt;    CONCATENATE text-037 l_var text-038 text-039 INTO g_s_repcode&lt;/P&gt;&lt;P&gt;                SEPARATED BY space.&lt;/P&gt;&lt;P&gt;    APPEND g_s_repcode TO g_t_repcode.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM.                    " DYNAMIC_VAR_DECL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the perform 'dynamic_var' created two variables lv_stat1 and lv_stat2. But these variables are accessible only in the form dyn_var. Is there any way I can access the variables created outside that form???&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Soumya.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 05:15:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-the-variables-declared-using-generate-subroutine-pool/m-p/7339066#M1539206</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2010-11-08T05:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Access the variables declared using generate subroutine pool</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/access-the-variables-declared-using-generate-subroutine-pool/m-p/7339067#M1539207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Nov 2010 09:07:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/access-the-variables-declared-using-generate-subroutine-pool/m-p/7339067#M1539207</guid>
      <dc:creator>soumya_jose3</dc:creator>
      <dc:date>2010-11-08T09:07:29Z</dc:date>
    </item>
  </channel>
</rss>

