ENQUEUE_EHAP_DOC 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 ENQUEUE_EHAP_DOC into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
DWBEN/SAPLPEN0000
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'ENQUEUE_EHAP_DOC' "Request lock for object EHAP_DOC
* EXPORTING
* mode_hrhap = 'E' " enqmode Lock mode for table HRHAP
* mode_hrhap_appee = 'E' " enqmode Lock mode for table HRHAP_APPEE
* mode_hrhap_apper = 'E' " enqmode Lock mode for table HRHAP_APPER
* mode_hrhap_basic = 'E' " enqmode Lock mode for table HRHAP_BASIC
* mode_hrhap_process = 'E' " enqmode Lock mode for table HRHAP_PROCESS
* mode_hrhap_p_apper = 'E' " enqmode Lock mode for table HRHAP_P_APPER
* mode_hrhap_t = 'E' " enqmode Lock mode for table HRHAP_T
* mode_hrhap_others = 'E' " enqmode Lock mode for table HRHAP_OTHERS
* mode_hrhap_final = 'E' " enqmode Lock mode for table HRHAP_FINAL
* mode_hrhap_further = 'E' " enqmode Lock mode for table HRHAP_FURTHER
* mode_hrhap_object = 'E' " enqmode Lock mode for table HRHAP_OBJECT
* mode_hrhap_part = 'E' " enqmode Lock mode for table HRHAP_PART
* mandt = SY-MANDT " hrhap-mandt 01th enqueue argument
* plan_version = " hrhap-plan_version 02th enqueue argument
* appraisal_id = " hrhap-appraisal_id 03th enqueue argument
* x_plan_version = SPACE " Fill argument 02 with initial value?
* x_appraisal_id = SPACE " Fill argument 03 with initial value?
* _scope = '2' "
* _wait = SPACE "
* _collect = ' ' " ddenqcoll Initially only collect lock
EXCEPTIONS
FOREIGN_LOCK = 1 " Object already locked
SYSTEM_FAILURE = 2 " Internal error from enqueue server
. " ENQUEUE_EHAP_DOC
The ABAP code below is a full code listing to execute function module ENQUEUE_EHAP_DOC 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_mode_hrhap) = 'Check type of data required'.
DATA(ld_mode_hrhap_appee) = 'Check type of data required'.
DATA(ld_mode_hrhap_apper) = 'Check type of data required'.
DATA(ld_mode_hrhap_basic) = 'Check type of data required'.
DATA(ld_mode_hrhap_process) = 'Check type of data required'.
DATA(ld_mode_hrhap_p_apper) = 'Check type of data required'.
DATA(ld_mode_hrhap_t) = 'Check type of data required'.
DATA(ld_mode_hrhap_others) = 'Check type of data required'.
DATA(ld_mode_hrhap_final) = 'Check type of data required'.
DATA(ld_mode_hrhap_further) = 'Check type of data required'.
DATA(ld_mode_hrhap_object) = 'Check type of data required'.
DATA(ld_mode_hrhap_part) = 'Check type of data required'.
SELECT single MANDT
FROM HRHAP
INTO @DATA(ld_mandt).
SELECT single PLAN_VERSION
FROM HRHAP
INTO @DATA(ld_plan_version).
SELECT single APPRAISAL_ID
FROM HRHAP
INTO @DATA(ld_appraisal_id).
DATA(ld_x_plan_version) = 'some text here'.
DATA(ld_x_appraisal_id) = 'some text here'.
DATA(ld__scope) = 'some text here'.
DATA(ld__wait) = 'some text here'.
DATA(ld__collect) = 'Check type of data required'. . CALL FUNCTION 'ENQUEUE_EHAP_DOC' * EXPORTING * mode_hrhap = ld_mode_hrhap * mode_hrhap_appee = ld_mode_hrhap_appee * mode_hrhap_apper = ld_mode_hrhap_apper * mode_hrhap_basic = ld_mode_hrhap_basic * mode_hrhap_process = ld_mode_hrhap_process * mode_hrhap_p_apper = ld_mode_hrhap_p_apper * mode_hrhap_t = ld_mode_hrhap_t * mode_hrhap_others = ld_mode_hrhap_others * mode_hrhap_final = ld_mode_hrhap_final * mode_hrhap_further = ld_mode_hrhap_further * mode_hrhap_object = ld_mode_hrhap_object * mode_hrhap_part = ld_mode_hrhap_part * mandt = ld_mandt * plan_version = ld_plan_version * appraisal_id = ld_appraisal_id * x_plan_version = ld_x_plan_version * x_appraisal_id = ld_x_appraisal_id * _scope = ld__scope * _wait = ld__wait * _collect = ld__collect EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 . " ENQUEUE_EHAP_DOC
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ENDIF.
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_mode_hrhap | TYPE ENQMODE , |
| ld_mode_hrhap_appee | TYPE ENQMODE , |
| ld_mode_hrhap_apper | TYPE ENQMODE , |
| ld_mode_hrhap_basic | TYPE ENQMODE , |
| ld_mode_hrhap_process | TYPE ENQMODE , |
| ld_mode_hrhap_p_apper | TYPE ENQMODE , |
| ld_mode_hrhap_t | TYPE ENQMODE , |
| ld_mode_hrhap_others | TYPE ENQMODE , |
| ld_mode_hrhap_final | TYPE ENQMODE , |
| ld_mode_hrhap_further | TYPE ENQMODE , |
| ld_mode_hrhap_object | TYPE ENQMODE , |
| ld_mode_hrhap_part | TYPE ENQMODE , |
| ld_mandt | TYPE HRHAP-MANDT , |
| ld_plan_version | TYPE HRHAP-PLAN_VERSION , |
| ld_appraisal_id | TYPE HRHAP-APPRAISAL_ID , |
| ld_x_plan_version | TYPE STRING , |
| ld_x_appraisal_id | TYPE STRING , |
| ld__scope | TYPE STRING , |
| ld__wait | TYPE STRING , |
| ld__collect | TYPE DDENQCOLL . |
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 ENQUEUE_EHAP_DOC or its description.
ENQUEUE_EHAP_DOC - Request lock for object EHAP_DOC ENQUEUE_EHAP_CAT_GROUP - Request lock for object EHAP_CAT_GROUP ENQUEUE_EHAP_CAT - Request lock for object EHAP_CAT ENQUEUE_EHAP_ANON_DOC - Request lock for object EHAP_ANON_DOC ENQUEUE_EGYYR_C - Request lock for object EGYYR_C ENQUEUE_EGYYREP - Request lock for object EGYYREP