Application Development 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: 

SAVE_TEXT

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

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

0 Kudos

Thanks Sudheer, and sorry for asking such sily question.

I awarded u the points..

Regards,

Rushikesh

Former Member
0 Kudos

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.