SAP Function Modules

SUSR_USER_CHANGE_PASSWORD_RFC SAP Function module







SUSR_USER_CHANGE_PASSWORD_RFC is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name SUSR_USER_CHANGE_PASSWORD_RFC into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: SUSO
Released Date: Not Released
Processing type: Remote-Enabled
remote enabled module settings


Pattern for FM SUSR_USER_CHANGE_PASSWORD_RFC - SUSR USER CHANGE PASSWORD RFC





CALL FUNCTION 'SUSR_USER_CHANGE_PASSWORD_RFC' "
  EXPORTING
*   bname = SY-UNAME            " rsyst-bname   User Name
    password =                  " rsyst-bcode   Password
*   new_password =              " rsyst-bcode   New password
*   new_bcode =                 " usr02-bcode
*   new_codvn =                 " usr02-codvn
*   use_new_exception = 0       " iboolean
*   use_bapi_return = 0         " iboolean
  IMPORTING
    pwd_change_sso =            " xupwdchgsso
    return =                    " bapiret2
  EXCEPTIONS
    CHANGE_NOT_ALLOWED = 1      "
    PASSWORD_NOT_ALLOWED = 2    "
    INTERNAL_ERROR = 3          "               Internal Error
    CANCELED_BY_USER = 4        "
    PASSWORD_ATTEMPTS_LIMITED = 5  "
    .  "  SUSR_USER_CHANGE_PASSWORD_RFC

ABAP code example for Function Module SUSR_USER_CHANGE_PASSWORD_RFC





The ABAP code below is a full code listing to execute function module SUSR_USER_CHANGE_PASSWORD_RFC including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
ld_pwd_change_sso  TYPE XUPWDCHGSSO ,
ld_return  TYPE BAPIRET2 .


DATA(ld_bname) = some text here

DATA(ld_password) = some text here

DATA(ld_new_password) = some text here

SELECT single BCODE
FROM USR02
INTO @DATA(ld_new_bcode).


SELECT single CODVN
FROM USR02
INTO @DATA(ld_new_codvn).

DATA(ld_use_new_exception) = 'Check type of data required'.
DATA(ld_use_bapi_return) = 'Check type of data required'. . CALL FUNCTION 'SUSR_USER_CHANGE_PASSWORD_RFC' EXPORTING * bname = ld_bname password = ld_password * new_password = ld_new_password * new_bcode = ld_new_bcode * new_codvn = ld_new_codvn * use_new_exception = ld_use_new_exception * use_bapi_return = ld_use_bapi_return IMPORTING pwd_change_sso = ld_pwd_change_sso return = ld_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
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_pwd_change_sso  TYPE XUPWDCHGSSO ,
ld_bname  TYPE RSYST-BNAME ,
ld_return  TYPE BAPIRET2 ,
ld_password  TYPE RSYST-BCODE ,
ld_new_password  TYPE RSYST-BCODE ,
ld_new_bcode  TYPE USR02-BCODE ,
ld_new_codvn  TYPE USR02-CODVN ,
ld_use_new_exception  TYPE IBOOLEAN ,
ld_use_bapi_return  TYPE IBOOLEAN .


ld_bname = some text here

ld_password = some text here

ld_new_password = some text here

SELECT single BCODE
FROM USR02
INTO ld_new_bcode.


SELECT single CODVN
FROM USR02
INTO ld_new_codvn.

ld_use_new_exception = 'Check type of data required'.
ld_use_bapi_return = 'Check type of data required'.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name SUSR_USER_CHANGE_PASSWORD_RFC or its description.