<?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: Read textpool from Method in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-textpool-from-method/m-p/2443340#M547068</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  I've looked into  your problem, and it appears to me, that the text elements are not stored at the method level but at the class level,  see this example program which tries to retrieve from both the class level as well as the method level, only the class level works.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zrich_001.




DATA includename TYPE program.
DATA class_name TYPE seoclsname.
DATA: comp TYPE seocpdkey.

DATA: itext TYPE TABLE OF textpool.
DATA: xtext LIKE LINE OF itext.



* At class level.

clear itext.
class_name = 'CL_GUI_FRONTEND_SERVICES'.
includename = cl_oo_classname_service=&amp;gt;get_classpool_name( class_name ).

READ TEXTPOOL includename INTO itext.

LOOP AT itext INTO xtext.
  WRITE:/ xtext-id, xtext-key, xtext-entry, xtext-length.
ENDLOOP.


* At method level

clear itext.
comp-clsname = 'CL_GUI_FRONTEND_SERVICES'.
comp-cpdname = 'FILE_OPEN_DIALOG'.
includename = cl_oo_classname_service=&amp;gt;get_method_include( comp ).

READ TEXTPOOL includename INTO itext.

LOOP AT itext INTO xtext.
  WRITE:/ xtext-id, xtext-key, xtext-entry, xtext-length.
ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you can see this in SE24, go to the class CL_GUI_FRONTEND_SERVICES and then to the method FILE_OPEN_DIALOG, then choose text elements from the main menu,  notice that it appears to take you to a screen which is only associated with the class name and not the method name.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2007 13:42:41 GMT</pubDate>
    <dc:creator>RichHeilman</dc:creator>
    <dc:date>2007-06-20T13:42:41Z</dc:date>
    <item>
      <title>Read textpool from Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-textpool-from-method/m-p/2443339#M547067</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;How do i get the textpool from a method? For reports i know its&lt;/P&gt;&lt;P&gt;"Read textpool prog into itab language lan."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but what do I have to use for 'prog' to get method-textpools? I tried the method-name and class-&amp;gt;method but nothing worked an i can´t find anything about it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you!!&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Andreas Buchmeier&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 12:45:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-textpool-from-method/m-p/2443339#M547067</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-20T12:45:32Z</dc:date>
    </item>
    <item>
      <title>Re: Read textpool from Method</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-textpool-from-method/m-p/2443340#M547068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,  I've looked into  your problem, and it appears to me, that the text elements are not stored at the method level but at the class level,  see this example program which tries to retrieve from both the class level as well as the method level, only the class level works.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;

REPORT zrich_001.




DATA includename TYPE program.
DATA class_name TYPE seoclsname.
DATA: comp TYPE seocpdkey.

DATA: itext TYPE TABLE OF textpool.
DATA: xtext LIKE LINE OF itext.



* At class level.

clear itext.
class_name = 'CL_GUI_FRONTEND_SERVICES'.
includename = cl_oo_classname_service=&amp;gt;get_classpool_name( class_name ).

READ TEXTPOOL includename INTO itext.

LOOP AT itext INTO xtext.
  WRITE:/ xtext-id, xtext-key, xtext-entry, xtext-length.
ENDLOOP.


* At method level

clear itext.
comp-clsname = 'CL_GUI_FRONTEND_SERVICES'.
comp-cpdname = 'FILE_OPEN_DIALOG'.
includename = cl_oo_classname_service=&amp;gt;get_method_include( comp ).

READ TEXTPOOL includename INTO itext.

LOOP AT itext INTO xtext.
  WRITE:/ xtext-id, xtext-key, xtext-entry, xtext-length.
ENDLOOP.


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And you can see this in SE24, go to the class CL_GUI_FRONTEND_SERVICES and then to the method FILE_OPEN_DIALOG, then choose text elements from the main menu,  notice that it appears to take you to a screen which is only associated with the class name and not the method name.&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;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2007 13:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-textpool-from-method/m-p/2443340#M547068</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2007-06-20T13:42:41Z</dc:date>
    </item>
  </channel>
</rss>

