<?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: Function Module that it brings all the lines of a program code. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337115#M171043</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Did you try READ REPORT and READ TEXTPOOL options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 May 2006 23:53:35 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-05-26T23:53:35Z</dc:date>
    <item>
      <title>Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337113#M171041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, please, i´am looking for a function module that it brings all the lines of a program code, this lines could be in an internal table. Do you know some FM ?.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2006 21:51:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337113#M171041</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-26T21:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337114#M171042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use 'RS_DETERMINE_OBJECT_SOURCE'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suresh Datti&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2006 22:28:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337114#M171042</guid>
      <dc:creator>suresh_datti</dc:creator>
      <dc:date>2006-05-26T22:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337115#M171043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Did you try READ REPORT and READ TEXTPOOL options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Cheers&lt;/P&gt;&lt;P&gt; VJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 May 2006 23:53:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337115#M171043</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-26T23:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337116#M171044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rafael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is from ABAP Help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
READ - Read a program 


Basic form 
READ REPORT prog INTO itab. 



Addition: 
1. ... STATE state 2. ... MAXIMUM WIDTH INTO w 



Effect 
Reads the program prog from the database into the internal table itab. The line length of table itab should be at least 72 characters. 


The Return Code is set as follows: 


SY-SUBRC = 0: 
Program was read. 
SY-SUBRC = 4: 
Program could not be read because it does not exist. 
SY-SUBRC = 8: 
Program could not be read because it is a security-critical system program and therefore protected against read access. 


Example
TYPES: BEGIN OF T_TYPE, 
         LINE(72), 
       END OF T_TYPE. 
DATA: PROGRAM LIKE SY-REPID VALUE 'PROGNAME', 
      T TYPE STANDARD TABLE OF T_TYPE WITH 
             NON-UNIQUE DEFAULT KEY INITIAL SIZE 500. 

READ REPORT PROGRAM INTO T. 
IF SY-SUBRC &amp;lt;&amp;gt; 0. 
  ... 
ENDIF. 



Addition 
... STATE state 


Note 
This addition is intended for internal use. SAP reserves the right to make changes, which may be incompatible, at any time. 



Effect 
Programs can be saved in the library in their "active" or "inactive" form. This addition determines which state of the program 'prog' should be read. state may have the values A for active, or I for inactive. Inactive programs are only visible to the user currently working with them. All other users work with the active version of the program. 



In the ABAP Workbench, you can define a list of objects being edited by each user. These programs are saved in their inactive form until they are activated. If you omit the STATE addition, the system automatically reads the inactive form of these programs, and the active form of all other programs. 

Since this set of programs is only ever available at short notice within the ABAP Workbench, you can always be sure that other programs using the READ REPORT statement without the STATE addtion will always read "active" reports. 



Addition 2 
... MAXIMUM WIDTH INTO w 


Effect 
After the program has been read successfully from the library, w is filled with the length of the longest line of the source text, in characters. 



Exceptions 
Non-Catchable Exceptions 



Cause: state has another value than A or I. 
Runtime Error: INSERT_REPORT_ILLEGAL_STATE 

Cause: At least one line of the source text is longer than the lines of the internal table itab. 
Runtime Error: READ_REPORT_LINE_TOO_LONG 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;lt;b&amp;gt;&lt;/P&gt;&lt;P&gt;Reward points if it helps.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amit Mishra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 May 2006 03:21:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337116#M171044</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-27T03:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337117#M171045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check out the program 'RPR_ABAP_SOURCE_SCAN'.&lt;/P&gt;&lt;P&gt;and the FM: 'SCWB_GET_ABAP_CODE_OF_OBJECT'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;latheesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 May 2006 06:45:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337117#M171045</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-27T06:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: Function Module that it brings all the lines of a program code.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337118#M171046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'RS_DETERMINE_OBJECT_SOURCE'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plz reward points and close the therad&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;gunjan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 May 2006 13:35:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/function-module-that-it-brings-all-the-lines-of-a-program-code/m-p/1337118#M171046</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-05-28T13:35:57Z</dc:date>
    </item>
  </channel>
</rss>

