SAP Function Modules

ENQUEUE_EHAP_PART_DOC SAP Function module - Request lock for object EHAP_PART_DOC







ENQUEUE_EHAP_PART_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_PART_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
Normal function module settings


Pattern for FM ENQUEUE_EHAP_PART_DOC - ENQUEUE EHAP PART DOC





CALL FUNCTION 'ENQUEUE_EHAP_PART_DOC' "Request lock for object EHAP_PART_DOC
* EXPORTING
*   mode_hrhap_p_apper = 'E'    " enqmode       Lock mode for table HRHAP_P_APPER
*   mode_hrhap_part = 'E'       " enqmode       Lock mode for table HRHAP_PART
*   mandt = SY-MANDT            " hrhap_p_apper-mandt  01th enqueue argument
*   plan_version =              " hrhap_p_apper-plan_version  02th enqueue argument
*   appraisal_id =              " hrhap_p_apper-appraisal_id  03th enqueue argument
*   part_ap_id =                " hrhap_p_apper-part_ap_id  04th enqueue argument
*   x_plan_version = SPACE      "               Fill argument 02 with initial value?
*   x_appraisal_id = SPACE      "               Fill argument 03 with initial value?
*   x_part_ap_id = SPACE        "               Fill argument 04 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_PART_DOC

ABAP code example for Function Module ENQUEUE_EHAP_PART_DOC





The ABAP code below is a full code listing to execute function module ENQUEUE_EHAP_PART_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_p_apper) = 'Check type of data required'.
DATA(ld_mode_hrhap_part) = 'Check type of data required'.

SELECT single MANDT
FROM HRHAP_P_APPER
INTO @DATA(ld_mandt).


SELECT single PLAN_VERSION
FROM HRHAP_P_APPER
INTO @DATA(ld_plan_version).


SELECT single APPRAISAL_ID
FROM HRHAP_P_APPER
INTO @DATA(ld_appraisal_id).


SELECT single PART_AP_ID
FROM HRHAP_P_APPER
INTO @DATA(ld_part_ap_id).

DATA(ld_x_plan_version) = 'some text here'.
DATA(ld_x_appraisal_id) = 'some text here'.
DATA(ld_x_part_ap_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_PART_DOC' * EXPORTING * mode_hrhap_p_apper = ld_mode_hrhap_p_apper * mode_hrhap_part = ld_mode_hrhap_part * mandt = ld_mandt * plan_version = ld_plan_version * appraisal_id = ld_appraisal_id * part_ap_id = ld_part_ap_id * x_plan_version = ld_x_plan_version * x_appraisal_id = ld_x_appraisal_id * x_part_ap_id = ld_x_part_ap_id * _scope = ld__scope * _wait = ld__wait * _collect = ld__collect EXCEPTIONS FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2 . " ENQUEUE_EHAP_PART_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.







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_mode_hrhap_p_apper  TYPE ENQMODE ,
ld_mode_hrhap_part  TYPE ENQMODE ,
ld_mandt  TYPE HRHAP_P_APPER-MANDT ,
ld_plan_version  TYPE HRHAP_P_APPER-PLAN_VERSION ,
ld_appraisal_id  TYPE HRHAP_P_APPER-APPRAISAL_ID ,
ld_part_ap_id  TYPE HRHAP_P_APPER-PART_AP_ID ,
ld_x_plan_version  TYPE STRING ,
ld_x_appraisal_id  TYPE STRING ,
ld_x_part_ap_id  TYPE STRING ,
ld__scope  TYPE STRING ,
ld__wait  TYPE STRING ,
ld__collect  TYPE DDENQCOLL .

ld_mode_hrhap_p_apper = 'Check type of data required'.
ld_mode_hrhap_part = 'Check type of data required'.

SELECT single MANDT
FROM HRHAP_P_APPER
INTO ld_mandt.


SELECT single PLAN_VERSION
FROM HRHAP_P_APPER
INTO ld_plan_version.


SELECT single APPRAISAL_ID
FROM HRHAP_P_APPER
INTO ld_appraisal_id.


SELECT single PART_AP_ID
FROM HRHAP_P_APPER
INTO ld_part_ap_id.

ld_x_plan_version = 'some text here'.
ld_x_appraisal_id = 'some text here'.
ld_x_part_ap_id = 'some text here'.
ld__scope = 'some text here'.
ld__wait = 'some text here'.
ld__collect = 'Check type of data required'.

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 ENQUEUE_EHAP_PART_DOC or its description.