Ansicht
Dokumentation
CACS00_SAMPLE_PRC_1100 - Additional Data from PD-Org
ROGBILLS - Synchronize billing plans RFUMSV00 - Advance Return for Tax on Sales/PurchasesThis documentation is copyright by SAP AG.
Issuing Messages / Documentation of Error
You should document the occurrence of an error as described in the Example below.
Status_Version is only changed if an error is found. The field must not be reset, otherwise the error documentation of the previous process steps is destroyed.
If an error occurs, it is absolutely necessary to write an error message in the log of the process (this error message has the same function as the parameter FLG_ERROR that exists in previous releases).
To find out whether an error message has already been issued in the process, the static method LOG_HAS_ERROR_MSG( ) of class CL_CACS_BAL_ST can be used. This method returns TRUE if a message of type A or E is written to the process log. If no log handle is specified at callup, the current default handle CACS_BUFFERLOG that is buffered in function group CACS_BUFFERLOG is examined. A query of the process status then looks like this: IF CL_CACS_BAL_ST=>LOG_HAS_ERROR_MSG( ) = TRUE.
Likewise, the static method LOG_HAS_ABEND_MSG( ) can be used for queries of message type A.
Example
INCLUDE CACS_GLOBDEF. " <= Include CS constants
IF <error situation exists>.
* Tell process that error exists, i.e. object is set to pending
* Select object line
c_meta_participation-status_version = statusvers_inconsistent.
* Convert parameter to types of MESSAGE module
sy-msgv1 = i_tri_meth_target.
sy-msgv2 = c_meta_participation-status_version.
* Allow message navigation with this query
IF 1 = 0.
MESSAGE e484(cacsib)
WITH i_tri_meth_target.
c_meta_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
C_META_INVESTIGATIONC_META_PARTICIPATION
E_FLG_ERROR
E_TRI_METH_TARGET
I_APPL
I_CASE_PREV
I_DOC_HEAD_PREV
I_FLG_ERROR
I_META_ACTIVITY
I_META_CASE
I_META_LINES
I_META_OBJECTDATA
I_TRI_METH_TARGET
Exceptions
Function Group
CACS00_SAMPLEGeneral Material Data RFUMSV00 - Advance Return for Tax on Sales/Purchases
This documentation is copyright by SAP AG.
Length: 3559 Date: 20240523 Time: 071842 sap01-206 ( 52 ms )