<?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: Accessing internal table of main program inside function module... in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883879#M677412</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you do need to use a field symbol.  Say for example, you had a internal table called IMARC in your program and you want to access it later in a funciton module, you would do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  data: xmarc type marc.
  field-symbols: &amp;lt;imarc&amp;gt; type marc_upl_tt.

* Assign an internal table
  field = '(ZPROGRAM_NAME)IMARC[]'.
  assign (field) to &amp;lt;imarc&amp;gt;.

  loop at &amp;lt;imarc&amp;gt; into xmarc.
    write: / xmarc-matnr, xmarc-werks.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Sep 2007 20:01:40 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-09-19T20:01:40Z</dc:date>
    <item>
      <title>Accessing internal table of main program inside function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883878#M677411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have function module say ZFUNC and main program say ZMAIN and internal table defined as IT_TAB inside ZMAIN but not passed as parameter to Function module ZFUNC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I want to access the field value of IT_TAB of  main program ZMAIN inside ZFUNC during debugging then, I simply put &amp;lt;b&amp;gt;(ZMAIN)IT_TAB-amount&amp;lt;/b&amp;gt; in ABAP debugger and then change it when the debugger is inside ZFUNC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I write code to change the value of internal table of main program in function module ZFUNC instead of doing in debugger ? I guess I have to use some field symbols, but not sure. Please suggest.&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;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 19:58:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883878#M677411</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T19:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing internal table of main program inside function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883879#M677412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you do need to use a field symbol.  Say for example, you had a internal table called IMARC in your program and you want to access it later in a funciton module, you would do something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  data: xmarc type marc.
  field-symbols: &amp;lt;imarc&amp;gt; type marc_upl_tt.

* Assign an internal table
  field = '(ZPROGRAM_NAME)IMARC[]'.
  assign (field) to &amp;lt;imarc&amp;gt;.

  loop at &amp;lt;imarc&amp;gt; into xmarc.
    write: / xmarc-matnr, xmarc-werks.
  endloop.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 20:01:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883879#M677412</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-19T20:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing internal table of main program inside function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883880#M677413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above solution will help me seeing the value but if I wanna change the value of (ZMAIN)I_TAB-amount inside function module how can I do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rajesh.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 20:08:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883880#M677413</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-19T20:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing internal table of main program inside function module...</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883881#M677414</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, since you use a field symbol, this will give you access to the internal table, You can then read the specific line that you want to change, and update is using a MODIFY statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Sep 2007 20:56:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/accessing-internal-table-of-main-program-inside-function-module/m-p/2883881#M677414</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-09-19T20:56:07Z</dc:date>
    </item>
  </channel>
</rss>

