SAP SUSR_USER_CHANGE_PASSWORD_RFC Function Module for









SUSR_USER_CHANGE_PASSWORD_RFC is a standard susr user change password rfc SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for susr user change password rfc FM, simply by entering the name SUSR_USER_CHANGE_PASSWORD_RFC into the relevant SAP transaction such as SE37 or SE38.

Function Group: SUSO
Program Name: SAPLSUSO
Main Program: SAPLSUSO
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SUSR_USER_CHANGE_PASSWORD_RFC pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SUSR_USER_CHANGE_PASSWORD_RFC'"
EXPORTING
* BNAME = SY-UNAME "User Name
PASSWORD = "Password
* NEW_PASSWORD = "New password
* NEW_BCODE = "
* NEW_CODVN = "
* USE_NEW_EXCEPTION = 0 "
* USE_BAPI_RETURN = 0 "

IMPORTING
PWD_CHANGE_SSO = "
RETURN = "

EXCEPTIONS
CHANGE_NOT_ALLOWED = 1 PASSWORD_NOT_ALLOWED = 2 INTERNAL_ERROR = 3 CANCELED_BY_USER = 4 PASSWORD_ATTEMPTS_LIMITED = 5
.



IMPORTING Parameters details for SUSR_USER_CHANGE_PASSWORD_RFC

BNAME - User Name

Data type: RSYST-BNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

PASSWORD - Password

Data type: RSYST-BCODE
Optional: No
Call by Reference: No ( called with pass by value option)

NEW_PASSWORD - New password

Data type: RSYST-BCODE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NEW_BCODE -

Data type: USR02-BCODE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NEW_CODVN -

Data type: USR02-CODVN
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_NEW_EXCEPTION -

Data type: IBOOLEAN
Optional: Yes
Call by Reference: No ( called with pass by value option)

USE_BAPI_RETURN -

Data type: IBOOLEAN
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SUSR_USER_CHANGE_PASSWORD_RFC

PWD_CHANGE_SSO -

Data type: XUPWDCHGSSO
Optional: No
Call by Reference: No ( called with pass by value option)

RETURN -

Data type: BAPIRET2
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

CHANGE_NOT_ALLOWED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PASSWORD_NOT_ALLOWED -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

INTERNAL_ERROR - Internal Error

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

CANCELED_BY_USER -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

PASSWORD_ATTEMPTS_LIMITED -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SUSR_USER_CHANGE_PASSWORD_RFC Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_bname  TYPE RSYST-BNAME, "   SY-UNAME
lv_pwd_change_sso  TYPE XUPWDCHGSSO, "   
lv_change_not_allowed  TYPE XUPWDCHGSSO, "   
lv_return  TYPE BAPIRET2, "   
lv_password  TYPE RSYST-BCODE, "   
lv_password_not_allowed  TYPE RSYST, "   
lv_new_password  TYPE RSYST-BCODE, "   
lv_internal_error  TYPE RSYST, "   
lv_new_bcode  TYPE USR02-BCODE, "   
lv_canceled_by_user  TYPE USR02, "   
lv_new_codvn  TYPE USR02-CODVN, "   
lv_password_attempts_limited  TYPE USR02, "   
lv_use_new_exception  TYPE IBOOLEAN, "   0
lv_use_bapi_return  TYPE IBOOLEAN. "   0

  CALL FUNCTION 'SUSR_USER_CHANGE_PASSWORD_RFC'  "
    EXPORTING
         BNAME = lv_bname
         PASSWORD = lv_password
         NEW_PASSWORD = lv_new_password
         NEW_BCODE = lv_new_bcode
         NEW_CODVN = lv_new_codvn
         USE_NEW_EXCEPTION = lv_use_new_exception
         USE_BAPI_RETURN = lv_use_bapi_return
    IMPORTING
         PWD_CHANGE_SSO = lv_pwd_change_sso
         RETURN = lv_return
    EXCEPTIONS
        CHANGE_NOT_ALLOWED = 1
        PASSWORD_NOT_ALLOWED = 2
        INTERNAL_ERROR = 3
        CANCELED_BY_USER = 4
        PASSWORD_ATTEMPTS_LIMITED = 5
. " SUSR_USER_CHANGE_PASSWORD_RFC




ABAP code using 7.40 inline data declarations to call FM SUSR_USER_CHANGE_PASSWORD_RFC

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

"SELECT single BNAME FROM RSYST INTO @DATA(ld_bname).
DATA(ld_bname) = SY-UNAME.
 
 
 
 
"SELECT single BCODE FROM RSYST INTO @DATA(ld_password).
 
 
"SELECT single BCODE FROM RSYST INTO @DATA(ld_new_password).
 
 
"SELECT single BCODE FROM USR02 INTO @DATA(ld_new_bcode).
 
 
"SELECT single CODVN FROM USR02 INTO @DATA(ld_new_codvn).
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!