Ansicht
Dokumentation
ABAPREAD_REPORT - READ REPORT
General Data in Customer Master RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
READ REPORT
READ REPORT prog INTO itab $[MAXIMUM WIDTH INTO wid$].
Addition:
Effect
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 |
0 | The program was imported. |
4 | The specified program was not found in the repository. |
8 | The specified program is a system program protected against reads. |
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 include programs when they were created in the ABAP Workbench.
- The names of the master programs for class pools and
function pools
do not match the names of the global class or function pool (see statements CLASS-POOL
and FUNCTION-POOL).
Example
After a program is imported into an internal table source, a dedicated line is replaced by different
source code from another internal table insertion. After a syntax check, a subroutine pool is generated from the modified program. The required security checks are indicated by comments.
Addition
... MAXIMUM WIDTH INTO wid
Effect
If the addition MAXIMUM WIDTH is used, the number of characters of the longest imported source code line is assigned to the variable wid, which expects the data type i.
Example
The following program determines the widest and narrowest source code in the programs of a package stored in the database table TADIR
Exceptions
Catchable Exceptions
- Cause: At least one line of the source code is longer than the lines of the internal table itab.
Runtime Error: READ_REPORT_LINE_TOO_LONG
Fill RESBD Structure from EBP Component Structure CPI1466 during Backup
This documentation is copyright by SAP AG.
Length: 5156 Date: 20240425 Time: 163457 sap01-206 ( 76 ms )