‎2008 Nov 18 1:23 PM
I have problems adding a parameter to a user profile, i make use of FM SUSR_USER_PARAMETERS_PUT.
sy-subrc = 0 but no parameter is added (not showing this parameter in SU01).
when i add the parameter manualy it is not shown in FM SUSR_USER_PARAMETERS_GET.
Do i use wrong FM????
***********************CODE****************************************
DATA: lt_user_parameters TYPE TABLE OF usparam,
lw_user_parameters LIKE LINE OF lt_user_parameters.
lw_user_parameters-parid = 'CATS_APPR_PROF'.
lw_user_parameters-parva = 'AM-LINE'.
APPEND lw_user_parameters TO lt_user_parameters.
CALL FUNCTION 'SUSR_USER_PARAMETERS_PUT'
EXPORTING
user_name = 'TYPE A PROFILE'
TABLES
user_parameters = lt_user_parameters
EXCEPTIONS
user_name_not_exist = 1
OTHERS = 2.
Edited by: Richard van Veen on Nov 18, 2008 2:24 PM
‎2008 Nov 18 1:31 PM
try to use FM : SUSR_USER_PARAMETERS_GET to get user parameters .. and change
LT_USER_PARAMS according to your requirement ..
Look at Include .. SAPMOIJRDF15
CALL FUNCTION 'SUSR_USER_PARAMETERS_GET'
EXPORTING
USER_NAME = SY-UNAME
TABLES
USER_PARAMETERS = LT_USER_PARAMS
EXCEPTIONS
USER_NAME_NOT_EXIST = 1
OTHERS = 2.
‎2008 Nov 18 1:42 PM
I changed the code so that i first GET the parms and then add a entry to the internal table and then PUT it again.
This does not result in a visible parameter in SU01
NEW CODE *************
Ophalen van alle parameters
CALL FUNCTION 'SUSR_USER_PARAMETERS_GET'
EXPORTING
user_name = p_w_selected_manager_user_name
TABLES
user_parameters = lt_user_parameters
EXCEPTIONS
user_name_not_exist = 1
OTHERS = 2.
Voeg nieuwe parameter toe aan opgehaalde interne tabel
lw_user_parameters-parid = 'CATS_APPR_PROF'.
lw_user_parameters-parva = 'AM-LINE'.
APPEND lw_user_parameters TO lt_user_parameters.
Schrijg parameters weg
CALL FUNCTION 'SUSR_USER_PARAMETERS_PUT'
EXPORTING
user_name = p_w_selected_manager_user_name
TABLES
user_parameters = lt_user_parameters
EXCEPTIONS
user_name_not_exist = 1
OTHERS = 2.
Edited by: Richard van Veen on Nov 18, 2008 2:43 PM
‎2008 Nov 20 6:51 AM