# STATUS_CHANGE_EXTERN — Set User Status

> Sets or deactivates a user status of an object in status management, checking the rules of its status profile. The status must be passed in internal format (for example E0001), not as the four-character text. Use CHECK_ONLY to test permissibility, and note that the change is written only with the next COMMIT WORK.

- Modules: CA
- Type: Function module
- Function group: BSVA
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/status-change-extern/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| CHECK_ONLY | XFELD | Check permissibility only | - |
| CLIENT | SY-MANDT | Client (exceptional cases only) | - |
| OBJNR | JSTO-OBJNR | Object number of the status object | Yes |
| USER_STATUS | JEST-STAT | User status (internal format) | Yes |
| SET_INACT | XFELD | Deactivate the status | - |
| SET_CHGKZ | JSTO-CHGKZ | Write change documents | - |
| NO_CHECK | XFELD | Skip the permissibility check | - |

## Exporting parameters

| Parameter | Type | Description |
|---|---|---|
| STONR | TJ30-STONR | Status number |

## Exceptions

- OBJECT_NOT_FOUND: Status object not found
- STATUS_INCONSISTENT: Status combination is inconsistent
- STATUS_NOT_ALLOWED: User status not allowed

## Call template (ABAP)

```abap
CALL FUNCTION 'STATUS_CHANGE_EXTERN'
  EXPORTING
    objnr = lv_objnr
    user_status = lv_user_status
  IMPORTING
    stonr = lv_stonr
  EXCEPTIONS
    object_not_found = 1
    status_inconsistent = 2
    status_not_allowed = 3
    OTHERS = 4.
```

## Related tables

JCDS, JEST, JSTO, TJ30

