SAP TH_ENQUEUE_PERF Function Module for
TH_ENQUEUE_PERF is a standard th enqueue perf SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for th enqueue perf FM, simply by entering the name TH_ENQUEUE_PERF into the relevant SAP transaction such as SE37 or SE38.
Function Group: THFB_RESTRICTED
Program Name: SAPLTHFB_RESTRICTED
Main Program: SAPLTHFB_RESTRICTED
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function TH_ENQUEUE_PERF pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'TH_ENQUEUE_PERF'".
EXPORTING
OPCODE = "
* STRING = "
* ANZAHL = "
* VERSION = "
IMPORTING
FB_RUNTIME0 = "
FB_RUNTIME1 = "
FB_RUNTIME2 = "
TABLES
* RESULT = "
EXCEPTIONS
NOT_AUTHORIZED = 1 UNKNOWN_OPCODE = 2 ILLEGAL_VERSION = 3 NO_ENQHIS_FILE = 4 ENQID_ERROR = 5 ENQUEUE_READ_FAILURE = 6 ENQUEUE_INTERNAL_ERROR = 7
IMPORTING Parameters details for TH_ENQUEUE_PERF
OPCODE -
Data type: THSTRINGOptional: No
Call by Reference: No ( called with pass by value option)
STRING -
Data type: THSTRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
ANZAHL -
Data type: IOptional: Yes
Call by Reference: No ( called with pass by value option)
VERSION -
Data type: THSTRINGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TH_ENQUEUE_PERF
FB_RUNTIME0 -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
FB_RUNTIME1 -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
FB_RUNTIME2 -
Data type: IOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for TH_ENQUEUE_PERF
RESULT -
Data type: THGREPOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NOT_AUTHORIZED -
Data type:Optional: No
Call by Reference: Yes
UNKNOWN_OPCODE -
Data type:Optional: No
Call by Reference: Yes
ILLEGAL_VERSION -
Data type:Optional: No
Call by Reference: Yes
NO_ENQHIS_FILE -
Data type:Optional: No
Call by Reference: Yes
ENQID_ERROR -
Data type:Optional: No
Call by Reference: Yes
ENQUEUE_READ_FAILURE -
Data type:Optional: No
Call by Reference: Yes
ENQUEUE_INTERNAL_ERROR -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TH_ENQUEUE_PERF Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than 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 newer method of declaring data variables on the fly. 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), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_opcode | TYPE THSTRING, " | |||
| lt_result | TYPE STANDARD TABLE OF THGREP, " | |||
| lv_fb_runtime0 | TYPE I, " | |||
| lv_not_authorized | TYPE I, " | |||
| lv_string | TYPE THSTRING, " | |||
| lv_fb_runtime1 | TYPE I, " | |||
| lv_unknown_opcode | TYPE I, " | |||
| lv_anzahl | TYPE I, " | |||
| lv_fb_runtime2 | TYPE I, " | |||
| lv_illegal_version | TYPE I, " | |||
| lv_version | TYPE THSTRING, " | |||
| lv_no_enqhis_file | TYPE THSTRING, " | |||
| lv_enqid_error | TYPE THSTRING, " | |||
| lv_enqueue_read_failure | TYPE THSTRING, " | |||
| lv_enqueue_internal_error | TYPE THSTRING. " |
|   CALL FUNCTION 'TH_ENQUEUE_PERF' " |
| EXPORTING | ||
| OPCODE | = lv_opcode | |
| STRING | = lv_string | |
| ANZAHL | = lv_anzahl | |
| VERSION | = lv_version | |
| IMPORTING | ||
| FB_RUNTIME0 | = lv_fb_runtime0 | |
| FB_RUNTIME1 | = lv_fb_runtime1 | |
| FB_RUNTIME2 | = lv_fb_runtime2 | |
| TABLES | ||
| RESULT | = lt_result | |
| EXCEPTIONS | ||
| NOT_AUTHORIZED = 1 | ||
| UNKNOWN_OPCODE = 2 | ||
| ILLEGAL_VERSION = 3 | ||
| NO_ENQHIS_FILE = 4 | ||
| ENQID_ERROR = 5 | ||
| ENQUEUE_READ_FAILURE = 6 | ||
| ENQUEUE_INTERNAL_ERROR = 7 | ||
| . " TH_ENQUEUE_PERF | ||
ABAP code using 7.40 inline data declarations to call FM TH_ENQUEUE_PERF
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects