Set User Parameter in SAP using ABAP Function Module
This SAP tutorial shows how to use ABAP function module to set user parameter for a specific SAP user where stored in USR05 database table in SU01 tcode screen. ABAP user can create user parameter or change user parameter value using different function modules for the current SAP user or for a specific targeted SAP user. ABAP developers can use CACS_SET_USER_PARAMETER function module in order to set user parameter values for any SAP user where SU01 SAP transaction is not authorized easier than to update USR05 ABAP table for user parameters.
I want to change a specific SAP user's Parameter value using an ABAP function module.
Since I did not have the SU01 transaction authorization, I was not able to edit the parameter value directly using the User Maintenance GUI screens.
I found a number of SAP function modules like G_SET_USER_PARAMETER or ACC_USER_PARAMETER_SET. Unfortunately these function modules are used to set the user parameter values of the current SAP user, sy-uname
Since I want to maintain an other SAP user's parameters, I could finally found ABAP function module CACS_SET_USER_PARAMETER
I want to delete the value of SAP user parameter "/PERSONAS/RUN_MODE"
Here is how I do it by executing SE37 test function module transaction.
Because I want to delete the parameter value, I leave the input parameter's value to its initial value, empty string. You will be asked again to provide a value for this input parameter value. Press Enter and continue without providing any value.
The function module CACS_SET_USER_PARAMETER does not provide a success message return to the executing user, but you can check and validate the parameter is set to empty string by using the SU01D transaction code.
If the parameter does not exist in the Parameters list of the SAP user, the parameter will be added to the list automatically.
So the ABAP function module CACS_SET_USER_PARAMETER updates existing parameter values as well as can be used to add a new parameter for that specific SAP user.
SAP user parameters are stored in ABAP table USR05 (User Master Parameter ID)
ABAP developers can use SQL commands to insert / update or delete parameter data using ABAP programs too.
Here is the ABAP transparent table USR05 with user parameters of a SAP user