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: 

in which table data is stored by text editor

Former Member
0 Kudos

we enter text in text editor control.

but i can't figure out :: it store the text entered in text editor in which table.

can you help me in this.

regards.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

yes joseph as per documentation , it store data in a txt file. but how do it read this file with "read_text".

i am very confused. there has to some database table .....

i don't know too confuse.

regards

18 REPLIES 18

Former Member
0 Kudos

you can use FM read_text.

to know wich parameters you have to enter in the function, procced as follow:

1/ put break point in TEXT_READ

2/ enter text in the text editor and save

3/ when you reach the degugger you can see wich parameters are entered in the function.

Former Member
0 Kudos

It's in STXL.

But, you know, maybe it's not always the best thing to go straight to the database. With application software like SAP, often it's good to find the right API or function module.

I agree - READ_TEXT.

Cheers

Dom

andreas_mann3
Active Contributor
0 Kudos

hi,

if you're speaking from CL_GUI_TEXTEDIT,

use method GET_SELECTED_TEXT_AS_R3TABLE

Andreas

Former Member
0 Kudos

i am using this class

CALL METHOD STEXT_EDITOR_202->SET_TEXT_AS_R3TABLE

EXPORTING

TABLE = SELECTED_TEXT.

we can save data using "SAVE_TEXT"

and read this data using "READ_TEXT"

but where does "save_text" save data, this i can't catch even with debugging.

regards.

0 Kudos

The texts are save in text file!

0 Kudos

hello joseph ,

sorry i can't get it.

can you please explain this in detail.

regards

0 Kudos

this what i read in the documentation of the function of the FM.

0 Kudos

CALL METHOD STEXT_EDITOR_202->SET_TEXT_AS_R3TABLE

EXPORTING

TABLE = SELECTED_TEXT.

this will only export the data to a itab (SELECTED_TEXT)

to save the same, you could save it in custom table , or write to a file, it depends on how the application is designed.

Tell us the program where you picked this code (if its a standard program) then we can tell you how SAVING is handled.

Regards

Raja

0 Kudos

to know more about CL_GUI_TEXTEDITOR check out the demo programs

SAPSCRIPT_DEMO_NOTE_EDITOR

SAPTEXTEDIT_DEMO_1

SAPTEXTEDIT_DEMO_3

Regards

Raja

0 Kudos

Raja,

i am refering to a SAP program for coding and it is working fine in my program.

all i want to know if it store data in a txt file, then how it retrieve data when required.

can you pls give me some link to read.

regards.

Former Member
0 Kudos

yes joseph as per documentation , it store data in a txt file. but how do it read this file with "read_text".

i am very confused. there has to some database table .....

i don't know too confuse.

regards

0 Kudos

Hi Surpreet,

Can you provide the link for the documentation.

Regards

Raja

0 Kudos

hello Raja,

in SE37 please see documentation of "save_text"

regards.

0 Kudos

save_text function is a different thing, its not used with class CL_GUI_TEXTEDIT.

also the documentation of SAVE_TEXT says that the saving to either file or text meory based on the text object.

if you could tell us, what exactly you wanted to do , may be we can come up with some sample code.

Regards

Raja

0 Kudos

Raja,

firstly my program is working fine, i want to know how FM "READ_TEXT" read text.

this is coding

refresh: ltxttab2. clear ltxttab2.

clear w_thead.

w_thead-tdobject = 'ZXYZ'.

w_thead-tdname = mrole.

w_thead-tdid = 'LTXT'.

w_thead-tdspras = sy-langu.

w_thead-tdfuser = sy-uname.

w_thead-tdfdate = sy-datum.

w_thead-tdftime = sy-uzeit.

CALL FUNCTION 'READ_TEXT'

EXPORTING

CLIENT = SY-MANDT

ID = 'LTXT'

LANGUAGE = sy-langu

NAME = W_XYZ-TDNAME

OBJECT = 'ZXYZ'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = LTXTTAB2

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.

regards

0 Kudos

i guess the confusion is becuase, you mentioned about <b>text edit control</b>

Read_text reads text from STXH , STXL, STXB (depending on the object) tables for a specific text object.

you can just go to these table (se16) and see yourself.

did i answer your question?

Regards

Raja

Former Member
0 Kudos

STXH -> Header table

STXL -> Table which stores the actual text.

Remember to reward points to the replies that answered your question.

Former Member
0 Kudos

Hi Surprise,

In order to read the text element you need to use FM READ_TEXT.

The texts are the long characters and they are stored in the unreadable format which makes them difficult to access directly via database so you have to use this FM.

Don't forgot to rewards points to replies which answer your question.

/Manik