SAP TR_SHOW_OBJECT_LOCKS Function Module for









TR_SHOW_OBJECT_LOCKS is a standard tr show object locks 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 tr show object locks FM, simply by entering the name TR_SHOW_OBJECT_LOCKS into the relevant SAP transaction such as SE37 or SE38.

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



Function TR_SHOW_OBJECT_LOCKS 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 'TR_SHOW_OBJECT_LOCKS'"
EXPORTING
* IV_DIALOG = 'X' "Flag, whether information messages sent
IV_E071 = "Input E071 (Pgmid, object, Obj_name)
* IV_E071_LOCKKEY = "Input: lock argument E071 (from TR_CHECK_TYPE)
* IV_LOCKS_FILLED = ' ' "Input parameter IT_LOCKS filled
* IV_TADIR = "Input TADIR (DB version)
* IV_TADIR_LOCKKEY = "Input: lock argument TADIR (from TR_CHECK_TYPE)
* IV_TADIR_LOCKKEY_FILLED = ' ' "Input parameter IV_TADIR_LOCKKEY filled
* IV_WITH_LOCK_SURROUNDING = 'X' "Output with lock environment

IMPORTING
EV_LOCK_STATUS = "Task: object lock status

TABLES
* IT_LOCKS = "Input: request lock for TADIR lock argument

EXCEPTIONS
OBJECT_NOT_LOCKABLE = 1 EMPTY_KEY = 2 UNKNOWN_OBJECT = 3 UNALLOWED_LOCKS = 4
.



IMPORTING Parameters details for TR_SHOW_OBJECT_LOCKS

IV_DIALOG - Flag, whether information messages sent

Data type: TRPARI-W_DIALOG
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

IV_E071 - Input E071 (Pgmid, object, Obj_name)

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

IV_E071_LOCKKEY - Input: lock argument E071 (from TR_CHECK_TYPE)

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

IV_LOCKS_FILLED - Input parameter IT_LOCKS filled

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

IV_TADIR - Input TADIR (DB version)

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

IV_TADIR_LOCKKEY - Input: lock argument TADIR (from TR_CHECK_TYPE)

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

IV_TADIR_LOCKKEY_FILLED - Input parameter IV_TADIR_LOCKKEY filled

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

IV_WITH_LOCK_SURROUNDING - Output with lock environment

Data type: TRPARI-S_CHECKED
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for TR_SHOW_OBJECT_LOCKS

EV_LOCK_STATUS - Task: object lock status

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

TABLES Parameters details for TR_SHOW_OBJECT_LOCKS

IT_LOCKS - Input: request lock for TADIR lock argument

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

EXCEPTIONS details

OBJECT_NOT_LOCKABLE - Object cannot be locked

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

EMPTY_KEY - Internal system error, TLock argument empty

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

UNKNOWN_OBJECT - Unknown object

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

UNALLOWED_LOCKS -

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

Copy and paste ABAP code example for TR_SHOW_OBJECT_LOCKS 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_it_locks  TYPE STANDARD TABLE OF TLOCK, "   
lv_iv_dialog  TYPE TRPARI-W_DIALOG, "   'X'
lv_ev_lock_status  TYPE TRPARI-S_LOCKFLAG, "   
lv_object_not_lockable  TYPE TRPARI, "   
lv_iv_e071  TYPE E071, "   
lv_empty_key  TYPE E071, "   
lv_unknown_object  TYPE E071, "   
lv_iv_e071_lockkey  TYPE TLOCK_INT, "   
lv_iv_locks_filled  TYPE TRPARI-S_CHECKED, "   ' '
lv_unallowed_locks  TYPE TRPARI, "   
lv_iv_tadir  TYPE TADIR, "   
lv_iv_tadir_lockkey  TYPE TLOCK_INT, "   
lv_iv_tadir_lockkey_filled  TYPE TRPARI-S_CHECKED, "   ' '
lv_iv_with_lock_surrounding  TYPE TRPARI-S_CHECKED. "   'X'

  CALL FUNCTION 'TR_SHOW_OBJECT_LOCKS'  "
    EXPORTING
         IV_DIALOG = lv_iv_dialog
         IV_E071 = lv_iv_e071
         IV_E071_LOCKKEY = lv_iv_e071_lockkey
         IV_LOCKS_FILLED = lv_iv_locks_filled
         IV_TADIR = lv_iv_tadir
         IV_TADIR_LOCKKEY = lv_iv_tadir_lockkey
         IV_TADIR_LOCKKEY_FILLED = lv_iv_tadir_lockkey_filled
         IV_WITH_LOCK_SURROUNDING = lv_iv_with_lock_surrounding
    IMPORTING
         EV_LOCK_STATUS = lv_ev_lock_status
    TABLES
         IT_LOCKS = lt_it_locks
    EXCEPTIONS
        OBJECT_NOT_LOCKABLE = 1
        EMPTY_KEY = 2
        UNKNOWN_OBJECT = 3
        UNALLOWED_LOCKS = 4
. " TR_SHOW_OBJECT_LOCKS




ABAP code using 7.40 inline data declarations to call FM TR_SHOW_OBJECT_LOCKS

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 W_DIALOG FROM TRPARI INTO @DATA(ld_iv_dialog).
DATA(ld_iv_dialog) = 'X'.
 
"SELECT single S_LOCKFLAG FROM TRPARI INTO @DATA(ld_ev_lock_status).
 
 
 
 
 
 
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_iv_locks_filled).
DATA(ld_iv_locks_filled) = ' '.
 
 
 
 
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_iv_tadir_lockkey_filled).
DATA(ld_iv_tadir_lockkey_filled) = ' '.
 
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_iv_with_lock_surrounding).
DATA(ld_iv_with_lock_surrounding) = 'X'.
 


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!