ABAPGENERATE_SUBR_ERROR_HANDLING - GENERATE SUBR ERROR HANDLING
RFUMSV00 - Advance Return for Tax on Sales/Purchases TXBHW - Original Tax Base Amount in Local CurrencyThis documentation is copyright by SAP AG.
GENERATE SUBROUTINE POOL - error_handling
Syntax
... [MESSAGE mess]
[INCLUDE incl]
[LINE lin]
[WORD wrd]
[OFFSET off]
[MESSAGE-ID mid]
[SHORTDUMP-ID sid] ... .
Additions
1. ... MESSAGE mess
2. ... INCLUDE incl
3. ... LINE lin
4. ... WORD wrd
5. ... OFFSET off
6. ... MESSAGE-ID mid
7. ... SHORTDUMP-ID sid
Effect
: These additions can be used to analyze syntax and generation errors of the statement GENERATESUBROUTINE POOL. Syntax errors can either arise in the source code specified in itab, or in theIncludeprograms integrated using the statement INCLUDE.Generation errors can occur if the program contains errors in declaration statements that are not recognized in the static syntax check (among other causes).
Addition 1
... MESSAGE mess
Effect
: If the subroutine pool contains one or more syntax errors, the text of the error message for the first syntax error is assigned to the variable mess. mess must be a character-type data object.
If a generation error occurs (see the addition SHORTDUMP-ID), mess is also populated withthe corresponding error message. If the subroutine pool can be generated, the content of mess remains unchanged.
Addition 2
... INCLUDE incl
Effect
: If one or more Include programs are included in the subroutine pool and one of these contains thefirst syntax error of the subroutine pool, the name of this Include program is assigned to the variableincl. incl must be a character-type data object. If the first syntax error in the sourcecode occurs in itab, incl is assigned the internal name that would have been returned if generation in prog had been successful. This name always begins with "%_".
If a generation error occurs (see the addition SHORTDUMP-ID), incl is also populated with the name of the correspondingIncludeprogram. If the subroutine pool can be generated, the content of incl is not changed.
Addition 3
... LINE lin
Effect
: If the subroutine pool contains one or more syntax errors, the line number of the first syntax error,with reference to the program in which it occurs (either the source code in itab or an integrated Include program), is assigned to the variable lin. For lin, the data type i is expected.
If a generation error occurs (see the addition SHORTDUMP-ID), lin is also populated with the corresponding line number. If the subroutine pool can be generated, the content of lin is not changed.
Addition 4
... WORD wrd
Effect
: If the subroutine pool contains one or more syntax errors, the first token with errors is assigned to the variable wrd. wrd must be a character-type data object.
If a generation error occurs (see the addition SHORTDUMP-ID), wrd is also populated withthe corresponding token. If the subroutine pool cannot be generated, the content of wrd is not changed.
Addition 5
... OFFSET off
Effect
: If the subroutine pool contains one or more syntax errors, the offset of the first token with errors,with reference to the line in the source code, is assigned to the variable off. For off, the data type i is expected.
If a generation error occurs (see the addition SHORTDUMP-ID), off is also populated with the corresponding offset. If the subroutine pool can be generated, the content of off is not changed.
Addition 6
... MESSAGE-ID mid
Effect
: If the subroutine pool contains one or more syntax errors, the key under which the first error message is stored in the database tableTRMSG is assigned to the variable mid.
If a generation error occurs (see the addition SHORTDUMP-ID), mid is also populated with the corresponding key. If the subroutine pool can be generated, the content of mid is not changed.
The key of the database table TRMSG consists of the components SPRAS of length 1, KEYWORD of length20, and MSGNUMBER of length 4. The component MSGNUMBER is used to receive a three-character ID. Thefourth character can either contain a blank character or a letter. For error messages with several partsthat occupy more than one line in the database table TRMSG, all parts have the same three-character ID, while the fourth character indicates a part of the message.
In Unicode programs, mid must have the data typeTRMSG_KEY from the ABAP Dictionary. This type is made up of the components SPRAS of length 1, KEYWORD of length 20, and MSGNUMBER of length 3. Innon-Unicode programs , an appropriate structure or aflat character-type data object can be specified.
Note
: The return value in mid only contains the three-character ID of a syntax error message. Forexample, in order to use SELECT to select all parts of an error message from the table TRMSG,the key component MSGNUMBER must be generically specified in the WHEREcondition, e.g. withLIKE when using the wildcard character "%".
Addition 7
... SHORTDUMP-ID sid
Effect
: If the subroutine pool does not contains any statically recognizable syntax errors but an exceptionoccurs during the generation, the ID of the runtime error that is assigned to the exception, is assignedto the variable sid. sid must be a character-type data object. If the subroutine pool can be generated, the content of sid is not changed.
Notes
- : An exception during generation interrupts the generation, but does not lead to the termination of the program. The runtime error is handled internally, but it still causes adatabase rollback and theshort dump is saved.
- The IDs of runtime errors are contained in the key column ERRID of the database table SNAPT, in which texts are assigned to them.
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up General Data in Customer Master
This documentation is copyright by SAP AG.
Length: 9346 Date: 20120522 Time: 061713 triton ( 264 ms )






