<?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 ABAP Debugger: Extract Dominator Tree Data into Internal Table in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749777#M36020</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;In the ABAP debugger we can see the data held in memory via the "Dominator Tree" (memory analysis tool).&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Is there a way to get this data into an internal table (similar to getting the call stack via cl_abap_compiler-&amp;gt;get_all_refs)?&lt;/P&gt;
  &lt;P&gt;Thanks in advance&lt;/P&gt;
  &lt;P&gt;PeteA&lt;/P&gt;</description>
    <pubDate>Tue, 30 Oct 2018 17:44:49 GMT</pubDate>
    <dc:creator>peter_atkin</dc:creator>
    <dc:date>2018-10-30T17:44:49Z</dc:date>
    <item>
      <title>ABAP Debugger: Extract Dominator Tree Data into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749777#M36020</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
  &lt;P&gt;In the ABAP debugger we can see the data held in memory via the "Dominator Tree" (memory analysis tool).&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Is there a way to get this data into an internal table (similar to getting the call stack via cl_abap_compiler-&amp;gt;get_all_refs)?&lt;/P&gt;
  &lt;P&gt;Thanks in advance&lt;/P&gt;
  &lt;P&gt;PeteA&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 17:44:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749777#M36020</guid>
      <dc:creator>peter_atkin</dc:creator>
      <dc:date>2018-10-30T17:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Debugger: Extract Dominator Tree Data into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749778#M36021</link>
      <description>&lt;P&gt;OK, sort of found the answer myself.&lt;/P&gt;&lt;P&gt;Here’s two code
snippets to get the &lt;STRONG&gt;PROGRAMS&lt;/STRONG&gt; and &lt;STRONG&gt;ITAB-HEADS&lt;/STRONG&gt; data from the &lt;EM&gt;&lt;STRONG&gt;System Area &lt;/STRONG&gt;&lt;/EM&gt;screen tool in the debugger.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;*&amp;amp;------------------------------------------------------------&amp;amp;*
*&amp;amp; Get System Areas: PROGRAMS
*&amp;amp;-------------------------------------------------------------&amp;amp;*
data: begin of pxa occurs 0, 
head(5) type c, prog like help_info-program, 
rest(35) type c, 
end of pxa.

call 'SAPCORE' id 'ID' field 'PROGRAMS' 
id 'TABLE' field pxa-*sys*. 

*&amp;amp;-------------------------------------------------------------&amp;amp;*
*&amp;amp; Get System Areas: ITAB-HEADS
*&amp;amp;-------------------------------------------------------------&amp;amp;*
data: begin of lt_itab_heads occurs 0,  
num(8) type c,  
shm_vers_id(14) type c,  
tabhid(7) type c,  
name(57) type c,  
fill(10) type c,  
lines(5) type c,  
linesalloc(16) type c,  
label(5) type c,end of lt_itab_heads.

call 'SAPCORE' id 'ID' field 'ITAB-HEADS' 
               id 'TABLE' field itab-*sys*. &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;The pain is working out the internal
table structure. In the debugger you need to select the relevant &lt;EM&gt;system area&lt;/EM&gt; (in this example ITAB-HEADS), then manually work out the column sizes and plug it into the internal table definition. This is because the table below is a long text string!!!&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1709481-sys-area.jpg" /&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;Here's the result for the system area data in the LT_ITAB_HEADS internal table:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1709482-sys-area-2.jpg" /&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;PeteA&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jul 2019 16:42:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749778#M36021</guid>
      <dc:creator>peter_atkin</dc:creator>
      <dc:date>2019-07-22T16:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Debugger: Extract Dominator Tree Data into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749779#M36022</link>
      <description>&lt;P&gt;Officially, there are only the methods GET_TOTAL_USED_SIZE and GET_MEMORY_SIZE_OF_OBJECT of class CL_ABAP_MEMORY_UTILITIES. For more information, refer to the class documentation in the ABAP backend.&lt;/P&gt;&lt;P&gt;Unfortunately, they can't return the list of top variables.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 03:27:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749779#M36022</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2019-07-23T03:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Debugger: Extract Dominator Tree Data into Internal Table</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749780#M36023</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;Yup - I played around with these, but they only bring back aggregated information.&lt;/P&gt;&lt;P&gt;The solution above seems to work for any System Area object.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;PeteA&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2019 14:24:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-debugger-extract-dominator-tree-data-into-internal-table/m-p/749780#M36023</guid>
      <dc:creator>peter_atkin</dc:creator>
      <dc:date>2019-07-23T14:24:36Z</dc:date>
    </item>
  </channel>
</rss>

