Posted: Wed Oct 17, 2007 6:53 pm Post subject: Text elements and text symbols
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.
1) A simpler alternative would be:
READ TEXTPOOL <Program Name> INTO itab LANGUAGE sy-langu.
2) 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.
3) 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..
Code:
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.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.