SAP ENQUEUE_E_MESSLOG Function Module for Request lock for object E_MESSLOG









ENQUEUE_E_MESSLOG is a standard enqueue e messlog SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Request lock for object E_MESSLOG processing and below is the pattern details for this FM, 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 enqueue e messlog FM, simply by entering the name ENQUEUE_E_MESSLOG into the relevant SAP transaction such as SE37 or SE38.

Function Group: /1BCDWBEN/MEN0000
Program Name: /1BCDWBEN/SAPLMEN0000
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function ENQUEUE_E_MESSLOG 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 'ENQUEUE_E_MESSLOG'"Request lock for object E_MESSLOG
EXPORTING
* MODE_MRMRBBW_ERR_EXTR = 'E' "Lock mode for table MRMRBBW_ERR_EXTR
* MSGID = "09th enqueue argument
* MSGNO = "10th enqueue argument
* X_BELNR = ' ' "Fill argument 02 with initial value?
* X_BUZEI = ' ' "Fill argument 03 with initial value?
* X_GJAHR = ' ' "Fill argument 04 with initial value?
* X_COBL_NR = ' ' "Fill argument 05 with initial value?
* X_MSGTY = ' ' "Fill argument 06 with initial value?
* X_DATE_BW = ' ' "Fill argument 07 with initial value?
* X_TIME_BW = ' ' "Fill argument 08 with initial value?
* X_MSGID = ' ' "Fill argument 09 with initial value?
* MANDT = SY-MANDT "01th enqueue argument
* X_MSGNO = ' ' "Fill argument 10 with initial value?
* _SCOPE = '2' "
* _WAIT = ' ' "
* _COLLECT = ' ' "Initially only collect lock
* BELNR = "02th enqueue argument
* BUZEI = "03th enqueue argument
* GJAHR = "04th enqueue argument
* COBL_NR = "05th enqueue argument
* MSGTY = "06th enqueue argument
* DATE_BW = "07th enqueue argument
* TIME_BW = "08th enqueue argument

EXCEPTIONS
FOREIGN_LOCK = 1 SYSTEM_FAILURE = 2
.



IMPORTING Parameters details for ENQUEUE_E_MESSLOG

MODE_MRMRBBW_ERR_EXTR - Lock mode for table MRMRBBW_ERR_EXTR

Data type: ENQMODE
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGID - 09th enqueue argument

Data type: MRMRBBW_ERR_EXTR-MSGID
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGNO - 10th enqueue argument

Data type: MRMRBBW_ERR_EXTR-MSGNO
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_BELNR - Fill argument 02 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_BUZEI - Fill argument 03 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_GJAHR - Fill argument 04 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_COBL_NR - Fill argument 05 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_MSGTY - Fill argument 06 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_DATE_BW - Fill argument 07 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_TIME_BW - Fill argument 08 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_MSGID - Fill argument 09 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

MANDT - 01th enqueue argument

Data type: MRMRBBW_ERR_EXTR-MANDT
Default: SY-MANDT
Optional: Yes
Call by Reference: No ( called with pass by value option)

X_MSGNO - Fill argument 10 with initial value?

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

_SCOPE -

Data type:
Default: '2'
Optional: Yes
Call by Reference: No ( called with pass by value option)

_WAIT -

Data type:
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

_COLLECT - Initially only collect lock

Data type: DDENQCOLL
Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)

BELNR - 02th enqueue argument

Data type: MRMRBBW_ERR_EXTR-BELNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

BUZEI - 03th enqueue argument

Data type: MRMRBBW_ERR_EXTR-BUZEI
Optional: Yes
Call by Reference: No ( called with pass by value option)

GJAHR - 04th enqueue argument

Data type: MRMRBBW_ERR_EXTR-GJAHR
Optional: Yes
Call by Reference: No ( called with pass by value option)

COBL_NR - 05th enqueue argument

Data type: MRMRBBW_ERR_EXTR-COBL_NR
Optional: Yes
Call by Reference: No ( called with pass by value option)

MSGTY - 06th enqueue argument

Data type: MRMRBBW_ERR_EXTR-MSGTY
Optional: Yes
Call by Reference: No ( called with pass by value option)

DATE_BW - 07th enqueue argument

Data type: MRMRBBW_ERR_EXTR-DATE_BW
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIME_BW - 08th enqueue argument

Data type: MRMRBBW_ERR_EXTR-TIME_BW
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

FOREIGN_LOCK - Object already locked

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SYSTEM_FAILURE - Internal error from enqueue server

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for ENQUEUE_E_MESSLOG 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_foreign_lock  TYPE STRING, "   
lv_mode_mrmrbbw_err_extr  TYPE ENQMODE, "   'E'
lv_msgid  TYPE MRMRBBW_ERR_EXTR-MSGID, "   
lv_msgno  TYPE MRMRBBW_ERR_EXTR-MSGNO, "   
lv_x_belnr  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_buzei  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_gjahr  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_cobl_nr  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_msgty  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_date_bw  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_time_bw  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_x_msgid  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv_mandt  TYPE MRMRBBW_ERR_EXTR-MANDT, "   SY-MANDT
lv_system_failure  TYPE MRMRBBW_ERR_EXTR, "   
lv_x_msgno  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv__scope  TYPE MRMRBBW_ERR_EXTR, "   '2'
lv__wait  TYPE MRMRBBW_ERR_EXTR, "   SPACE
lv__collect  TYPE DDENQCOLL, "   ' '
lv_belnr  TYPE MRMRBBW_ERR_EXTR-BELNR, "   
lv_buzei  TYPE MRMRBBW_ERR_EXTR-BUZEI, "   
lv_gjahr  TYPE MRMRBBW_ERR_EXTR-GJAHR, "   
lv_cobl_nr  TYPE MRMRBBW_ERR_EXTR-COBL_NR, "   
lv_msgty  TYPE MRMRBBW_ERR_EXTR-MSGTY, "   
lv_date_bw  TYPE MRMRBBW_ERR_EXTR-DATE_BW, "   
lv_time_bw  TYPE MRMRBBW_ERR_EXTR-TIME_BW. "   

  CALL FUNCTION 'ENQUEUE_E_MESSLOG'  "Request lock for object E_MESSLOG
    EXPORTING
         MODE_MRMRBBW_ERR_EXTR = lv_mode_mrmrbbw_err_extr
         MSGID = lv_msgid
         MSGNO = lv_msgno
         X_BELNR = lv_x_belnr
         X_BUZEI = lv_x_buzei
         X_GJAHR = lv_x_gjahr
         X_COBL_NR = lv_x_cobl_nr
         X_MSGTY = lv_x_msgty
         X_DATE_BW = lv_x_date_bw
         X_TIME_BW = lv_x_time_bw
         X_MSGID = lv_x_msgid
         MANDT = lv_mandt
         X_MSGNO = lv_x_msgno
         _SCOPE = lv__scope
         _WAIT = lv__wait
         _COLLECT = lv__collect
         BELNR = lv_belnr
         BUZEI = lv_buzei
         GJAHR = lv_gjahr
         COBL_NR = lv_cobl_nr
         MSGTY = lv_msgty
         DATE_BW = lv_date_bw
         TIME_BW = lv_time_bw
    EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
. " ENQUEUE_E_MESSLOG




ABAP code using 7.40 inline data declarations to call FM ENQUEUE_E_MESSLOG

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.

 
DATA(ld_mode_mrmrbbw_err_extr) = 'E'.
 
"SELECT single MSGID FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_msgid).
 
"SELECT single MSGNO FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_msgno).
 
DATA(ld_x_belnr) = ' '.
 
DATA(ld_x_buzei) = ' '.
 
DATA(ld_x_gjahr) = ' '.
 
DATA(ld_x_cobl_nr) = ' '.
 
DATA(ld_x_msgty) = ' '.
 
DATA(ld_x_date_bw) = ' '.
 
DATA(ld_x_time_bw) = ' '.
 
DATA(ld_x_msgid) = ' '.
 
"SELECT single MANDT FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_mandt).
DATA(ld_mandt) = SY-MANDT.
 
 
DATA(ld_x_msgno) = ' '.
 
DATA(ld__scope) = '2'.
 
DATA(ld__wait) = ' '.
 
DATA(ld__collect) = ' '.
 
"SELECT single BELNR FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_belnr).
 
"SELECT single BUZEI FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_buzei).
 
"SELECT single GJAHR FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_gjahr).
 
"SELECT single COBL_NR FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_cobl_nr).
 
"SELECT single MSGTY FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_msgty).
 
"SELECT single DATE_BW FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_date_bw).
 
"SELECT single TIME_BW FROM MRMRBBW_ERR_EXTR INTO @DATA(ld_time_bw).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!