<?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 Accessing Global Definitions within Program in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070213#M1901128</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to access the value of variables defined in Global Definitions of a smartform (as the following image shows) within my ABAP program. Does anyone know how it would be possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/714381" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 May 2015 23:21:53 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2015-05-30T23:21:53Z</dc:date>
    <item>
      <title>Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070213#M1901128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to access the value of variables defined in Global Definitions of a smartform (as the following image shows) within my ABAP program. Does anyone know how it would be possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Arman&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/714381" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2015 23:21:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070213#M1901128</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-30T23:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070214#M1901129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not possible to access Global variables from ABAP program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 06:30:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070214#M1901129</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-31T06:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070215#M1901130</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;Accessing global variables of a program was discussed in the forum, e.g:&lt;/P&gt;&lt;P&gt;&lt;A __default_attr="504051" __jive_macro_name="message" class="jive_macro_message jive_macro" data-orig-content="Re: Access to variables from calling subprogram using field-symbols" href="https://community.sap.com/" modifiedtitle="true" title="Re: Access to variables from calling subprogram using field-symbols"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With smartforms there's another tricky issue, generated program name in to 'partner' namespace.&lt;/P&gt;&lt;P&gt;To access variable of a simple program:&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;ASSIGN &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;(&lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'(lv_progname)lv_varname'&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;) &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&amp;lt;lv_data&amp;gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code in smartform is defined in the function group, so you need to add SAPL prefix to f.group's name.&lt;/P&gt;&lt;P&gt;Also generated function module is in the 'partner' namespace - SAPL goes after /xxx/ prefix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example for lv_progname:&lt;/P&gt;&lt;P&gt;/1BCDWB/SF00000118 need to be changed into&amp;nbsp; /1BCDWB/&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;SAPL&lt;/STRONG&gt;&lt;/SPAN&gt;SF00000118&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Radek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 07:12:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070215#M1901130</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-05-31T07:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070216#M1901131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arman,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Off the top of my head, one option to access them is - STACK ACCESS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I would like to know, what is the exact requirement -- why do you want to access the global variables' values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Balaji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 07:14:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070216#M1901131</guid>
      <dc:creator>balaji_nandikolla</dc:creator>
      <dc:date>2015-05-31T07:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070217#M1901132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;smartform itself is called by a program. so you can call your program via the program which calls smartform. in this way you can transfer the variable values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;anurag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 12:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070217#M1901132</guid>
      <dc:creator>Anurag_Abbi</dc:creator>
      <dc:date>2015-05-31T12:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070218#M1901133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the timing of the access you need to make? Is 'your' program the driver program of the smartform? If so you maybe able to use the approach Radek has suggested. If not and you arer talking about another program which runs independently of the smartform but slightly later you may be able to 'export' the values of the variables you require to memory and then import them from memory in your program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 00:47:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070218#M1901133</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2015-06-01T00:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070219#M1901134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;Arman Sheikholeslami wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I would like to access the value of variables defined in Global Definitions of a smartform (as the following image shows) within my ABAP program. ...&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Once again we have someone stating their preferred solution and wanting to know how to make it work. What is your actual requirement? What is the technical issue that you think accessing the global definitions will solve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:21:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070219#M1901134</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2015-06-01T05:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070220#M1901135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your comments and solutions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, I have a Z-report, which provides the results either in a &lt;SPAN style="text-decoration: underline;"&gt;smartform&lt;/SPAN&gt; format, or it exports all the results into an &lt;SPAN style="text-decoration: underline;"&gt;Excel&lt;/SPAN&gt; file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since in either formats the output is identical, and that the smartform part is already implemented, I want to reuse the variable definitions of the smartform in the code that I am developing to export the output into the Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I can develop everything from scratch, however, I though that there might be a better way!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Arman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 05:54:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070220#M1901135</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2015-06-01T05:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070221#M1901136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi arman,&lt;/P&gt;&lt;P&gt;Are you using driver program to push data to smartform? if so then directly call gui_download and pass your final table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With regards,&lt;/P&gt;&lt;P&gt;sampath kumar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 06:34:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070221#M1901136</guid>
      <dc:creator>former_member185054</dc:creator>
      <dc:date>2015-06-01T06:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070222#M1901137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The form(subroutine) could be put in an abap program(your driver maybe) and used from both the smartform and the excel export section. So basically change your smartfrom to execute an external form in the initialization section (rather than the form in the smartfrom which should now be deleted) and code the export section to use the same form. There is no need to share global variables just use common code at different times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 00:18:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070222#M1901137</guid>
      <dc:creator>former_member186741</dc:creator>
      <dc:date>2015-06-02T00:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Global Definitions within Program</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070223#M1901138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;if the smartform is called inside the program then if u want to access the global variable you can write a program line and assign it to the export variable .this export variable should be defined in the form interface's export 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;&lt;/P&gt;&lt;P&gt;hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 05:30:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-global-definitions-within-program/m-p/11070223#M1901138</guid>
      <dc:creator>former_member206650</dc:creator>
      <dc:date>2015-06-02T05:30:24Z</dc:date>
    </item>
  </channel>
</rss>

