# AUTHORITY_CHECK_TCODE — Authorization Check for Starting a Transaction

> Checks whether the current user is authorized (S_TCODE) to start the given transaction code. Custom programs that open another transaction with CALL TRANSACTION use it to check authorization before the call. The result comes back as an exception: OK is raised when authorized and NOT_OK otherwise, so check sy-subrc.

- Modules: BASIS
- Type: Function module
- Function group: SUSE
- Remote-enabled (RFC): No
- S/4HANA status: Used the same way in S/4HANA
- URL: https://nekuhub.com/en/functions/authority-check-tcode/

## Importing parameters

| Parameter | Type | Description | Required |
|---|---|---|---|
| TCODE | TSTC-TCODE | Transaction code | Yes |

## Exceptions

- OK: Authorized
- NOT_OK: Not authorized

## Call template (ABAP)

```abap
CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
  EXPORTING
    tcode = lv_tcode
  EXCEPTIONS
    ok = 1
    not_ok = 2
    OTHERS = 3.
```


