# BAPI_USER_CREATE1 — Create User

> Creates a user master record with logon data, address, defaults and user parameters (the counterpart of SU01). Identity management systems and bulk user creation tools call it through RFC. Roles and profiles are not assigned by this BAPI but by separate BAPIs; the call requires authorization object S_USER_GRP and the RETURN table must always be checked.

- Modules: BASIS
- Type: BAPI
- Function group: SU_USER
- Remote-enabled (RFC): Yes
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/bapi-user-create1/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| USERNAME | BAPIBNAME-BAPIBNAME | User name | Yes |
| LOGONDATA | BAPILOGOND | Logon data | Yes |
| PASSWORD | BAPIPWD | Initial password | Yes |
| ADDRESS | BAPIADDR3 | Address data | Yes |
| DEFAULTS | BAPIDEFAUL | Default settings | - |
| COMPANY | BAPIUSCOMP | Company address | - |
| SNC | BAPISNCU | SNC data | - |
| UCLASS | BAPIUCLASS | License data | - |
| ALIAS | BAPIALIAS | User alias | - |
| GENERATE_PWD | BAPIFLAG-BAPIFLAG | Generate password | - |

## 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 | - |

## Call template (ABAP)

```abap
CALL FUNCTION 'BAPI_USER_CREATE1'
  EXPORTING
    username = lv_username
    logondata = lv_logondata
    password = lv_password
    address = lv_address
  IMPORTING
    generated_password = lv_generated_password
  TABLES
    parameter = lt_parameter
    groups = lt_groups
    return = lt_return.
```

## Related tables

USR01, USR02, USR21

