SAP KBPS_ENQUEUE Function Module for









KBPS_ENQUEUE is a standard kbps enqueue 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 kbps enqueue FM, simply by entering the name KBPS_ENQUEUE into the relevant SAP transaction such as SE37 or SE38.

Function Group: KBPS
Program Name: SAPLKBPS
Main Program: SAPLKBPS
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function KBPS_ENQUEUE 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 'KBPS_ENQUEUE'"
EXPORTING
* I_GLOBAL_OBJHI = ' ' "
* I_WAIT = ' ' "
* I_APPLIK = ' ' "
* I_MAX_GLOBAL_ENQUEUE = 1000 "
* I_SCOPE = '2' "
* I_GLOBAL_WRTTP = ' ' "
* I_GLOBAL_GEBER = ' ' "
* I_GLOBAL_ALL_GEBER = ' ' "
* I_GLOBAL_VERSN = ' ' "
* I_GLOBAL_FAREA = ' ' "
* I_GLOBAL_ALL_FAREA = ' ' "
* I_GLOBAL_ENQUEUE = ' ' "
* I_ENQ_MODE = 'E' "

TABLES
* T_ENQ_OBJ = "Table of Objects to Be Locked
* T_LOCKING_USER = "

EXCEPTIONS
FOREIGN_LOCK = 1
.



IMPORTING Parameters details for KBPS_ENQUEUE

I_GLOBAL_OBJHI -

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

I_WAIT -

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

I_APPLIK -

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

I_MAX_GLOBAL_ENQUEUE -

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

I_SCOPE -

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

I_GLOBAL_WRTTP -

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

I_GLOBAL_GEBER -

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

I_GLOBAL_ALL_GEBER -

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

I_GLOBAL_VERSN -

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

I_GLOBAL_FAREA -

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

I_GLOBAL_ALL_FAREA -

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

I_GLOBAL_ENQUEUE -

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

I_ENQ_MODE -

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

TABLES Parameters details for KBPS_ENQUEUE

T_ENQ_OBJ - Table of Objects to Be Locked

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

T_LOCKING_USER -

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

EXCEPTIONS details

FOREIGN_LOCK -

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

Copy and paste ABAP code example for KBPS_ENQUEUE 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:
lt_t_enq_obj  TYPE STANDARD TABLE OF BPBU_T_ENQUEUE, "   
lv_foreign_lock  TYPE BPBU_T_ENQUEUE, "   
lv_i_global_objhi  TYPE BPHI-OBJNR, "   SPACE
lv_i_wait  TYPE DDENQ_LIKE-WAITFLAG, "   SPACE
lv_i_applik  TYPE BPIN-APPLIK, "   SPACE
lv_i_max_global_enqueue  TYPE I, "   1000
lv_i_scope  TYPE DDENQ_LIKE-SCOPE, "   '2'
lv_i_global_wrttp  TYPE BPHI-WRTTP, "   SPACE
lt_t_locking_user  TYPE STANDARD TABLE OF BPBU_T_UNAME, "   
lv_i_global_geber  TYPE BPHI-GEBER, "   SPACE
lv_i_global_all_geber  TYPE FMDY-XFELD, "   SPACE
lv_i_global_versn  TYPE BPHI-VERSN, "   SPACE
lv_i_global_farea  TYPE BPHI-FAREA, "   SPACE
lv_i_global_all_farea  TYPE FMDY-XFELD, "   SPACE
lv_i_global_enqueue  TYPE FMDY-XFELD, "   SPACE
lv_i_enq_mode  TYPE DD26E-ENQMODE. "   'E'

  CALL FUNCTION 'KBPS_ENQUEUE'  "
    EXPORTING
         I_GLOBAL_OBJHI = lv_i_global_objhi
         I_WAIT = lv_i_wait
         I_APPLIK = lv_i_applik
         I_MAX_GLOBAL_ENQUEUE = lv_i_max_global_enqueue
         I_SCOPE = lv_i_scope
         I_GLOBAL_WRTTP = lv_i_global_wrttp
         I_GLOBAL_GEBER = lv_i_global_geber
         I_GLOBAL_ALL_GEBER = lv_i_global_all_geber
         I_GLOBAL_VERSN = lv_i_global_versn
         I_GLOBAL_FAREA = lv_i_global_farea
         I_GLOBAL_ALL_FAREA = lv_i_global_all_farea
         I_GLOBAL_ENQUEUE = lv_i_global_enqueue
         I_ENQ_MODE = lv_i_enq_mode
    TABLES
         T_ENQ_OBJ = lt_t_enq_obj
         T_LOCKING_USER = lt_t_locking_user
    EXCEPTIONS
        FOREIGN_LOCK = 1
. " KBPS_ENQUEUE




ABAP code using 7.40 inline data declarations to call FM KBPS_ENQUEUE

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.

 
 
"SELECT single OBJNR FROM BPHI INTO @DATA(ld_i_global_objhi).
DATA(ld_i_global_objhi) = ' '.
 
"SELECT single WAITFLAG FROM DDENQ_LIKE INTO @DATA(ld_i_wait).
DATA(ld_i_wait) = ' '.
 
"SELECT single APPLIK FROM BPIN INTO @DATA(ld_i_applik).
DATA(ld_i_applik) = ' '.
 
DATA(ld_i_max_global_enqueue) = 1000.
 
"SELECT single SCOPE FROM DDENQ_LIKE INTO @DATA(ld_i_scope).
DATA(ld_i_scope) = '2'.
 
"SELECT single WRTTP FROM BPHI INTO @DATA(ld_i_global_wrttp).
DATA(ld_i_global_wrttp) = ' '.
 
 
"SELECT single GEBER FROM BPHI INTO @DATA(ld_i_global_geber).
DATA(ld_i_global_geber) = ' '.
 
"SELECT single XFELD FROM FMDY INTO @DATA(ld_i_global_all_geber).
DATA(ld_i_global_all_geber) = ' '.
 
"SELECT single VERSN FROM BPHI INTO @DATA(ld_i_global_versn).
DATA(ld_i_global_versn) = ' '.
 
"SELECT single FAREA FROM BPHI INTO @DATA(ld_i_global_farea).
DATA(ld_i_global_farea) = ' '.
 
"SELECT single XFELD FROM FMDY INTO @DATA(ld_i_global_all_farea).
DATA(ld_i_global_all_farea) = ' '.
 
"SELECT single XFELD FROM FMDY INTO @DATA(ld_i_global_enqueue).
DATA(ld_i_global_enqueue) = ' '.
 
"SELECT single ENQMODE FROM DD26E INTO @DATA(ld_i_enq_mode).
DATA(ld_i_enq_mode) = 'E'.
 


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!