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

Read saved text using a text editor

Former Member
0 Likes
870

Hi all

I have created a text editor and have saved its text using save_text. It is working fine for me. My problem is how to read the saved text.

Please help.

Any pointers would be highly appreciated.

Regards

Dinesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
737

Hi,

before saving the text,check the save mode in table TTXOB for the TDOBJECT u have used.If it is D,then u have to use

FMs- SAVE_TEXT to save

COMMIT_TEXT to update in DB.

If save mode is V,u have to use

INTTAB_SAVE_TEXT and

INTTAB_COMMIT_TEXT .

For both to read u can use the FM- READ_TEXT to read the saved text later.

<b>Reward if useful</b>

thanks

5 REPLIES 5
Read only

alpesh_saparia3
Active Contributor
0 Likes
737

You can use function module <b>READ_TEXT</b> or <b>READ_INLINE_TEXT</b>.

- Alpesh

Read only

Former Member
0 Likes
738

Hi,

before saving the text,check the save mode in table TTXOB for the TDOBJECT u have used.If it is D,then u have to use

FMs- SAVE_TEXT to save

COMMIT_TEXT to update in DB.

If save mode is V,u have to use

INTTAB_SAVE_TEXT and

INTTAB_COMMIT_TEXT .

For both to read u can use the FM- READ_TEXT to read the saved text later.

<b>Reward if useful</b>

thanks

Read only

Former Member
0 Likes
737

hi dinesh

to read the text use read_text and pass the required import , export & table parameters.. some of them are

SY-MANDT

THEAD-TDID

THEAD-TDSPRAS

THEAD-TDNAME

THEAD-TDOBJECT

text hearder wil be in THEAD STRUCTURE

text lines wil be in STRUCTURE TLINE

for further information refer the READ_TEXT fm.

reagrds

Read only

Former Member
0 Likes
737

Hi Dinesh,

Use FM 'Read_Text' and pass appropriate parameters.

Refer this code :

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = '0001'

LANGUAGE = 'EN'

NAME = Thead-tdname

OBJECT = 'VBAK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

IMPORTING

HEADER = IT_HEADER1

TABLES

LINES = IT_LINES2

EXCEPTIONS

ID = 1

LANGUAGE = 2

NAME = 3

NOT_FOUND = 4

OBJECT = 5

REFERENCE_CHECK = 6

WRONG_ACCESS_TO_ARCHIVE = 7

OTHERS = 8

Regards,

Hemant

Read only

Former Member
0 Likes
737

Thanks for the inputs.