12-05-2007 4:59 AM
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
12-05-2007 5:09 AM
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
12-05-2007 6:57 AM
Hi,
I commented the Insert parameter and it still aint working. is there any other solution or FM
12-05-2007 7:05 AM
hi shilpa
check it
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
HEADER = THEAD
" INSERT = ' '
SAVEMODE_DIRECT = 'X'
IMPORTING
FUNCTION = DUMMY
NEWHEADER = THEAD
TABLES
LINES = XTLINE
EXCEPTIONS
ID = 01
LANGUAGE = 02
NAME = 03
OBJECT = 04.
ENDIF.
its useful
kk.
12-05-2007 7:09 AM
Hi, this is the code am using and am able to save if long text is edited but not able to if short text is converted into long text, let me know what should be changed
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = HEADER
INSERT = ' '
SAVEMODE_DIRECT = 'X'
IMPORTING
FUNCTION = FUNC
TABLES
LINES = LINES123
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
OBJECT = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
12-05-2007 7:21 AM
hi shilpa
try like this
data: P(10) TYPE P DECIMALS 2.
Data: v_num(4) type n value '1000',
v_long(10) type n .
v_long = v_num.
write: / v_long.
its useful for u
kk.
12-05-2007 7:26 AM