Start of Content Area

CHECK_TEXT_AUTHORITY   Locate the document in its SAP Library structure

The function module checks whether the user is authorized to display or change the specified text module. You can use this function for texts of object type TEXT only. These are the standard texts that you edit using transaction SO10. 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

Enter the ID of this text.

Reference field: THEAD-TDID

LANGUAGE

Enter the language key of this text.

Reference field: THEAD-TDSPRAS

ACTIVITY

In the parameter ACTIVITY, you must specify the functions used to edit the text module in the application program.

Possible values:

‘SHOW’ display the test module

'EDIT' change the text module

 

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 reasons:

  • 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 non 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.