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.
DATA:
template TYPE c LENGTH 30,
generated TYPE c LENGTH 30,
source TYPE TABLE OF string,
insertion TYPE TABLE OF string,
idx TYPE i,
mess TYPE string,
lin TYPE i,
wrd TYPE string.
template = '...'.
"Authority checks
...
READ REPORT template INTO source.
IF sy-subrc <(><<)>> 0.
RETURN.
ENDIF.
"Fill insertion
...
FIND '* insertion' IN TABLE source MATCH LINE idx.
DELETE source INDEX idx.
INSERT LINES OF insertion INTO source INDEX idx.
SYNTAX-CHECK FOR source MESSAGE mess LINE lin WORD wrd
PROGRAM template.
...
"Security checks
...
GENERATE SUBROUTINE POOL source NAME generated.
"Execution
...
Example ABAP Coding See also Program
Generation .
Runtime Exceptions
Catchable Exceptions
CX_SY_READ_SRC_LINE_TOO_LONG
Reason for error: At least one line of the source code is longer than the
rows of the internal table itab .
Runtime error: READ_REPORT_LINE_TOO_LONG
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved