Ansicht
Dokumentation
CACS00_SAMPLE_PRC_1003 - Different Remuneration Rate when Contract Rate = 0
ABAP Short Reference Addresses (Business Address Services)This documentation is copyright by SAP AG.
Document Error By Issuing a Message
The value of field Status_Version is only changed when an error is found.
- Do not reset the field as this will result in the loss of the error documentation from the previous process steps. If an error occurs during processing of the process, an error message must be written to the log of the process. To check whether an error message has already been generated in the process up to this point, you can use the following static method:
- LOG_HAS_ERROR_MSG( ) of class CL_CACS_BAL_ST
The method delivers TRUE if a message of type A (Abort) or E (Error) has been written to the log of the process. If no log handle is specified at call-up, the current default handle that is buffered in function group CACS_BUFFERLOG is examined.
A query of the process status then looks as follows:
IF CL_CACS_BAL_ST=>LOG_HAS_ERROR_MSG( ) = TRUE.
You can use the static method LOG_HAS_ABEND_MSG( ) to query messages of type A in the same way.
Example
You can document the occurrence of an error as in the following example:
INCLUDE CACS_GLOBDEF. " <= Include CS constants
IF <Error situation exists.>
* Tell process that an error exists, i.e. the object is set to pending
* Select object line
c_participation-status_version = statusvers_inconsistent.
* Convert parameter to types of MESSAGE modules
sy-msgv1 = i_case.
sy-msgv2 = c_participation-status_version.
* Allow message navigation with this query
IF 1 = 0.
MESSAGE e484(cacsib)
WITH i_case
c_participation-status_version.
ENDIF. " SE91
* Write message to log file
CALL FUNCTION 'MESSAGE_STORE_WITH_DISPLAY'
EXPORTING
arbgb = 'CACSIB'
msgty = 'E'
msgv1 = sy-msgv1
msgv2 = sy-msgv2
txtnr = '484'.
ENDIF.
Parameters
E_FLG_ERRORE_REM_LEDAMNT
E_REM_QUAN
E_REM_RATE
I_FLG_ERROR
I_META_DOC_REMUNERATION
I_REM_LEDAMNT
I_REM_QUAN
I_REM_RATE
Exceptions
Function Group
CACS00_SAMPLECPI1466 during Backup BAL Application Log Documentation
This documentation is copyright by SAP AG.
Length: 2731 Date: 20240523 Time: 061214 sap01-206 ( 48 ms )