BASIS
BAPI
RFC
Used the same way in S/4HANA
BAPI_USER_CHANGE Change User
Changes the logon data, address, defaults, password or parameters of an existing user. Identity management and user synchronization interfaces use it instead of SU01 changes. Mark the fields with 'X' in the matching …X structure (LOGONDATAX, ADDRESSX, etc.) for every structure you change; it requires S_USER_GRP authorization and the RETURN table must be checked.
- Function group
- SU_USER
- Remote-enabled (RFC)
- Yes
- Type
- BAPI
Importing parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| USERNAME | BAPIBNAME-BAPIBNAME | User name | Yes |
| LOGONDATA | BAPILOGOND | Logon data | — |
| LOGONDATAX | BAPILOGONX | Logon data change flags | — |
| DEFAULTS | BAPIDEFAUL | Default settings | — |
| DEFAULTSX | BAPIDEFAX | Default settings change flags | — |
| ADDRESS | BAPIADDR3 | Address data | — |
| ADDRESSX | BAPIADDR3X | Address change flags | — |
| COMPANY | BAPIUSCOMP | Company address | — |
| PASSWORD | BAPIPWD | New password | — |
| PASSWORDX | BAPIPWDX | Password change flag | — |
| PRODUCTIVE_PWD | BAPIFLAG-BAPIFLAG | Set password as productive password | — |
| GENERATE_PWD | BAPIFLAG-BAPIFLAG | Generate password | — |
| SNC | BAPISNCU | SNC data | — |
| UCLASS | BAPIUCLASS | License data | — |
| ALIAS | BAPIALIAS | User alias | — |
Exporting parameters
| Parameter | Type | Description |
|---|---|---|
| GENERATED_PASSWORD | BAPIPWD | Generated password |
Tables parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| PARAMETER | BAPIPARAM | User parameters | — |
| GROUPS | BAPIGROUPS | User groups | — |
| RETURN | BAPIRET2 | Return messages | Yes |
Call template (ABAP)
A skeleton generated from the interface. It lists mandatory importing parameters, exporting parameters and tables; declare the variables with suitable types in your own program.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
username = lv_username
IMPORTING
generated_password = lv_generated_password
TABLES
parameter = lt_parameter
groups = lt_groups
return = lt_return.Related tables
Can't find the report you need?
We also build anything that is not in the catalog. Describe it briefly and we will suggest the right solution.