Application Development 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: 

table for texts in a program

Former Member
0 Kudos

Hi everybody,

I would like to know in which table is stored the information and text elements from any Z program that programmers can define through Go to, text elements, text symbols.

Thanks,

Cristina.

1 ACCEPTED SOLUTION

former_member181962
Active Contributor
0 Kudos

A simpler alternative would be:

READ TEXTPOOL <Program Name> INTO itab LANGUAGE sy-langu.

Regards,

ravi

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos

A simpler alternative would be:

READ TEXTPOOL <Program Name> INTO itab LANGUAGE sy-langu.

Regards,

ravi

0 Kudos

I've already found it but I was trying to make a query in order to have a set of programs in which to request the whole set of texts, not only the ones from one program.

Maybe I'll try to do it with a program that selects names from Z programs and later, executes one read pool texts for each Z program.

Thanks,

Cristina.

0 Kudos

In general all the texts are stored in STXH and STXL tables , but the data it not human readable. It is in raw format, which can only be read using FMs like READ_TEXT.

Regards,

Ravi

0 Kudos

Read_text function module

First select corresponding fields of table itab_stxh against pono.

Stxh-tdname (text name) = PO No

Stxh-tdobject (text object) = EKKO

Stxh-tdid (text-id) = f01,f03,f05 (line items of itab)

Loop at itab and pass above arguments u ll get back the text detail of each row of itab ie against each id and put it in a wa having field like tline-tdline..

REPORT ZREADTEXT.

parameters: po like ekko-ebeln.

data : begin of itab_stxh occurs 0.

include structure stxh.

data : end of itab_stxh.

DATA: wa_TEXT like TLINE occurs 0 with header line.

data : begin of it_text occurs 0,

tdid like itab_stxh-tdid,

tdline like tline-tdline,

end of it_text.

*DATA: it_TEXT like TLINE occurs 0 with header line.

select * into corresponding fields of table itab_stxh from stxh where

tdname = po.

loop at itab_stxh.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

id = itab_stxh-tdid

language = sy-langu

name = itab_stxh-tdname

object = itab_stxh-tdobject

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

tables

lines = wa_text

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

loop at wa_text.

MOVE wa_TEXT-TDLINE TO IT_text-TDLINE .

move itab_stxh-tdid to it_text-tdid.

APPEND IT_text .

endloop.

break-point.

write : / itab_stxh-tdid, itab_stxh-tdobject.

endloop.

loop at it_text.

write : / it_text-tdid, it_text-tdline.

endloop.

Former Member
0 Kudos

use FM <b>RS_TEXTPOOL_READ</b>

give objectname as Programname