SAP Function Modules

TH_ERR_GET SAP Function module







TH_ERR_GET is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name TH_ERR_GET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: THFB
Released Date: 19.09.1994
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM TH_ERR_GET - TH ERR GET





CALL FUNCTION 'TH_ERR_GET' "
  IMPORTING
    call =                      "               Incorrect system call
    component =                 "               Component which reported the error
    counter =                   "               Error counter
    detail =                    "               Details
    errno =                     "               ERRNO
    errno_txt =                 "               ERRNO text
    error =                     "               Error description
    line =                      "               Line in which the error occured
    location =                  "               Where did the error occur
    module =                    "               Module in which the error occured
    rc =                        "               Return code
    release =                   "               SAP release of the component
    subrc =                     " sy-subrc      Return code of the function module
    time =                      "               Time at which the error occurred
    version =                   "               Version of the component
    .  "  TH_ERR_GET

ABAP code example for Function Module TH_ERR_GET





The ABAP code below is a full code listing to execute function module TH_ERR_GET including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
ld_call  TYPE STRING ,
ld_component  TYPE STRING ,
ld_counter  TYPE STRING ,
ld_detail  TYPE STRING ,
ld_errno  TYPE STRING ,
ld_errno_txt  TYPE STRING ,
ld_error  TYPE STRING ,
ld_line  TYPE STRING ,
ld_location  TYPE STRING ,
ld_module  TYPE STRING ,
ld_rc  TYPE STRING ,
ld_release  TYPE STRING ,
ld_subrc  TYPE SY-SUBRC ,
ld_time  TYPE STRING ,
ld_version  TYPE STRING .
CALL FUNCTION 'TH_ERR_GET' IMPORTING call = ld_call component = ld_component counter = ld_counter detail = ld_detail errno = ld_errno errno_txt = ld_errno_txt error = ld_error line = ld_line location = ld_location module = ld_module rc = ld_rc release = ld_release subrc = ld_subrc time = ld_time version = ld_version . " TH_ERR_GET
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_call  TYPE STRING ,
ld_component  TYPE STRING ,
ld_counter  TYPE STRING ,
ld_detail  TYPE STRING ,
ld_errno  TYPE STRING ,
ld_errno_txt  TYPE STRING ,
ld_error  TYPE STRING ,
ld_line  TYPE STRING ,
ld_location  TYPE STRING ,
ld_module  TYPE STRING ,
ld_rc  TYPE STRING ,
ld_release  TYPE STRING ,
ld_subrc  TYPE SY-SUBRC ,
ld_time  TYPE STRING ,
ld_version  TYPE STRING .

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name TH_ERR_GET or its description.