2010 Jul 23 12:50 AM
Hi Experts,
I am Using SAVE_TEXT FM to Dynamically Change Long Text for a message.
1. i am able to run succesfully SAVE_TEXT with SY-SUBRC = 0.
2. I can see the entry in STXH.
3. I have also performed COMMIT_TEXT with all the parameters and COMMIT_WORK.
4. I am able to See the changed Text using READ_TEXT FM.
but if i go to SE91 to the message no. and see long text i am not able to see the changed text.
also when change the long text of it in a program and call the error message we should be able to see the changed long text on click of error message in status bar but it shows the same message as in SE91.
Earlier for this Text Object & Text ID in SE75 Save mode was SPACE so i changed the same to Update still its not working.
Following are the details of my code-
REPORT YTEST_MES message-id ZFQM.
parameters : p_text type c.
at selection-screen.
if p_text <> 'C'.
data: HEADER LIKE THEAD.
data: t_lines type standard table of TLINE.
data: ls_lines like line of t_lines.
ls_lines-TDFORMAT = ' '.
ls_lines-TDline = 'TEST1 TEST2 TEST3'.
append ls_lines to t_lines.
Header-TDOBJECT = 'DOKU'.
Header-TDNAME = 'ZFQM093'.
Header-TDID = 'NA'.
Header-TDSPRAS = 'EN'.
Header-TDFORM = 'S_DOCU_SHOW'.
Header-TDSTYLE = 'S_DOCUS1'.
Header-TDLINESIZE = '72'.
*
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = header
INSERT = 'X'
tables
lines = t_lines
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.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = 'DOKU'
NAME = 'ZFQM093'
ID = 'NA'
LANGUAGE = SY-LANGU
.
COMMIT WORK AND WAIT.
message e093 with 'C' 'XXXX'.
endif.
I have tried calling SAVE_TEXT will possible combination's of INSERT = 'X' or space or
SAVEMODE_DIRECT = 'X' or Both Space or 'X'.
I know i am missing a small thing...but was unable to figure out the same.
Please Help.
Regards,
Akash
2010 Jul 23 5:17 AM
HI,
That is the problem with SAVE_TEXT, it does not append lines to the existing text but edits it completely.
If you want to append to an existing long text, you'll have to read the text first using READ_TEXT and then append the other lines to that table and then use SAVE_TEXT with the whole appended table.
For your referrence:
May it helps you.
Regards.
DS
2010 Jul 23 9:43 AM
Hi Deepak,
Thanks for ur reply, but my issue is not that SAVE_TEXT Chnages the complete text, i need to chnage the text completely each time.
My Problem is i am not able to see the saved text in se91 long text or when i raise an error message with the corresponding message no. from that message class, and when i click on the error message in status bar we should see the long text if declared, but i am not able to see the saved text ,
but if i read trhe text using FM Read_text i can see the saved text done by FM save_text.
Do we have to perform any other new task after save_text except commit_text and commit work.
Please help.
Akash
2010 Jul 23 10:09 AM
In SE91 against the SE91 message there is a checkbox for "self explanatory". Is the checkbox checked ?
@Keshav: By clicking on the "long text" button of the application tollbar
Edited by: Suhas Saha on Jul 23, 2010 2:43 PM
2010 Jul 23 10:15 AM
Hi Suhas,
I was pretty confused by the question , now i got it
2010 Jul 23 10:07 AM
but if i go to SE91 to the message no. and see long text i am not able to see the changed text
how can you view the text in se91 ?
2010 Jul 23 10:19 AM
2010 Jul 23 11:44 AM
Hi Keshav.T ,
Thanks for your answer, but all the above FM u provided-
read_text
init_text
edit_text
Cannot be used as-
Read_TEXT - I want to change Text not read it.
INIT_TEXT- this cannot be used to change texts.
EDIT_TEXT- this function module Opens the Long text screen
and we have to manually save it, but i want to save the text automaticaly
all this is done using SAVE_TEXT.
Only problem is I am missing something after the call of SAVE_TEXT because text is changed
as i can see that using read_text FM but if i go to SE91 and see long text for the corresponding message no. i cannot see the
changed text done bu SAVE_TEXT.
Please help.
Akash
2010 Jul 23 12:04 PM
try passing SAVEMODE_DIRECT = 'X' in save_text fm and remove commit_text.
2010 Jul 23 12:14 PM
2010 Jul 23 1:06 PM
Hi,
Refer to the reply by suhas
In SE91 against the SE91 message there is a checkbox for "self explanatory". Is the checkbox checked ?
That may be reason why you are not able to see the long text in se91.
Regards
Vinod
2010 Jul 23 1:52 PM
Hi Vinod,
Thanks for ur reply,
If self explanatory Check Box is checked we cannot create a Long Text,
No Its not checked.
Regards,
Akash
2010 Sep 09 3:19 PM
2010 Dec 21 10:58 AM
Hi Akash,
can you please share your solution, I am facing same issue.
Thanks,
Manfred