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

EDIT_TEXT

Former Member
0 Likes
1,230

Hi,

I am using EDIT_TEXT function to show and save text.

I need in some cases to open that screen in read and edit mode, is there any way I can do this?.

  • I need to show the previous text and to "Insert" news...

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,185

HI

Before usin the edit_text. first read the previous test using the READ_TEXT,and store in internal table.

Now use the EDIT_TEXT and pass the above read data to it,and set the save ind = 'X'.

it_ITCEDi-CHANGEMODE = 'X'

CALL FUNCTION 'EDIT_TEXT'

EXPORTING

HEADER = it_theadi

SAVE = 'X'

CONTROL = it_ITCEDi

IMPORTING

  • FUNCTION =

NEWHEADER = it_theadi

  • RESULT =

TABLES

LINES = it_TLINEi

EXCEPTIONS

ID = 1

LANGUAGE = 2

LINESIZE = 3

NAME = 4

OBJECT = 5

TEXTFORMAT = 6

COMMUNICATION = 7

OTHERS = 8.

regards,

Raghu.

4 REPLIES 4
Read only

Former Member
0 Likes
1,186

HI

Before usin the edit_text. first read the previous test using the READ_TEXT,and store in internal table.

Now use the EDIT_TEXT and pass the above read data to it,and set the save ind = 'X'.

it_ITCEDi-CHANGEMODE = 'X'

CALL FUNCTION 'EDIT_TEXT'

EXPORTING

HEADER = it_theadi

SAVE = 'X'

CONTROL = it_ITCEDi

IMPORTING

  • FUNCTION =

NEWHEADER = it_theadi

  • RESULT =

TABLES

LINES = it_TLINEi

EXCEPTIONS

ID = 1

LANGUAGE = 2

LINESIZE = 3

NAME = 4

OBJECT = 5

TEXTFORMAT = 6

COMMUNICATION = 7

OTHERS = 8.

regards,

Raghu.

Read only

0 Likes
1,185

Any way to show and edit at same screen???

ex: like a table control that is the 5 firsts lines are only output and the others are editabled...

Thx for help

...

I'll try to speak my problem.

I'm using the FM read_text to get the lines...

That lines we cannot edit, only to insert another, undertand?

Regards,

Edited by: Allan Cristian on Sep 10, 2009 2:03 PM

Read only

0 Likes
1,185

Then you need to use class CL_GUI_TEXTEDIT instead of EDIT_TEXT function module

Create 2 containers 1 with read only and 2nd with Edit mode

Please check the example program SAPTEXTEDIT_DEMO_1

Read only

0 Likes
1,185

Hi a®s,

thx again, I'll check the program...

Regards,