SELECT_TEXT creates a table from the text headers of all text modules that match the selections specified in the fields OBJECT, NAME, ID, and LANGUAGE. The entries in the fields OBJECT, NAME, ID, and LANGUAGE can also be generic.
Usually, the function module searches for texts in the text file as well as in the text memory. To limit the search area, use the options TEXTMEMORY_ONLY or DATABASE_ONLY.
If the option ARCHIV_HANDLE contains a value greater than 0, the system searches the archive for the specified texts.
Function call:
CALL FUNCTION 'SELECT_TEXT'
EXPORTING CLIENT = SY-MANDT
OBJECT = ?...
NAME = ?...
ID = ?...
LANGUAGE = ?...
DATABASE_ONLY = SPACE
TEXTMEMORY_ONLY = SPACE
ARCHIVE_HANDLE = 0
IMPORTING ENTRIES =
TABLES SELECTIONS = ?...
EXCEPTIONS WRONG_ACCESS_TO_ARCHIVE =
Export parameters:
CLIENT |
Specify the client, in which to search for the texts. If you omit this parameter, the system uses the current client as default. Reference field: SY-MANDT Default value: SY-MANDT |
OBJECT |
Enter the name of the text object of the text you want to find. You can enter a generic value. Reference field: THEAD-TDOBJECT |
NAME |
Enter the name of the text module you want to find. You can enter a generic value. Reference field: THEAD-TDNAME |
ID |
Enter a text ID. You can enter a generic value. Reference field: THEAD-TDID |
LANGUAGE |
Enter the language key of the text module you want to find. You can enter a generic value. The system then searches for the text in all languages that match the entry. Reference field: THEAD-TDSPRAS |
DATABASE_ONLY |
Mark this field if you want to search for the text modules in the text file only. Possible values: ' ' search in text file and text memory 'X' search in text file only Default value: SPACE |
TEXTMEMORY_ONLY |
Mark this field if you want to search for the text modules in the text memory only. Possible values: ' ' search in text file and in text memory 'X' search in text memory only Default value: SPACE |
ARCHIVE_HANDLE |
If you want the system to search for the text modules in the archive, you must enter a handle here. The system needs the handle to access the archive. You can use the function module ACHIVE_OPEN_FOR_READ to create the handle. Reference field: SY-TABIX Default value: 0 |
Import parameters:
ENTRIES |
ENTRIES contains the number of selected text modules. This value corresponds to the number of lines in table SELECTIONS. Reference field: SY-TFILL |
Table parameters:
SELECTIONS |
The table SELECTIONS contains the text headers of all found texts that match the selection criteria specified in the call of function module SELECT_TEXT. Structure: THEAD |
Exceptions
:WRONG_ACCESS_TO _ARCHIVE |
The exception WRONG_ACCESS_TO_ARCHIVE is triggered if an archive is accessed using an incorrect or non-existing archive handle or an incorrect mode (that is, read if the archive is open for writing or vice versa). |