08-02-2005 10:14 AM
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.
08-02-2005 10:51 AM
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
08-02-2005 10:18 AM
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.
08-02-2005 10:20 AM
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
08-02-2005 10:26 AM
hi,
if you're speaking from CL_GUI_TEXTEDIT,
use method GET_SELECTED_TEXT_AS_R3TABLE
Andreas
08-02-2005 10:30 AM
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.
08-02-2005 10:34 AM
08-02-2005 10:38 AM
hello joseph ,
sorry i can't get it.
can you please explain this in detail.
regards
08-02-2005 10:43 AM
08-02-2005 10:44 AM
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
08-02-2005 10:46 AM
to know more about CL_GUI_TEXTEDITOR check out the demo programs
SAPSCRIPT_DEMO_NOTE_EDITOR
SAPTEXTEDIT_DEMO_1
SAPTEXTEDIT_DEMO_3
Regards
Raja
08-02-2005 10:54 AM
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.
08-02-2005 10:51 AM
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
08-02-2005 10:56 AM
Hi Surpreet,
Can you provide the link for the documentation.
Regards
Raja
08-02-2005 11:03 AM
hello Raja,
in SE37 please see documentation of "save_text"
regards.
08-02-2005 11:30 AM
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
08-02-2005 11:39 AM
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
08-02-2005 11:49 AM
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
08-02-2005 11:52 AM
STXH -> Header table
STXL -> Table which stores the actual text.
Remember to reward points to the replies that answered your question.
08-02-2005 12:04 PM
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