05-26-2011 9:12 PM
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
05-26-2011 9:18 PM
Is this parameter available for FM SUSR_USER_PASSWORD_PUT in 700?
Rob
05-26-2011 9:33 PM
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
05-26-2011 9:35 PM
Yes - I know. That's why I asked if it's in the earlier version.
Rob
05-26-2011 9:40 PM
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