08-20-2007 12:37 PM
Hi,
I am using SAVE_TEXT function module to insert the Text in STO(ME22N).
My Req is to insert the new Text in the new line, But the existing Text is
getting overwritten.
Pl find my code as follows:-
thead-tdid = 'F01'.
thead-tdspras = sy-langu.
thead-tdobject = 'EKPO'.
MOVE wg_open-vbeln TO thead-tdname.
MOVE wg_open-posnr1(5) TO thead-tdname10(5).
ttab-tdformat = '/*'.
ttab-tdline = p_lv_comments.
APPEND ttab.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
header = thead
insert = 'X'
savemode_direct = 'X'
TABLES
lines = ttab
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
Is there some system constraint or Coding bug? Pl suggest some solution...
Regards,
Rushikesh
08-20-2007 12:40 PM
Hi,
it is simple, just follow this steps
First use the READ_TEXT function module to read the text, then the text will come in an internal table, then Append your lines to that internal table, so now the internal table will be having the text whcih is already there and your new text, then use the SAVE_TEXT function module, so that the old text under that the new test will be appear
Regards
Sudheer
08-20-2007 12:40 PM
Hi,
it is simple, just follow this steps
First use the READ_TEXT function module to read the text, then the text will come in an internal table, then Append your lines to that internal table, so now the internal table will be having the text whcih is already there and your new text, then use the SAVE_TEXT function module, so that the old text under that the new test will be appear
Regards
Sudheer
08-20-2007 1:53 PM
Thanks Sudheer, and sorry for asking such sily question.
I awarded u the points..
Regards,
Rushikesh
08-20-2007 1:10 PM
Hi,
i wiil check your code without tdline it is working fine. But may be your text more than 250 characters .
Rewards points if it is useful.