Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding parameter to user profile with SUSR_USER_PARAMETERS_PUT

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

Solved it with FM

CALL FUNCTION 'SUSR_USER_BUFFERS_TO_DB