DEFINE &TEXT& = 'Different Remuneration Rate when Contract Rate = 0' DEFINE &EVENT& = 'CACS1003' DEFINE &TYPE& = 'PRC' DEFINE &EVENTN& = '1003' INCLUDE CACS_BTE_DOCUMENTATION_PRC01 OBJECT DOKU ID TXDocument Error By Issuing a Message The value of field Status_Version> > is only changed when anerror is found. Abap_icon_excl Do not reset the field as this will result in the loss of the errordocumentation from the previous process steps. If an error occurs duringprocessing of the process, an error message must be written to the logof the process. To check whether an error message has already beengenerated in the process up to this point, you can use the followingstatic 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) hasbeen written to the log of the process. If no log handle is specified atcall-up, the current default handle that is buffered in function groupCACS_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 querymessages 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. INCLUDE ISIS_HELP_PORTAL_TOOLS_BTE OBJECT DOKU ID TX |