Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to Use Function Module READ_TEXT

Former Member
76,817

Hi

Anyone give me code or link or example for how to use function module READ_TEXT

and what are the parameters which we have to pass in module.

Regards.

Mohsin

10 REPLIES 10
Read only

viquar_iqbal
Active Contributor
Read only

Former Member
0 Likes
27,394

see this link:

http://www.sap-img.com/abap/use-fm--read-text-to-read-the-various-text.htm

http://www.sapfans.com/forums/viewtopic.php?f=13&t=310761

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = '0001'

LANGUAGE = 'E'

NAME = XNAME

OBJECT = 'VBBP'

TABLES

LINES = i_XTLINE

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6.

Read only

Former Member
0 Likes
27,394

Hi,

refer the given below code.



CALL FUNCTION 'READ_TEXT'
  EXPORTING
   CLIENT                        = SY-MANDT
    id                            = 'KOPF'uF0E0 these details we will get thru transaction , where we enter these details.
    language                      = 'EN'uF0E0 these details we will get thru transaction , where we enter these details.

    name                          = TNAME  "table name
    object                        = 'AUFK'    " these details we will get thru transaction , where we enter these details.

*   ARCHIVE_HANDLE                = 0
*   LOCAL_CAT                     = ' '
IMPORTING
   HEADER                        = HTEXT
  tables
    lines                          = LTEXT
* EXCEPTIONS
*   ID                            = 1
*   LANGUAGE                      = 2
*   NAME                          = 3
*   NOT_FOUND                     = 4
*   OBJECT                        = 5
*   REFERENCE_CHECK               = 6
*   WRONG_ACCESS_TO_ARCHIVE       = 7
*   OTHERS                        = 8
          .
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Thanks

Arun

Read only

Former Member
0 Likes
27,394

go to any text in po or sales or mm03.see the header of the text.

goto se37 exicute fm,

by giving those values

Read only

kamesh_g
Contributor
0 Likes
27,394

Hi

Functiionality of READ_TEXT is

IF you give TX id .. it will return text corresponding to particular text id .

For testing purpose take one text id from tcode SE75 and execute the FM

YOu will get text .

Read only

Former Member
0 Likes
27,394

Hi,

Thank U,

Jay....

Read only

Former Member
27,394

you can use this a reference.



DATA: BEGIN OF HTEXT.
INCLUDE STRUCTURE THEAD.
DATA: END OF HTEXT.

DATA: BEGIN OF LTEXT OCCURS 50.
INCLUDE STRUCTURE TLINE.
DATA: END OF LTEXT.

DATA: tdname like VBDPA-tdname.

CALL FUNCTION 'READ_TEXT' 
EXPORTING 
ID = '0001' 
LANGUAGE = 'E' 
NAME = TDNAME
OBJECT = 'VBBK' 
HEADER = HTEXT
TABLES
LINES = LTEXT
EXCEPTIONS 
ID = 1 
LANGUAGE = 2 
NAME = 3 
NOT_FOUND = 4 
OBJECT = 5 
REFERENCE_CHECK = 6.

regards,

Mon Magallanes

Read only

Former Member
0 Likes
27,394

Try this,

DATA:TEXTNAME LIKE THEAD-TDNAME,

TEXTHEADER LIKE THEAD.

CALL FUNCTION 'READ_TEXT'

EXPORTING NAME = TEXTNAME

LANGUAGE = SY-LANGU

OBJECT = 'TEXT'

ID = 'ST '

IMPORTING HEADER = TEXTHEADER

TABLES LINES = TEXTLINES

EXCEPTIONS OTHERS = 1.

CHECK SY-SUBRC = 0.

Regards,

Joan

Read only

Former Member
0 Likes
27,394

hi,

try this link

[;

hope thi shelp you

Regards

Ritesh J

Read only

Former Member
27,393

Hi,

read the documention for the FM..OBJECT, NAME, ID, and LANGUAGEare the mandatory parameters..if u have doubt as to what to pass to this values,refer table STXH to get ur parameters