SAP RS_ACCESS_PERMISSION Function Module for Lock/Unlock for DW Objects; Check Authorizations and Maintenance Language
RS_ACCESS_PERMISSION is a standard rs access permission SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Lock/Unlock for DW Objects; Check Authorizations and Maintenance Language 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 rs access permission FM, simply by entering the name RS_ACCESS_PERMISSION into the relevant SAP transaction such as SE37 or SE38.
Function Group: SEUQ
Program Name: SAPLSEUQ
Main Program: SAPLSEUQ
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function RS_ACCESS_PERMISSION 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 'RS_ACCESS_PERMISSION'"Lock/Unlock for DW Objects; Check Authorizations and Maintenance Language.
EXPORTING
* AUTHORITY_CHECK = 'X' "Check authorization ('X'->yes, ' '->no) CHAR 1
* SUPPRESS_CORR_CHECK = ' ' "Switch off RS_CORR_CHECK ('X'-> yes) CHAR 1
* SUPPRESS_CORR_CHECK_ALTOGETHER = ' ' "
* SUPPRESS_LANGUAGE_CHECK = 'X' "Disable maint. lang. test ('X'->yes) CHAR 1
* SUPPRESS_EDITOR_LOCK_CHECK = ' ' "Switch off editor lock test ('X'->yes)
* SUPPRESS_LANGUAGE_DIALOG = ' ' "Disable dialogs in maintenance language test ('X'->yes)
* SUPPRESS_EXTEND_DIALOG = 'X' "Disable dialog in enhancement test ('X': sets EXTEND)
* SUPPRESS_UPGRADE_CHECK = ' ' "Disable SMODILOG test on UPGRADE flag ('X'->yes)
* GENFLAG = ' ' "
* DEVCLASS_GEN = ' ' "
* DEQUEUE_SYNCHRON = ' ' "
* GLOBAL_LOCK = ' ' "Great corr. lock (R3TR); space:LIMU-Sp. CHAR 1
* LOCK_HANDLE = "
* LANGUAGE_UPD_EXIT = ' ' "Name FuBa for maintenance language change
* MASTER_LANGUAGE = ' ' "Maintenance language of overall object
* MODE = 'MODIFY' "Mode ('INSERT','MODIFY','SHOW','FREE') CHAR 6
OBJECT = "Object (complete lock key) CHAR 40
OBJECT_CLASS = "Obj. clss (ABAP,SCUA,SCRP,SLDB,T100... ) CHAR 4
* TRDIR_INF = "TRDIR entry for object (saves SELECTs)
* REQUEST_LANGUAGE = ' ' "Request language (for maintenance language test)
IMPORTING
DEVCLASS = "Development class
FROZEN = "
FROZEN_OBJECTS = "
ERROR_INFO = "Error code of Workbench Organizer
NEW_MASTER_LANGUAGE = "Maintenance language of overall object
KORRNUM = "Correction number (only with 'INSERT','MODIFY')
ORDERNUM = "
TRANSPORT_KEY = "Key for transport request (TADIR key)
MODIFICATION_LANGUAGE = "Maintenance language of (sub-)object
EXTEND = "Customer enhancement mode ('X'->yes)
TADIRE = "TADIR entry
EXCEPTIONS
CANCELED_IN_CORR = 1 ENQUEUED_BY_USER = 2 ENQUEUE_SYSTEM_FAILURE = 3 ILLEGAL_PARAMETER_VALUES = 4 LOCKED_BY_AUTHOR = 5 NO_MODIFY_PERMISSION = 6 NO_SHOW_PERMISSION = 7 PERMISSION_FAILURE = 8 REQUEST_LANGUAGE_DENIED = 9
IMPORTING Parameters details for RS_ACCESS_PERMISSION
AUTHORITY_CHECK - Check authorization ('X'->yes, ' '->no) CHAR 1
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_CORR_CHECK - Switch off RS_CORR_CHECK ('X'-> yes) CHAR 1
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_CORR_CHECK_ALTOGETHER -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_LANGUAGE_CHECK - Disable maint. lang. test ('X'->yes) CHAR 1
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_EDITOR_LOCK_CHECK - Switch off editor lock test ('X'->yes)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_LANGUAGE_DIALOG - Disable dialogs in maintenance language test ('X'->yes)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_EXTEND_DIALOG - Disable dialog in enhancement test ('X': sets EXTEND)
Data type:Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
SUPPRESS_UPGRADE_CHECK - Disable SMODILOG test on UPGRADE flag ('X'->yes)
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
GENFLAG -
Data type: TADIR-GENFLAGDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
DEVCLASS_GEN -
Data type: TADIR-DEVCLASSDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
DEQUEUE_SYNCHRON -
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
GLOBAL_LOCK - Great corr. lock (R3TR); space:LIMU-Sp. CHAR 1
Data type:Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
LOCK_HANDLE -
Data type: IF_ADT_LOCK_HANDLEOptional: Yes
Call by Reference: Yes
LANGUAGE_UPD_EXIT - Name FuBa for maintenance language change
Data type: TFDIR-FUNCNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MASTER_LANGUAGE - Maintenance language of overall object
Data type: SY-LANGUDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
MODE - Mode ('INSERT','MODIFY','SHOW','FREE') CHAR 6
Data type:Default: 'MODIFY'
Optional: Yes
Call by Reference: No ( called with pass by value option)
OBJECT - Object (complete lock key) CHAR 40
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
OBJECT_CLASS - Obj. clss (ABAP,SCUA,SCRP,SLDB,T100... ) CHAR 4
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TRDIR_INF - TRDIR entry for object (saves SELECTs)
Data type: TRDIROptional: Yes
Call by Reference: No ( called with pass by value option)
REQUEST_LANGUAGE - Request language (for maintenance language test)
Data type: T002-SPRASDefault: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RS_ACCESS_PERMISSION
DEVCLASS - Development class
Data type: TADIR-DEVCLASSOptional: No
Call by Reference: No ( called with pass by value option)
FROZEN -
Data type: FLAGOptional: No
Call by Reference: No ( called with pass by value option)
FROZEN_OBJECTS -
Data type: TPCHK_FROZEN_OBJECTSOptional: No
Call by Reference: Yes
ERROR_INFO - Error code of Workbench Organizer
Data type: DDERROptional: No
Call by Reference: No ( called with pass by value option)
NEW_MASTER_LANGUAGE - Maintenance language of overall object
Data type: SY-LANGUOptional: No
Call by Reference: No ( called with pass by value option)
KORRNUM - Correction number (only with 'INSERT','MODIFY')
Data type: E070-TRKORROptional: No
Call by Reference: No ( called with pass by value option)
ORDERNUM -
Data type: E070-TRKORROptional: No
Call by Reference: No ( called with pass by value option)
TRANSPORT_KEY - Key for transport request (TADIR key)
Data type: TRKEYOptional: No
Call by Reference: No ( called with pass by value option)
MODIFICATION_LANGUAGE - Maintenance language of (sub-)object
Data type: SY-LANGUOptional: No
Call by Reference: No ( called with pass by value option)
EXTEND - Customer enhancement mode ('X'->yes)
Data type: COptional: No
Call by Reference: No ( called with pass by value option)
TADIRE - TADIR entry
Data type: TADIROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
CANCELED_IN_CORR - User canceled correction system dialog box (F12
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQUEUED_BY_USER - Object locked by other user
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ENQUEUE_SYSTEM_FAILURE - Internal error in ENQUEUE function module
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
ILLEGAL_PARAMETER_VALUES - Invalid value for MODE or OBJECT_CLASS
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
LOCKED_BY_AUTHOR - Editor lock is set (only for SE38)
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_MODIFY_PERMISSION - User has no change authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_SHOW_PERMISSION - User has no display authorization
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PERMISSION_FAILURE - General exception: Required access denied
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
REQUEST_LANGUAGE_DENIED - Unpermitted request language
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RS_ACCESS_PERMISSION 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_devclass | TYPE TADIR-DEVCLASS, " | |||
lv_authority_check | TYPE TADIR, " 'X' | |||
lv_canceled_in_corr | TYPE TADIR, " | |||
lv_frozen | TYPE FLAG, " | |||
lv_suppress_corr_check | TYPE FLAG, " ' ' | |||
lv_frozen_objects | TYPE TPCHK_FROZEN_OBJECTS, " | |||
lv_suppress_corr_check_altogether | TYPE TPCHK_FROZEN_OBJECTS, " ' ' | |||
lv_suppress_language_check | TYPE TPCHK_FROZEN_OBJECTS, " 'X' | |||
lv_suppress_editor_lock_check | TYPE TPCHK_FROZEN_OBJECTS, " ' ' | |||
lv_suppress_language_dialog | TYPE TPCHK_FROZEN_OBJECTS, " ' ' | |||
lv_suppress_extend_dialog | TYPE TPCHK_FROZEN_OBJECTS, " 'X' | |||
lv_suppress_upgrade_check | TYPE TPCHK_FROZEN_OBJECTS, " ' ' | |||
lv_genflag | TYPE TADIR-GENFLAG, " ' ' | |||
lv_devclass_gen | TYPE TADIR-DEVCLASS, " ' ' | |||
lv_dequeue_synchron | TYPE TADIR, " ' ' | |||
lv_error_info | TYPE DDERR, " | |||
lv_global_lock | TYPE DDERR, " ' ' | |||
lv_enqueued_by_user | TYPE DDERR, " | |||
lv_lock_handle | TYPE IF_ADT_LOCK_HANDLE, " | |||
lv_language_upd_exit | TYPE TFDIR-FUNCNAME, " SPACE | |||
lv_new_master_language | TYPE SY-LANGU, " | |||
lv_enqueue_system_failure | TYPE SY, " | |||
lv_korrnum | TYPE E070-TRKORR, " | |||
lv_master_language | TYPE SY-LANGU, " SPACE | |||
lv_illegal_parameter_values | TYPE SY, " | |||
lv_mode | TYPE SY, " 'MODIFY' | |||
lv_ordernum | TYPE E070-TRKORR, " | |||
lv_locked_by_author | TYPE E070, " | |||
lv_object | TYPE E070, " | |||
lv_transport_key | TYPE TRKEY, " | |||
lv_no_modify_permission | TYPE TRKEY, " | |||
lv_object_class | TYPE TRKEY, " | |||
lv_no_show_permission | TYPE TRKEY, " | |||
lv_modification_language | TYPE SY-LANGU, " | |||
lv_extend | TYPE C, " | |||
lv_trdir_inf | TYPE TRDIR, " | |||
lv_permission_failure | TYPE TRDIR, " | |||
lv_tadire | TYPE TADIR, " | |||
lv_request_language | TYPE T002-SPRAS, " ' ' | |||
lv_request_language_denied | TYPE T002. " |
  CALL FUNCTION 'RS_ACCESS_PERMISSION' "Lock/Unlock for DW Objects; Check Authorizations and Maintenance Language |
EXPORTING | ||
AUTHORITY_CHECK | = lv_authority_check | |
SUPPRESS_CORR_CHECK | = lv_suppress_corr_check | |
SUPPRESS_CORR_CHECK_ALTOGETHER | = lv_suppress_corr_check_altogether | |
SUPPRESS_LANGUAGE_CHECK | = lv_suppress_language_check | |
SUPPRESS_EDITOR_LOCK_CHECK | = lv_suppress_editor_lock_check | |
SUPPRESS_LANGUAGE_DIALOG | = lv_suppress_language_dialog | |
SUPPRESS_EXTEND_DIALOG | = lv_suppress_extend_dialog | |
SUPPRESS_UPGRADE_CHECK | = lv_suppress_upgrade_check | |
GENFLAG | = lv_genflag | |
DEVCLASS_GEN | = lv_devclass_gen | |
DEQUEUE_SYNCHRON | = lv_dequeue_synchron | |
GLOBAL_LOCK | = lv_global_lock | |
LOCK_HANDLE | = lv_lock_handle | |
LANGUAGE_UPD_EXIT | = lv_language_upd_exit | |
MASTER_LANGUAGE | = lv_master_language | |
MODE | = lv_mode | |
OBJECT | = lv_object | |
OBJECT_CLASS | = lv_object_class | |
TRDIR_INF | = lv_trdir_inf | |
REQUEST_LANGUAGE | = lv_request_language | |
IMPORTING | ||
DEVCLASS | = lv_devclass | |
FROZEN | = lv_frozen | |
FROZEN_OBJECTS | = lv_frozen_objects | |
ERROR_INFO | = lv_error_info | |
NEW_MASTER_LANGUAGE | = lv_new_master_language | |
KORRNUM | = lv_korrnum | |
ORDERNUM | = lv_ordernum | |
TRANSPORT_KEY | = lv_transport_key | |
MODIFICATION_LANGUAGE | = lv_modification_language | |
EXTEND | = lv_extend | |
TADIRE | = lv_tadire | |
EXCEPTIONS | ||
CANCELED_IN_CORR = 1 | ||
ENQUEUED_BY_USER = 2 | ||
ENQUEUE_SYSTEM_FAILURE = 3 | ||
ILLEGAL_PARAMETER_VALUES = 4 | ||
LOCKED_BY_AUTHOR = 5 | ||
NO_MODIFY_PERMISSION = 6 | ||
NO_SHOW_PERMISSION = 7 | ||
PERMISSION_FAILURE = 8 | ||
REQUEST_LANGUAGE_DENIED = 9 | ||
. " RS_ACCESS_PERMISSION |
ABAP code using 7.40 inline data declarations to call FM RS_ACCESS_PERMISSION
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 DEVCLASS FROM TADIR INTO @DATA(ld_devclass). | ||||
DATA(ld_authority_check) | = 'X'. | |||
DATA(ld_suppress_corr_check) | = ' '. | |||
DATA(ld_suppress_corr_check_altogether) | = ' '. | |||
DATA(ld_suppress_language_check) | = 'X'. | |||
DATA(ld_suppress_editor_lock_check) | = ' '. | |||
DATA(ld_suppress_language_dialog) | = ' '. | |||
DATA(ld_suppress_extend_dialog) | = 'X'. | |||
DATA(ld_suppress_upgrade_check) | = ' '. | |||
"SELECT single GENFLAG FROM TADIR INTO @DATA(ld_genflag). | ||||
DATA(ld_genflag) | = ' '. | |||
"SELECT single DEVCLASS FROM TADIR INTO @DATA(ld_devclass_gen). | ||||
DATA(ld_devclass_gen) | = ' '. | |||
DATA(ld_dequeue_synchron) | = ' '. | |||
DATA(ld_global_lock) | = ' '. | |||
"SELECT single FUNCNAME FROM TFDIR INTO @DATA(ld_language_upd_exit). | ||||
DATA(ld_language_upd_exit) | = ' '. | |||
"SELECT single LANGU FROM SY INTO @DATA(ld_new_master_language). | ||||
"SELECT single TRKORR FROM E070 INTO @DATA(ld_korrnum). | ||||
"SELECT single LANGU FROM SY INTO @DATA(ld_master_language). | ||||
DATA(ld_master_language) | = ' '. | |||
DATA(ld_mode) | = 'MODIFY'. | |||
"SELECT single TRKORR FROM E070 INTO @DATA(ld_ordernum). | ||||
"SELECT single LANGU FROM SY INTO @DATA(ld_modification_language). | ||||
"SELECT single SPRAS FROM T002 INTO @DATA(ld_request_language). | ||||
DATA(ld_request_language) | = ' '. | |||
Search for further information about these or an SAP related objects