READ_TEXT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name READ_TEXT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
STXD
Released Date:
16.01.1995
Processing type: Normal fucntion module
CALL FUNCTION 'READ_TEXT' "SAPscript: Read text
EXPORTING
* client = SY-MANDT " sy-mandt Client
id = " thead-tdid Text ID of text to be read
id = " thead-tdid Text ID invalid
language = " thead-tdspras Language of text to be read
language = " thead-tdspras Invalid language
name = " thead-tdname Name of text to be read
name = " thead-tdname Invalid text name
object = " thead-tdobject Object of text to be read
object = " thead-tdobject Invalid text object
* archive_handle = 0 " sy-tabix Archive Handle
* local_cat = SPACE " Text catalog local
IMPORTING
header = " thead Text header of text read
old_line_counter = " thead-tdtxtlines Original Number of Text Lines
TABLES
lines = " tline Lines of text read
EXCEPTIONS
ID = 1 " Text ID of text to be read
ID = 1 " Text ID invalid
LANGUAGE = 2 " Language of text to be read
LANGUAGE = 2 " Invalid language
NAME = 3 " Invalid text name
NAME = 3 " Name of text to be read
NOT_FOUND = 4 " Text not found
OBJECT = 5 " Invalid text object
OBJECT = 5 " Object of text to be read
REFERENCE_CHECK = 6 " Reference chain interrupted
WRONG_ACCESS_TO_ARCHIVE = 7 " Archive handle invalid for access
. " READ_TEXT
The ABAP code below is a full code listing to execute function module READ_TEXT including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).
| ld_header | TYPE THEAD , |
| ld_old_line_counter | TYPE THEAD-TDTXTLINES , |
| it_lines | TYPE STANDARD TABLE OF TLINE,"TABLES PARAM |
| wa_lines | LIKE LINE OF it_lines . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_header | TYPE THEAD , |
| ld_client | TYPE SY-MANDT , |
| it_lines | TYPE STANDARD TABLE OF TLINE , |
| wa_lines | LIKE LINE OF it_lines, |
| ld_old_line_counter | TYPE THEAD-TDTXTLINES , |
| ld_id | TYPE THEAD-TDID , |
| ld_id | TYPE THEAD-TDID , |
| ld_language | TYPE THEAD-TDSPRAS , |
| ld_language | TYPE THEAD-TDSPRAS , |
| ld_name | TYPE THEAD-TDNAME , |
| ld_name | TYPE THEAD-TDNAME , |
| ld_object | TYPE THEAD-TDOBJECT , |
| ld_object | TYPE THEAD-TDOBJECT , |
| ld_archive_handle | TYPE SY-TABIX , |
| ld_local_cat | TYPE STRING . |
INCLUDE STXD_PF_READ_TEXT OBJECT DOKU ID TX
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name READ_TEXT or its description.