Get Example source ABAP code based on a different SAP table
• READ REPORT ABAP Statement • INTO READ REPORT
READ REPORT> Short Reference >
ABAP_SYNTAX READ REPORT prog INTO itab $[MAXIMUM WIDTH INTO wid$].>
ABAP Addition ... MAXIMUM WIDTH INTO wid>
What does it do? This statement reads the source code of the program specified in prog> from the repository> and copies its lines into the internal table itab>. The previous content of itab> is deleted. If the program cannot be loaded, the content of itab> remains unchanged. By default, the source code of the active version of the program is read. prog> expects a flat> character-like data object, which contains the name of the program to be read. The name is not case-sensitive. The internal table itab> must be a standard table> without secondary table keys> with a character-like line type. When the line length of the internal table is fixed, it must be long enough for the longest program line. Program lines that are too long raise a catchable exception. In the case of the line type string>, the length of each line depends on the length of the imported program line. An empty program line produces an empty string. System Fields> sy-subrc>>Meaning> 0The program was imported. 4The specified program was not found in the repository. 8The specified program is a system program protected against reads.
Latest notes:
A precise working knowledge of the programs' structures and names is vital if the statement READ REPORT> is used for programs organized in a master program> and with