04-14-2010 8:27 AM
Dear All
I can not edit text using Function "edit_text" ,Below is a simple test.
It work fine if I remove below threr rows. I don`t know why. Please give me hand. Thanks
As the following three rows is necessary for me.
MOVE '>' to tltxt-TDFORMAT.
MOVE '+++ 20100414 112428 TANGCHER 6510' to tltxt-tdline.
append TLTXT.
Pls guide. Thanks.
-
REPORT ZTEST.
DATA: IT_TLINE LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: TIT_HTXT LIKE THEAD,
W_UFLAG,
TLTXT LIKE IT_TLINE OCCURS 0 WITH HEADER LINE.
DATA: L_CONTROL LIKE ITCED.
CLEAR: TIT_HTXT, W_UFLAG.
TIT_HTXT-TDOBJECT = 'KNKK'.
TIT_HTXT-TDID = '0003'.
TIT_HTXT-TDSPRAS = SY-LANGU.
TIT_HTXT-TDLINESIZE = '072'.
TIT_HTXT-TDNAME(10) = 'XXXXXXXXXX'.
TIT_HTXT-TDNAME+10 = '6510'.
MOVE '>' to tltxt-TDFORMAT.
MOVE '+++ 20100414 112428 TANGCHER 6510' to tltxt-tdline.
append TLTXT.
MOVE '*' to tltxt-TDFORMAT.
MOVE 'test text edit' to tltxt-tdline.
append TLTXT.
CALL FUNCTION 'EDIT_TEXT'
EXPORTING
HEADER = TIT_HTXT
DISPLAY = ' '
SAVE = ' '
EDITOR_TITLE = 'TEST'
" CONTROL =
IMPORTING
FUNCTION = W_UFLAG
TABLES
LINES = TLTXT
EXCEPTIONS
ID = 1 .
AUTHORITY-CHECK OBJECT 'F_BKPF_BUK'
ID 'BUKRS' FIELD TVKO-VKORG
ID 'ACTVT' FIELD '03'.
AUTHORITY-CHECK OBJECT 'ZOJS_SALOF'
ID 'VKORG' FIELD TVKO-VKORG
ID 'ACTVT' FIELD '03'.
04-14-2010 8:32 AM
Hi,
Add this line to your code
MOVE '*' to tltxt-TDFORMAT. "----
>Add this line
MOVE '+++ 20100414 112428 TANGCHER 6510' to tltxt-tdline.
Regards,
lakshman.
04-14-2010 2:06 PM
Yes. If i remove below line. it will work fine also .
But I can not remove it or add new a line . Coz there are very very many data like it in product host.
it is very funny .It work fine last month, Today it doesn`t work suddenly, Meanwhile I don`t make any change to the report.
You know why ? Thanks.
MOVE '>' to tltxt-TDFORMAT. "----
>
Edited by: SHI CHUN QING on Apr 15, 2010 3:14 AM
08-12-2010 6:00 AM