SAP BAPIObjectBAPI_USER_CREATE1ModuleSECURITY_GRC

BAPI_USER_CREATE1 — BAPI for Creating an SAP User Master Record

BAPI_USER_CREATE1 creates a user master record equivalent to running SU01 and saving, including logon data, address, password, and initial role or profile assignment. It does not commit the database change itself; the caller must issue an explicit commit. Success cannot be assumed from the call returning without a dump — the RETURN table must be inspected line by line for error and abort messages before committing.

This page covers what BAPI_USER_CREATE1 actually writes, which parameters are load-bearing, and why lazy handling of the RETURN table and missing commit calls are the two most common causes of silent user-creation failures in automation and migration projects. It also covers the ownership split between developer and security teams when a created user does not behave as expected.

Reviewed by an ERPClimb SAP consultant on 16 Sept 2026· 1,165 words

What it does

BAPI_USER_CREATE1 creates a new user master record in the system, the same object maintained interactively through SU01. It writes logon data, password, validity period, address and communication data, and can attach initial roles, profiles, or parameter values in the same call. It is the standard programmatic entry point used by provisioning scripts, migration loads, and identity management middleware to create SAP users without a GUI session. It does not perform authorization checks against the calling user's own role scope in the way SU01 does when a security administrator is restricted to certain user groups, so calling it from a technical user with broad authority bypasses that control layer entirely if the wrapper program does not reimplement it.

Important parameters

The interface separates single-value import parameters from table parameters carrying multiple assignments.

  • USERNAME - the user ID to be created, mandatory and must not already exist.
  • LOGONDATA - user type, validity dates, and logon-related settings mirroring the SU01 Logon Data tab.
  • PASSWORD - initial password structure; subject to the active password policy, rejected with an error message if it fails complexity rules.
  • ADDRESS - person data including last name, which is mandatory; creation fails without it.
  • REF_USER - optional reference user whose authorization profile is copied, used heavily in template-based provisioning.
  • PROFILES - table of authorization profiles to assign directly, bypassing role-based assignment.
  • ACTIVITYGROUPS - table of roles (activity groups) to assign, each line carrying its own validity period.
  • PARAMETER - table of user parameter ID and value pairs, equivalent to the Parameters tab in SU01.
  • ADDSMTP - table carrying the email communication address, separate from ADDRESS because SAP treats communication types as their own table.
  • RETURN - the message table returned by the call, carrying every warning, error, and information message generated during processing.

Commit behaviour

BAPI_USER_CREATE1 does not commit the database update on its own. The user record is built inside the current LUW and only becomes persistent after the caller executes an explicit commit, typically the standard transaction-commit BAPI, immediately after checking RETURN. If the caller forgets the commit, the call appears to succeed — no dump, no error message, RETURN can even show only informational lines — but the user vanishes at the end of the session because the update is rolled back with everything else in the LUW. This is a frequent cause of the 'the migration log says the user was created but it does not exist in SU01' complaint, and it is almost always a missing commit rather than a BAPI defect.

Return handling

RETURN is a table, not a single status flag, and the call's own SY-SUBRC is not a reliable success indicator because RFC-enabled BAPIs generally return 0 regardless of business-level failure. The only correct check is to loop over RETURN and test the TYPE field of every line for 'E' or 'A'. A common defect is checking only the first line, or checking whether the table is initial — both miss real errors, because BAPI_USER_CREATE1 frequently returns one or more informational 'S' messages (password generated, license type defaulted, communication type defaulted) alongside a genuine error further down the table, such as a duplicate username or a password policy violation. Interfaces that treat 'RETURN is not empty' as failure abort on harmless informational noise; interfaces that treat 'no dump occurred' as success commit half-built users with no password or no role. Both patterns show up in production as users who exist but cannot log on, or as duplicate-key errors on a second run against a user that was actually never committed.

ECC vs S/4HANA

BAPI_USER_CREATE1 remains valid and in active use on S/4HANA for on-premise systems; there is no released Fiori app or OData service that fully replaces custom ABAP-driven user provisioning at this level of detail. Enterprises moving to cloud-based identity provisioning (external identity access governance tooling or cloud identity services) increasingly push user lifecycle events through those platforms instead of calling this BAPI directly, but the underlying user master creation on the ABAP system still ultimately routes through the same mechanisms this BAPI wraps. For custom interfaces and migration cockpits built in-house, it is still the recommended call.

Common pitfalls

Failures cluster around a small set of causes, almost all traceable to interface design rather than the BAPI itself.

  • Password rejected by the active password policy returns an error line in RETURN that gets swallowed by loose return-handling, followed by a commit that creates a user with no usable password.
  • Duplicate username produces an error, but if the caller proceeds anyway, a later role-assignment call in the same batch references a user that was never created and fails downstream with a confusing not-found message.
  • Missing last name in ADDRESS aborts creation outright; batch loads sourced from HR feeds with incomplete name fields fail silently in bulk if errors are logged but not surfaced.
  • Role assignments in ACTIVITYGROUPS without an explicit validity period default to values that can make the role inactive immediately or expire it unexpectedly, leaving the user created but without effective authorizations.
  • In a central user administration landscape, calling this BAPI directly on a child system creates a user that is out of sync with the central system, producing duplicate or conflicting user records on the next CUA distribution run.
  • Communication data supplied through ADDSMTP but omitted from ADDRESS communication settings can leave the user creatable but flagged incomplete in downstream identity synchronization jobs that expect both to be consistent.

Whose problem this is

Failure to create or commit is a developer problem: the fix is in the calling program's return-loop logic and commit sequencing, and evidence needed is the full RETURN table content, not just a success or failure flag. Failure of the resulting user to work correctly — wrong roles, wrong license type, wrong validity — is a security team problem, and the developer needs the exact role and profile list the security team expected to be assigned.

Related SAP objects

Reviewed pages this object connects to in the ERPClimb knowledge graph.

Source: ERPClimb — https://erpclimb.com/sap-bapis/bapi-user-create1ERPClimb is an independent platform and is not affiliated with SAP SE. Reference pages are written and reviewed by SAP consultants for learning and troubleshooting.