Hi,
I am trying to use the FM SAVE_TEXT to mofify a long text of a milestone, the problem is if there is a short text that exists( no long text) and am trying to extend it to long text the FM 'SAVE_TEXT' does not work, where as if there is a long text that exists for the milestone and i try to modify/add few more lines, the FM 'SAVE_TEXT' works, let me know how does it work for short text converted into long text
Dear Sreelakshmi,
Last time when I met this issue, it is the reason is the import parameter:
INSERT = 'X'
After I removed this parameter, the error was gone too.
The following is the source code for your reference:
call function 'INIT_TEXT'
exporting
id = id
language = sy-langu
name = l_name
object = object
importing
header = l_header
tables
lines = l_t_lines
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5.
if sy-subrc <> 0.
clear l_msgtab.
l_msgtab-message_v1 = sy-subrc.
l_msgtab-type = c_error.
l_msgtab-message = text-042.
append l_msgtab to msgtab.
endif.
check msgtab[] is initial.
append lines of lines[] to l_t_lines[].
call function 'SAVE_TEXT'
exporting
client = sy-mandt
header = l_header
insert = c_yes
savemode_direct = c_yes
owner_specified = c_yes
local_cat = ' '
importing
function = l_function
newheader = l_header
tables
lines = l_t_lines
exceptions
id = 1
language = 2
name = 3
object = 4
others = 5.
if sy-subrc <> 0.
clear l_msgtab.
l_msgtab-message_v1 = sy-subrc.
l_msgtab-type = c_error.
l_msgtab-message = text-043.
append l_msgtab to msgtab.
endif.
Regards,
Norman
Add a comment