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: 

Distribution of password from master client to other clients

0 Kudos
179

hi,

I have created a small program to distribute the password from one client to other clients by using a function module SUSR_USER_CHANGE. It works fine though I have a little problem . The explanation comes here. The function module looks different from kernel-release 701. It has an extra import parameter "Productive_pwd" and if this parameter is "checked" it means that you don't have/force to change the password when you try to logon on the sap system.

But from kernel-release 700 and below the parameter "productive_pwd" doesn't exist and after distribution of password you force/have to change the password again when logon to sap system.

How can I change/distribute the password without changing it when logging to the system for kernel-release 700 and below?

From SAP Kernel-relese 700

*FUNCTION susr_user_change.

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(USER_NAME) LIKE USR02-BNAME

*" VALUE(USER_LOGONDATA) LIKE USLOGOND STRUCTURE USLOGOND

*" OPTIONAL

*" VALUE(PASSWORD) LIKE XU400-NEWCODE OPTIONAL

*" VALUE(DELETE_PASSWORD) TYPE XUMARK OPTIONAL

*" VALUE(USER_DEFAULTS) LIKE USDEFAULTS STRUCTURE USDEFAULTS

*" OPTIONAL

*" VALUE(USER_ADDRESS) LIKE USADDRESS STRUCTURE USADDRESS

*" OPTIONAL

*" VALUE(REF_USER) LIKE BAPIREFUS STRUCTURE BAPIREFUS OPTIONAL

*" VALUE(ALIAS) LIKE BAPIALIAS STRUCTURE BAPIALIAS OPTIONAL

*" VALUE(UCLASS) LIKE BAPIUCLASS STRUCTURE BAPIUCLASS OPTIONAL

*" REFERENCE(CHANGE_UCLASS) TYPE CHAR01 DEFAULT SPACE

*" VALUE(MAINT_FOR_OWN_USER_ONLY) TYPE CHAR01 DEFAULT SPACE

From kernel-release 701 and 702FUNCTION susr_user_change.

*"----


""Local Interface:

*" IMPORTING

*" VALUE(USER_NAME) LIKE USR02-BNAME

*" VALUE(USER_LOGONDATA) LIKE USLOGOND STRUCTURE USLOGOND

*" OPTIONAL

*" VALUE(PASSWORD) LIKE XU400-NEWCODE OPTIONAL

*" VALUE(DELETE_PASSWORD) TYPE XUMARK OPTIONAL

*" VALUE(USER_DEFAULTS) LIKE USDEFAULTS STRUCTURE USDEFAULTS

*" OPTIONAL

*" VALUE(USER_ADDRESS) LIKE USADDRESS STRUCTURE USADDRESS

*" OPTIONAL

*" VALUE(REF_USER) LIKE BAPIREFUS STRUCTURE BAPIREFUS OPTIONAL

*" VALUE(ALIAS) LIKE BAPIALIAS STRUCTURE BAPIALIAS OPTIONAL

*" VALUE(UCLASS) LIKE BAPIUCLASS STRUCTURE BAPIUCLASS OPTIONAL

*" REFERENCE(CHANGE_UCLASS) TYPE CHAR01 DEFAULT SPACE

*" VALUE(MAINT_FOR_OWN_USER_ONLY) TYPE CHAR01 DEFAULT SPACE

*" VALUE(PRODUCTIVE_PWD) TYPE BAPIFLAG-BAPIFLAG DEFAULT SPACE

Best regards

LinhNg

4 REPLIES 4

Former Member
0 Kudos
58

Is this parameter available for FM SUSR_USER_PASSWORD_PUT in 700?

Rob

0 Kudos
58

hi Rob,

Actually the function module SUSR_USER_CHANGE call the function SUSR_USER_PASSWORD_PUT and it has the parameter called Password_status as you can see below. But in kernel-release 700 this parameter is not visible even though it exists.

So from kernel release 701 the value of parameter "productive_pwd" from FM SUSR_USER_CHANGE pass to parameter "password_status" from SUSR_USER_PASSWORD_PUT.

FUNCTION susr_user_password_put.

*"----


""Lokale Schnittstelle:

*" IMPORTING

*" VALUE(USER_NAME) LIKE USR02-BNAME

*" VALUE(PASSWORD) LIKE XU400-NEWCODE

*" VALUE(DELETE_PASSWORD) TYPE XUMARK OPTIONAL

*" VALUE(USER_LOGONDATA) LIKE USLOGOND STRUCTURE USLOGOND DEFAULT

*" SPACE

*" VALUE(MAINT_FOR_OWN_USER_ONLY) TYPE CHAR01 DEFAULT SPACE

*" VALUE(PASSWORD_STATUS) TYPE CHAR01 DEFAULT SPACE

*" EXCEPTIONS

*" USER_NAME_NOT_EXIST

*" PASSWORD_NOT_ALLOWED

*" PASSWORDS_NOT_EQUAL

*"----


*

  • DELETE_PASSWORD : X - Deactivate password

  • PASSWORD_STATUS : P - Productive password

  • MAINT_FOR_OWN_USER_ONLY: X - Maintain own values (SU3) - NOT USED

  • USER_LOGONDATA-CODVC : NOT USED

Best regards

LinhNg

0 Kudos
58

Yes - I know. That's why I asked if it's in the earlier version.

Rob

0 Kudos
58

Hi Rob,

I have an idea how to solve this problem. I have to create my own (Z)SUSR_USER_CHANGE and make the parameter password_status visible.

Thank you so much Rob.

Best regards

LinhNg