Start of Content Area

Process documentation Finding Texts  Locate the document in its SAP Library structure

This topic tells you how to find out which texts belong to an application object.

The name of SAPscript texts (field TDNAME) should correspond to the key of the application object to which the text is allocated. Different text types among the texts of an application object are determined by the text ID (field TDID) and by the language of the text.

If the text name corresponds to the key of the application object, you can identify all texts belonging to that object by the key. You need not store fields in the data record of the application object that contain the text name.

If an application transaction wants to know which texts exist for a material or a customer, it calls the function module SELECT_TEXT to find out. The function module in a result table returns the headers of all texts that match the selection criteria.

The function module selects texts not only from the text database, but also from the text memory.

Example

You want to find all texts that belong to customer 4711 (centrally). The allocated text object is KNA1. The system returns the text headers of the found texts in table CUSTOMER_TEXTS:

DATA: CUSTOMER_TEXTS LIKE THEAD OCCURS 10.

CALL FUNCTION 'SELECT_TEXT'

EXPORTING OBJECT = 'KNA1'

NAME = '0000004711'

ID = '*'

LANGUAGE = '*'

TABLES SELECTIONS = CUSTOMER_TEXTS.

If you want to search for the texts of a customer in the company code 0001, use the following parameters of the function module SELECT_TEXT:

Example

CALL FUNCTION 'SELECT_TEXT'

EXPORTING OBJECT = 'KNB1'

NAME = '00000047110001'

ID = '*'

LANGUAGE = '*'

TABLES SELECTIONS = CUSTOMER_TEXTS.

If you do not know the structure of the text name, use the corresponding application transaction to display one of the texts in the text editor and request information on the text by choosing Goto Header. The text name of this text appears, from which you can now easily determine the text name structure.