<?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 access variables from memory? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312958#M1727415</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use GET / SET parameters to access global SAP memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg&lt;/P&gt;&lt;P&gt;data: w_var(10).&lt;/P&gt;&lt;P&gt;var = 'test1'&lt;/P&gt;&lt;P&gt;set parameter id 'ABC' value w_var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you set the parameter ABC to the value test1 in the global memory.&lt;/P&gt;&lt;P&gt;You can then access this value in &lt;STRONG&gt;any program&lt;/STRONG&gt; by getting it out of the memory :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg&lt;/P&gt;&lt;P&gt;data: w_var(10).&lt;/P&gt;&lt;P&gt;get parameter id 'ABC' value w_var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise,&amp;nbsp; you can pass parameters from program to program. Also the F1 help for the set/get parameter statement should help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Feb 2013 06:27:41 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2013-02-05T06:27:41Z</dc:date>
    <item>
      <title>How to access variables from memory?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312957#M1727414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck in a point where I need your help.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is one FM 'ALE_INTERNALORDER_SAVEREPLICA'. If you look into FM, the message type and idoc type are both hardcoded inside it. The values are not passed globally, but declared locally.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inside the FM, the code looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message Type = 'INTERNAL_ORDER'.&lt;/P&gt;&lt;P&gt;Idoc Type = 'INTERNAL_ORDER01'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, when I call a subroutine from the FM,&amp;nbsp; and suppose this values are not passed in the subroutine, we wont be able to change the hard coded values, since they are not accessible inside the subroutine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I come out of the subroutine to the main FM body, the values are activated again. So this means they are stored somewhere in the memory. How can we access that memory? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know we can access the global memory with the help of field symbols... but I am not quite sure of above...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 05:20:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312957#M1727414</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-05T05:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to access variables from memory?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312958#M1727415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ajay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use GET / SET parameters to access global SAP memory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg&lt;/P&gt;&lt;P&gt;data: w_var(10).&lt;/P&gt;&lt;P&gt;var = 'test1'&lt;/P&gt;&lt;P&gt;set parameter id 'ABC' value w_var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you set the parameter ABC to the value test1 in the global memory.&lt;/P&gt;&lt;P&gt;You can then access this value in &lt;STRONG&gt;any program&lt;/STRONG&gt; by getting it out of the memory :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eg&lt;/P&gt;&lt;P&gt;data: w_var(10).&lt;/P&gt;&lt;P&gt;get parameter id 'ABC' value w_var.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Likewise,&amp;nbsp; you can pass parameters from program to program. Also the F1 help for the set/get parameter statement should help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Vivek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 06:27:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312958#M1727415</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-05T06:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to access variables from memory?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312959#M1727416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vivek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A standard program is in question here. Moreover, its not the global memory I need access to...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As i explained earlier... some variables are hard-coded locally in a FM 'ALE_INTERNALORDER_SAVEREPLICA'. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now after this hard-coding, a subroutine is called. These values are NOT passed to the subroutine. So obviously, this is inaccessible to that subroutine. &lt;STRONG&gt;I want access to those variables inside the subroutine...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As we all know, when I come out of the subroutine to the FM souce code body in debugging, the values are activated again... which obviously means they are be stored in some memory location.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How can we access that memory&lt;/STRONG&gt;? Hope I am clear this time...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ajay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 06:50:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312959#M1727416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-05T06:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to access variables from memory?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312960#M1727417</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;Below is a piece of sample code for reaching up into the callstack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the general way of doing it, but it may not work in your particular case. I believe the variables need to be defined as globals in the main (function group) program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: ty_fkkop_tab type standard table of fkkop.&lt;BR /&gt;field-symbols: &amp;lt;FS_FKKOP&amp;gt; type ty_fkkop_tab.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assign ('(SAPLFKB0)I_FKKOP[]') to &amp;lt;FS_FKKOP&amp;gt;.&lt;BR /&gt;if sy-subrc = 0.&lt;BR /&gt;...&lt;BR /&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Paul Bakker&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 07:04:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312960#M1727417</guid>
      <dc:creator>paul_bakker2</dc:creator>
      <dc:date>2013-02-05T07:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to access variables from memory?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312961#M1727418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class="almost_half_cell" id="gt-res-content"&gt;I confirm as "idoc_control" is local to the FM, you should not be able to assign a FS on it. (Scope of variables)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from &lt;A href="http://help.sap.com/abapdocu_731/en/abapassign_mem_area_dynamic_dobj.htm#!ABAP_ALTERNATIVE_1@1@"&gt;&lt;SPAN class="h1"&gt;ASSIGN - dynamic_dobj&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;For internal use only, the name in &lt;SPAN class="qtext"&gt;name&lt;/SPAN&gt; can also have the form "(PROG)DOBJ", where "PROG" is the name of an ABAP program and "DOBJ" the name of a &lt;STRONG&gt;global data object of this program.&lt;/STRONG&gt; If the program "PROG" is loaded into the same &lt;A class="grey" title="Glossary Entry"&gt;internal session&lt;/A&gt; as the current program when the &lt;SPAN class="qtext"&gt;ASSIGN&lt;/SPAN&gt; statement is executed, then the data object "DOBJ" is searched for in this program and the field symbol points to this data object if the assignment was successful.&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Raymond&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 07:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-access-variables-from-memory/m-p/9312961#M1727418</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2013-02-05T07:23:07Z</dc:date>
    </item>
  </channel>
</rss>

