Show TOC

CHECK_TEXT_AUTHORITYLocate this document in the navigation structure

Use

Checks whether the user has authorization to display or change the specified text module. This function can only be used with texts of the type TEXT (texts which can be processed using transaction SO10 - standard texts). If the user has no authorization, the system terminates the function module with the exception NO_AUTHORITY. The system checks the user authorization in the authorization object S_SCRP_TXT.

Function call:

CALL FUNCTION 'CHECK_TEXT_AUTHORITY' 
EXPORTING OBJECT = 'TEXT'
NAME = ?...
ID = ?...
LANGUAGE = ?...
ACTIVITY = ?...
EXCEPTIONS NO_AUTHORITY =
            

Export parameters:

OBJECT

Enter the name of the text object allocated to the text. At present, only TEXT (standard texts) is allowed.

Reference field: THEAD-TDOBJECT

NAME

Enter the name of the text module for which to execute the check.

Reference field: THEAD-TDNAME

ID

This parameter contains the ID of the text.

Reference field: THEAD-TDID

LANGUAGE

Using this parameter you define the language key of the text module to be checked.

Reference field: THEAD-TDSPRAS

ACTIVITY

In the parameter ACTIVITY, you should specify the functions in the application program with which the text module should be processed.

Possible values:

  • 'SHOW' Text module should only be displayed

  • 'EDIT' Text module should be changed

Exceptions:

NO_AUTHORITY

The user is not authorized to edit the specified standard text (object TEXT) using the chosen function.

The system checks the authorization against the object S_SCRP_TXT with the fields text name, text ID within the text object TEXT, text language, and chosen activity.

Possible causes:

  • The parameter ACTIVITY contains the value 'SHOW' (display).

    The user is not authorized to display the specified text module, that is in the field ACTVT, the authorization value '03' is missing for the specified text.

  • The parameter ACTIVITY contains the value 'EDIT' (change).

    The user is not authorized to change the specified text module, that is in the field ACTVT, the authorization value '02' is missing for the specified text.

If none of these reasons is the cause of the error, the reason could be:

  • The field ACTIVITY contains an invalid value.

    Error when calling the authorization check. For information on this error, see the documentation of the ABAP statement AUTHORITY-CHECK.