We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
This statement is for internal use only.
It must not be used in application programs.
GENERATE REPORT prog $[error_handling$].
1. ... MESSAGE f1
2. ... INCLUDE f2
3. ... LINE f3
4. ... WORD f4
5. ... OFFSET f5
6. ... TRACE-FILE f6
7. ... DIRECTORY ENTRY f7
8. ... WITHOUT SELECTION-SCREEN
9. ... MESSAGE-ID f8
10.... SHORTDUMP-ID f9
11.... WITH PRECOMPILED HEADERS
12.... WITH TEST CODE
The program specified in the prog field is generated in the current work process. If the program is an executable program, that is, a program of internal type 1, the selection screen is also generated automatically.
For the syntax check, the switch configuration of Switch Framework is used in its current status when the statement is executed.
SY-SUBRC = 0:
SY-SUBRC <> 0:
SY-SUBRC = 4:
SY-SUBRC = 8:
SY-SUBRC = 16:
If a runtime error occurs during generation (sy-subrc has the value 8 or 16), a database rollback is executed as usual.
... MESSAGE f1
When a syntax error occurs, the error message is stored in this field.
... INCLUDE f2
When a syntax error occurs, the name of the include program in which the error occurred is stored in this field.
... LINE f3
When a syntax error occurs, the number of the incorrect line is stored in this field.
... WORD f4
When a syntax error occurs, the incorrect word is stored in this field.
... OFFSET f5
When a syntax error occurs, the position of the incorrect word in the incorrect line is stored in this field.
... TRACE-FILE f6
Trace output is stored in this file. This addition automatically activates trace mode.
... DIRECTORY ENTRY f7
The program attributes required for checking are read from field f7. This field must match the structure of table TRDIR.
... WITHOUT SELECTION-SCREEN
The selection screen is not generated.
... MESSAGE-ID f8
If a syntax error occurs, the key of the corresponding error message is returned in field f8. This key has the same structure as the key of table TRMSG.
... SHORTDUMP-ID f9
If a short dump
occurs, the key of the corresponding short dump is returned in the f9 field. This key has a maximum length of 30 characters.
... WITH PRECOMPILED HEADERS
This addition allows precompiled headers to be regenerated when generating the ABAP program prog.
Precompiled headers are used to increase the translation speed of the ABAP Compiler by buffering the declaration data of global classes, interfaces, and
type pools in formatted form for the ABAP Compiler.
If this addition is used, it must be ensured that the application performs a COMMIT
WORK or ROLLBACK WORK within a short period of time. This ensures that the
that are set when the precompiled headers are regenerated, are held for a short time only and therefore do not block generation of other ABAP programs.
... WITH TEST CODE