<?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: Search for text in function modules in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787845#M39746</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every function module is addressed by an include of the function group which it belongs. I guess it can be retrieved from the table &amp;lt;b&amp;gt;"TFDIR"&amp;lt;/b&amp;gt;. So, knowing this include name, you can use the report "RPR_ABAP_SOURCE_SCAN" passing the include name as the parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Oct 2004 19:47:22 GMT</pubDate>
    <dc:creator>ssimsekler</dc:creator>
    <dc:date>2004-10-26T19:47:22Z</dc:date>
    <item>
      <title>Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787844#M39745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day everyone...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am wondering if anyone knows of a report similar to RPR_ABAP_SOURCE_SCAN that can be used to search for a string of text in function modules.  RPR_ABAP_SOURCE_SCAN is great for searching through report programs for text, but I need to be able to expand this.  Maybe there is a better way to search both?  I have used RPR_ABAP_SOURCE_SCAN for so long that I am unaware of anything to do what I need now with function modules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2004 19:19:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787844#M39745</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-26T19:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787845#M39746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Every function module is addressed by an include of the function group which it belongs. I guess it can be retrieved from the table &amp;lt;b&amp;gt;"TFDIR"&amp;lt;/b&amp;gt;. So, knowing this include name, you can use the report "RPR_ABAP_SOURCE_SCAN" passing the include name as the parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--Serdar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2004 19:47:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787845#M39746</guid>
      <dc:creator>ssimsekler</dc:creator>
      <dc:date>2004-10-26T19:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787846#M39747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geoff,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Function module belongs to a function group. Function group starts with SAPLxxx, where xxx is the function group name. When you run RPR_ABAP_SOURCE_SCAN, you can enter the full program name of the function group SAPLxxx and set the program type as 'F'.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Oct 2004 20:16:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787846#M39747</guid>
      <dc:creator>nablan_umar</dc:creator>
      <dc:date>2004-10-26T20:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787847#M39748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do much more than that.You can read the source code and pass it to SCAN statement which will break the code in tokens and return values in internal table and then you can do search whichever way you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2004 01:38:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787847#M39748</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-27T01:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787848#M39749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot for the help...Got the scan program to work with the SAPLZxxx function groups and program type F as specified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2004 12:30:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787848#M39749</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-27T12:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Search for text in function modules</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787849#M39750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here a programm I used some years ago to search for strings in abap source code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works in 2 steps:&lt;/P&gt;&lt;P&gt;1) create list of sources from TRDIR into file(s)&lt;/P&gt;&lt;P&gt;2) walk thru list of sources and scan for strings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2 may run in parallel on lists of disjunct source name ranges&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No guarantee that it still works, no support. &lt;/P&gt;&lt;P&gt;Have lots of fun with it. &lt;/P&gt;&lt;P&gt;Guenter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; Report  ZASRCH01                                                    *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*&amp;amp; search for occurrance of strings in ABAP sources                    *&lt;/P&gt;&lt;P&gt;*&amp;amp;                                                                     *&lt;/P&gt;&lt;P&gt;*&amp;amp; parameters:                                                         *&lt;/P&gt;&lt;P&gt;*&amp;amp; str_1 ... str_n: strings to be searched, AND combined               *&lt;/P&gt;&lt;P&gt;*&amp;amp; repname:         for TRDIR select like                              *&lt;/P&gt;&lt;P&gt;*&amp;amp; infile:          list of reports to be scanned, TRDIR is default    *&lt;/P&gt;&lt;P&gt;*&amp;amp; outfile:         list of reports where strings are contained        *&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;amp;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZASRCH01.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;parameters: str_1(40), str_2(40), str_3(40), str_4(40).&lt;/P&gt;&lt;P&gt;parameters: repname(40).&lt;/P&gt;&lt;P&gt;parameters: infile(40)   default '&amp;amp;TRDIR&amp;amp;'.&lt;/P&gt;&lt;P&gt;parameters: outfile(40)  default 'ZASRCH01_RESULT_1'.&lt;/P&gt;&lt;P&gt;parameters: progfile(40) default 'ZASRCH01_PROGRESS_1'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: trdir.&lt;/P&gt;&lt;P&gt;data: begin of my_trdir occurs 0, name like trdir-name, end of my_trdir.&lt;/P&gt;&lt;P&gt;TYPES:BEGIN OF T_TYPE, LINE(80), END OF T_TYPE.&lt;/P&gt;&lt;P&gt;DATA: PROGRAM LIKE SY-REPID VALUE 'PROGNAME',&lt;/P&gt;&lt;P&gt;      T TYPE STANDARD TABLE OF T_TYPE WITH&lt;/P&gt;&lt;P&gt;             NON-UNIQUE DEFAULT KEY INITIAL SIZE 500.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: str_num type i, str_found type i, loopcount type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- get report names ... ---&lt;/P&gt;&lt;P&gt;if infile = '&amp;amp;TRDIR&amp;amp;'.&lt;/P&gt;&lt;P&gt;*--- ... from TRDIR ---&lt;/P&gt;&lt;P&gt;  if repname &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;    select * from trdir where name like repname.&lt;/P&gt;&lt;P&gt;      my_trdir = trdir. append my_trdir.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;  else.&lt;/P&gt;&lt;P&gt;    select * from trdir.&lt;/P&gt;&lt;P&gt;      my_trdir = trdir. append my_trdir.&lt;/P&gt;&lt;P&gt;    endselect.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  open dataset infile for input in text mode encoding UTF-8. "???&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    open dataset infile for input in text mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--- from input file ---&lt;/P&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    read dataset infile into my_trdir.&lt;/P&gt;&lt;P&gt;    if sy-subrc &amp;lt;&amp;gt; 0. exit. endif.&lt;/P&gt;&lt;P&gt;    append my_trdir.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;open dataset outfile  for output in text mode encoding UTF-8. "???&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;open dataset progfile for output in text mode encoding UTF-8. "???&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;open dataset outfile  for output in text mode.&lt;/P&gt;&lt;P&gt;open dataset progfile for output in text mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;loop over selected reports, scan for strings&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;loop at my_trdir.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  loopcount = loopcount + 1.&lt;/P&gt;&lt;P&gt;  if loopcount &amp;gt; 1000.&lt;/P&gt;&lt;P&gt;     loopcount = 0. commit work.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  transfer my_trdir-name to progfile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  refresh T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  READ REPORT my_trdir-name INTO T.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  str_num   = 0. str_found = 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  perform search_in_record using str_1.&lt;/P&gt;&lt;P&gt;  perform search_in_record using str_2.&lt;/P&gt;&lt;P&gt;  perform search_in_record using str_3.&lt;/P&gt;&lt;P&gt;  perform search_in_record using str_4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   if str_num &amp;gt; 0 and str_found &amp;gt;= str_num.&lt;/P&gt;&lt;P&gt;      write: / my_trdir-name.                "??? eliminate ???&lt;/P&gt;&lt;P&gt;      transfer my_trdir-name to outfile.&lt;/P&gt;&lt;P&gt;   endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;  form for scanning a single source   *&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="----------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;form search_in_record using str.&lt;/P&gt;&lt;P&gt;  if str &amp;lt;&amp;gt; space.&lt;/P&gt;&lt;P&gt;    str_num = str_num + 1.&lt;/P&gt;&lt;P&gt;    search t for str.&lt;/P&gt;&lt;P&gt;    if sy-subrc = 0.&lt;/P&gt;&lt;P&gt;      str_found = str_found + 1.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  endif.&lt;/P&gt;&lt;P&gt;endform.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Oct 2004 15:00:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/search-for-text-in-function-modules/m-p/787849#M39750</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2004-10-27T15:00:07Z</dc:date>
    </item>
  </channel>
</rss>

