Fonction SAP CACS00_SAMPLE_PRC_2003 - Read Data and Inbound Checks of Documents

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
I_APPL CACSAPPL C 6 Commission Application Identification
I_DOC_HEAD CACS00_DOCHD u 547 Commission Document Header
I_DOC_HEAD_PREV CACS00_DOCHD u 547 Commission Document Header
I_TRI_METH_TARGET CACS00_DOCHD-TRI_METH_TARGET C 1 Processing Target of Triggering Method

Paramètre Reférence Type Long. Description
E_DOC_HEAD CACS00_DOCHD u 547 Commission Document Header
E_TRI_METH_TARGET CACS00_DOCHD-TRI_METH_TARGET C 1 Processing Target of Triggering Method

Paramètre Reférence Long. Facultatif Description
C_DOC_REMDETAIL CACS00_DOCDT 113 Comn: Detail Items for Remuneration Rows
C_DOC_REMUNERATION CACS00_DOCRE 368 Commission Document, Remuneration and Liability
C_DOC_SETTLEMENT CACS00_DOCSE 202 Commission Document: Due Dates
C_DOC_VALUATION CACS00_DOCVA 138 Commission Document, Valuation


DEFINE &TEXT& = 'Read Data and Inbound Checks of Documents'
DEFINE &EVENT& = 'CACS2003'
DEFINE &TYPE& = 'PRC'
INCLUDE CACS_BTE_DOCUMENTATION_PRC01 OBJECT DOKU ID TX

Issuing Messages / Documentation of Error
You should document the occurrence of an error as described in the Example below.
Abap_icon_exclstatus_version is only changed if an error is found. thefield must not be reset, otherwise the error documentation of theprevious process steps is destroyed.
If an error occurs, it is absolutely necessary to write an error messagein the log of the process (this error message has the same function asthe parameter FLG_ERROR that exists in previous releases).
To find out whether an error message has already been issued in theprocess, the static method LOG_HAS_ERROR_MSG( ) of class CL_CACS_BAL_STcan be used. This method returns TRUE if a message of type A or E iswritten to the process log. If no log handle is specified at callup, thecurrent default handle CACS_BUFFERLOG that is buffered in function groupCACS_BUFFERLOG is examined. A query of the process status then lookslike this: IF CL_CACS_BAL_ST=>LOG_HAS_ERROR_MSG( ) = TRUE.
Likewise, the static method LOG_HAS_ABEND_MSG( ) can be used for queriesof 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_doc_remuneration-status_version = statusvers_inconsistent.
* Convert parameter to types of MESSAGE module
sy-msgv1 = i_tri_meth_target.
sy-msgv2 = c_doc_remuneration-status_version
* Enable message navigation with this query
IF 1 = 0.
MESSAGE e484(cacsib)
WITH i_tri_meth_target
c_doc_remuneration-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