2006 Jun 10 7:03 AM
Hi
I have to update long text in QE01 transaction.
i am usin "Save_text" function module.
But some text already exist there.
I need to update that text by adding the further text to the original.
its only allowing me to add new text i.e Insert = 'X' is working.
but i need to append to the original.
How do i do?
Thanks
kapil
2006 Jun 10 7:27 AM
2006 Jun 10 7:22 AM
Hi Kapil,
You can first read the existing text using READ_TEXT fm and then do all the string processing in ur program and then using SAVE_TEXT u can update the test.
Cheers
VJ
2006 Jun 10 7:27 AM
2006 Jun 10 8:23 AM
Hi Vijay/Vijayendra
I have updated the text, but the line in which the text was already present doesnt seem to be changed.
But when i m using read_text its showing me the modified text.
what can be the problem here?
thanks
kapil
2006 Jun 10 8:51 AM
Can you check you are reading the same text, check the object or parameters you are passing?
Regds
Manohar
2006 Jun 12 7:06 AM
Hi,
even i observed the same there might be some problem in showing the modifeid text but the modfied text is added to tables.i think you are checking in QE02,if you want to see the results check in QE03.
in QE03 you can see the new text along with old text.
Regards
vijay
2006 Jun 12 9:52 AM
before using SAVE_TEXT, first you use READ_TEXT to read the existing text if any & then append your new text to that internal table & then call SAVE_TEXT with the updated internal table.
*--LOCAL VARIABLES
DATA : lv_name TYPE thead-tdname,
lv_temp(128) TYPE c ,
*--Structure to Hold the Header Data for Func Modules
*--Read_text & Save_text.
x_header TYPE thead .
CLEAR : lv_name ,
lv_temp ,
v_ind_fg ,
x_header ,
it_tlines ,
it_tlines[] .
lv_name = p_delv_no . "this is my delivery no.
x_header-tdobject = 'VBBK'.
x_header-tdname = lv_name . "P_DELV_NO.
x_header-tdid = 'ZMAN'.
x_header-tdspras = 'E'.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = x_header-tdid
language = x_header-tdspras
name = x_header-tdname
object = x_header-tdobject
TABLES
lines = it_tlines
EXCEPTIONS
id = 1
language = 2
name = 3
not_found = 4
object = 5
reference_check = 6
wrong_access_to_archive = 7
OTHERS = 8.
IF sy-subrc <> 0 AND sy-subrc <> 4 .
return-type = sy-msgty.
return-id = sy-msgid .
return-number = sy-msgno .
CONCATENATE text-004
'Error Occured in Reading the Manifest data for the Delivery No :'
p_delv_no
INTO return-message SEPARATED BY space.
return-message_v1 = sy-msgv1 .
return-message_v2 = sy-msgv2 .
return-message_v3 = sy-msgv3 .
return-message_v4 = sy-msgv4 .
APPEND return.
CLEAR return.
*--Clear IT_TEXT[] which not appending for Manifest data for this VBELN.
CLEAR :it_text,
it_text[] .
v_ind_fg = 'X' .
EXIT .
ENDIF.
<b>*--here if any text exists in it_tlines internal table, my new text i am appending it to that from IT_TEXT table.</b>
LOOP AT it_text .
CONCATENATE '|'
it_text-traid ';'
it_text-bolnr ';'
it_text-curr_code ';'
it_text-carr_charges
INTO lv_temp.
it_tlines-tdformat = '*'.
it_tlines-tdline = lv_temp.
APPEND it_tlines.
CLEAR it_tlines.
ENDLOOP.
*--now i am calling SAVE_TEXT with updated it_tlines.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = x_header
*--give this mode = x.
<b> savemode_direct = 'X'</b>
TABLES
lines = it_tlines
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
regards
Srikanth
Message was edited by: Srikanth Kidambi