Problem in SAVE_TEXT
Hi All,
I use SAVE_TEXT to save long text to projct,But
I am uploading the long text using SAVE_TEXT function module
I can see the data in STXL table and i can use READ_TEXT to get the long text
but the Long text data is not diaplying on the scrreen.
Who know ,Please Help me
header-tdname = ‘D00000154'.
header-tdobject = 'PMS'.
header-tdid = 'LTXT'.
header-tdspras = '1'.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = header
savemode_direct = 'X'
TABLE
lines = gt_tline[]
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
Best Regards
wangyuan
1 execute SAVE_TEXT
2 execute READ_TEXT
3 See cj02 the project long text ,Long text data is not diaplying on the scrreen
Who know the reason or tell me how i can do
Similar Messages
-
Problem in SAVE_TEXT function module
Hi all,
I am facing problem in updating the text to PO when using the FM SAVE_TEXT. The first line of the header text is being populated but not second line. I am putting sqnumber as 2, but still it is not populating. I am using correct object name , id and etc..
any idea.
SriHi,
Try something like:
FORM update_text USING fp_rec_text TYPE ty_text
fp_rec_vbeln_vbeln TYPE vbeln_va.
*Local declaration
DATA: l_header TYPE thead, "Header text
l_rec_line TYPE tline. "Text
DATA: l_i_line TYPE STANDARD TABLE OF tline
INITIAL SIZE 0. " Internal Table for l_line
l_header-tdobject = c_object.
l_header-tdname = fp_rec_vbeln_vbeln.
l_header-tdid = fp_rec_text-tdid.
l_header-tdspras = c_lang.
l_rec_line-tdformat = c_format.
l_rec_line-tdline = fp_rec_text-tdline.
APPEND l_rec_line TO l_i_line.
*Call subroutine to modify text
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = l_header
savemode_direct = c_flag
TABLES
lines = l_i_line
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE i000 WITH 'Standard text not saved'(075).
LEAVE SCREEN. "Leave screen
ELSE.
*Commit the Save of the Text
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
name = l_header-tdname
savemode_direct = c_flag.
ENDIF.
ENDFORM. " update_text -
Problem in SAVE_TEXT usage
I am facing problem in displaying the Long text in Open Maintenance orders IW31 Sscreen.
i am uploading the long text using SAVE_TEXT function module.
i can see the data in STXL table but i am not able to see the data on the transaction screen display or change mode.
I am using correct object name ,id and etc..in header table objectid: AUFK, TEXTID: AVOT ,tdname:clintidroutingnumber(afvc table aufpl field sequence(like 0001.. ), language: EN.
Text line also i am passing and i am enering the direct saving mpde.
i am getting sy-subrc eq = 0.
and i am able to get the data by READ_TEXT table.
my problem is why the Long text data is not diaplying on the scrreen(TEXT editor).
same thing happening in COmponents LONG TEXT in the same TCODE
Please Help me.Hi Srinivas,
I've been facing similar problem.I followed the procedure that you've mentioned , but still couldn't display the long text on the transaction IW32.I've attaching the code as well.
*& Include ZXWO1U05
DATA:text_object_name LIKE stxh-tdname.
DATA: BEGIN OF ltxt_lines OCCURS 0.
INCLUDE STRUCTURE tline.
DATA: END OF ltxt_lines.
DATA:p_object LIKE thead-tdobject VALUE 'AUFK',
p_name LIKE thead-tdname,
p_language LIKE thead-tdspras VALUE 'E',
p_type LIKE thead-tdid VALUE 'KOPF',
p_header LIKE thead .
TYPES: BEGIN OF lt_edit_line,
line LIKE rssource-line, "c(72)
END OF lt_edit_line.
DATA lt_edit_table TYPE TABLE OF lt_edit_line.
DATA:ls_efindpar TYPE efindpar.
DATA:t_trace TYPE TABLE OF ewffndtrac,
t_result TYPE TABLE OF efindres.
TYPES:BEGIN OF ty_eablg,
ablbelnr TYPE ablbelnr,
anlage TYPE anlage,
ablesgr TYPE ablesgr,
ableinh TYPE ableinh,
adatsoll TYPE adatsoll,
END OF ty_eablg.
DATA:t_eablg TYPE TABLE OF ty_eablg,
ls_edit_table TYPE c LENGTH 132.
FIELD-SYMBOLS:<fs_eablg> TYPE ty_eablg,
<fs_trace> TYPE ewffndtrac.
CONSTANTS:lc_instln TYPE efindres-objtype VALUE 'INSTLN'.
CONSTANTS:lc_period TYPE ablesgr VALUE '01',
lc_moveout TYPE ablesgr VALUE '03',
lc_movein TYPE ablesgr VALUE '06'.
CALL FUNCTION 'CO_ZK_TEXTKEY_CAUFV' "Gets me the thead-tdname
EXPORTING
aufnr = caufvd_imp-aufnr
IMPORTING
ltsch = text_object_name.
p_name = text_object_name.
CALL FUNCTION 'READ_TEXT'
EXPORTING
language = p_language
id = p_type
name = p_name
object = p_object
IMPORTING
header = p_header
TABLES
lines = ltxt_lines
EXCEPTIONS
id = 01
language = 02
name = 03
not_found = 04
object = 05
reference_check = 06.
IF sy-subrc IS INITIAL.
REFRESH lt_edit_table.
ENDIF.
ls_efindpar-l_devloc = caufvd_imp-tplnr.
*get the installation
CALL FUNCTION 'ISU_FINDER'
EXPORTING
x_objtype = lc_instln
x_findpar = ls_efindpar
TABLES
yt_result = t_result
yt_trace = t_trace
EXCEPTIONS
insufficient_selection = 1
objtype_not_supported = 2
additional_selection_needed = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*get the 13 meter reads.
DATA:lv_calc_date TYPE bkpf-bldat,
lv_tabix TYPE sy-tabix,
lv_text(100) TYPE c.
CONSTANTS:lc_read TYPE bseg-dtws2 VALUE '13'.
CALL FUNCTION '/SAPHT/DRM_CALC_DATE'
EXPORTING
date = sy-datum
days = '00'
months = lc_read
sign = '-'
years = '00'
IMPORTING
calc_date = lv_calc_date.
READ TABLE t_trace ASSIGNING <fs_trace> WITH KEY objtype = lc_instln.
IF sy-subrc = 0.
SELECT ablbelnr anlage ablesgr ableinh adatsoll
FROM eablg
INTO TABLE t_eablg
WHERE anlage = <fs_trace>-objkey
AND adatsoll BETWEEN lv_calc_date AND sy-datum
AND ( ablesgr = lc_period OR ablesgr = lc_moveout OR ablesgr = lc_movein ).
IF sy-subrc = 0.
LOOP AT t_eablg ASSIGNING <fs_eablg>.
AT FIRST .
CONCATENATE ls_edit_table 'MR unit ' INTO ls_edit_table SEPARATED BY space.
CONCATENATE ls_edit_table 'Installation ' INTO ls_edit_table SEPARATED BY space.
CONCATENATE ls_edit_table 'MRU reason ' INTO ls_edit_table SEPARATED BY space.
CONCATENATE ls_edit_table 'Scheduled MR Dt ' INTO ls_edit_table SEPARATED BY space.
APPEND ls_edit_table TO lt_edit_table.
ENDAT.
CLEAR: ls_edit_table.
CLEAR lv_text.
lv_text = <fs_eablg>-adatsoll.
CONCATENATE lv_text ' ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
CLEAR lv_text.
lv_text = <fs_eablg>-ablbelnr.
CONCATENATE lv_text ' ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
CLEAR lv_text.
lv_text = <fs_eablg>-anlage.
CONCATENATE lv_text ' ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
CLEAR lv_text.
lv_text = <fs_eablg>-ableinh.
CONCATENATE lv_text ' ' ls_edit_table INTO ls_edit_table SEPARATED BY space.
APPEND ls_edit_table TO lt_edit_table.
CLEAR: ls_edit_table,lv_text.
ENDLOOP.
ENDIF.
ENDIF.
TYPES:BEGIN OF ty_elev,
anlage TYPE anlage,
vstelle TYPE vstelle,
vbsart TYPE vbsart,
eigent TYPE e_gpartner,
END OF ty_elev.
DATA:t_elev TYPE TABLE OF ty_elev.
FIELD-SYMBOLS:<fs_elev> TYPE ty_elev.
IF t_eablg IS NOT INITIAL.
SELECT elanlage evvstelle evvbsart eveigent
FROM eanl AS el
INNER JOIN evbs AS ev
ON elvstelle = evvstelle
INTO TABLE t_elev
FOR ALL ENTRIES IN t_eablg
WHERE el~anlage = t_eablg-anlage.
ENDIF.
LOOP AT t_elev ASSIGNING <fs_elev>.
AT FIRST.
ls_edit_table = 'Premise'.
CONCATENATE ls_edit_table 'Premise Type' 'Owner Allc' INTO ls_edit_table SEPARATED BY space.
APPEND ls_edit_table TO lt_edit_table.
CLEAR ls_edit_table.
ENDAT.
ls_edit_table = <fs_elev>-eigent.
CONCATENATE ls_edit_table <fs_elev>-vbsart <fs_elev>-vstelle INTO ls_edit_table SEPARATED BY space.
APPEND ls_edit_table TO lt_edit_table.
CLEAR ls_edit_table.
ENDLOOP.
LOOP AT lt_edit_table INTO ltxt_lines-tdline.
ltxt_lines-tdformat = '*'.
APPEND ltxt_lines.
ENDLOOP.
if p_header is not initial.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = p_header
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
tables
lines = ltxt_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.
else.
UPDATE AUFk SET ltext = 'X' where aufnr = caufvd_imp-aufnr .
ENDIF.
else.
p_header-tdobject = p_object.
p_header-tdname = p_name.
p_header-tdspras = p_language.
p_header-tdid = p_type.
p_header-TDFUSER = sy-uname.
p_header-TDFRELES = '701'.
p_header-TDFDATE = sy-datum.
p_header-TDFTIME = sy-uzeit.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = p_header
INSERT = 'X'
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
tables
lines = ltxt_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.
else.
UPDATE AUFk SET ltext = 'X' where aufnr = caufvd_imp-aufnr .
endif.
endif.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = p_object
NAME = p_name
ID = p_type
LANGUAGE = 'E'
SAVEMODE_DIRECT = 'X'
KEEP = ' '
LOCAL_CAT = ' '
IMPORTING
COMMIT_COUNT =
TABLES
T_OBJECT =
T_NAME =
T_ID =
T_LANGUAGE =
Kindly request you to provide a suitable solution at your earliest convenience.
Thanks,
Chakram Govindarajan -
Hi all,
when I drop PR to PO in ME21N, the text of PR needs to be displayed in PO header text.
Im reading the text of PR, using READ_TEXT.
and I have used SAVE_TEXT to populate the header text of PO.
The problem is the text is not displaying on the header text.
But, when I double click the header text, it takes me to change editor,after coming back from change editor the text is displaying.
Pls let me know what would be the problem.
Thankyou,
PriyaHi Dzed n Vinod,
Here is the code which im using after reading the text.
Pls let me know where it is going wrong.
***populate the text for PO
IF NOT t_potext[] IS INITIAL.
header_po-tdobject = 'EKKO'.
header_po-tdid = 'F02'.
header_po-tdspras = v_spras.
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
client = sy-mandt
header = header_po
insert = 'X'
savemode_direct = 'X'
* OWNER_SPECIFIED = ' '
* LOCAL_CAT = ' '
IMPORTING
* FUNCTION =
NEWHEADER = header_new
TABLES
lines = t_potext[]
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5
IF sy-subrc = 0.
CALL FUNCTION 'COMMIT_TEXT'
EXPORTING
OBJECT = header_po-tdobject
NAME = '*'
ID = header_po-tdid
LANGUAGE = header_po-tdspras
SAVEMODE_DIRECT = 'X'
* KEEP = ' '
* LOCAL_CAT = ' '
* IMPORTING
* COMMIT_COUNT =
* TABLES
* T_OBJECT =
** T_NAME =
* T_ID =
* T_LANGUAGE =
ENDIF.
Thankyou,
Priya -
Problem with SAVE_TEXT Usage
Hi,
I'm starting a new thread because this is a different issue than my original problem.
I am using our BW system to save texts. Calls to the function return with sy-subrc=0. However, no data is added to STXH and STXL.
We have never before saved texts to the TDOBJECT that I'm trying to save to now.
I have used txn SM75 to create the TDOBJECT and IDs.
Is there something that I need to set up before I can use the object and texts?
Thank you.Fong,
I am not sure if the transaction SM75 is the right one, I could not find that in my system. Usually you create texts using SO10 transaction.After using SAVE_TEXT if you commit the same, usually the text is saved.
While retrieving using READ_TEXT you will have to pass the same objects used while saving.
Regards,
Ravi -
Problem with SAVE_TEXT FM
Hello,
I am having a problem with using the SAVE_TEXT FM.
Here is the scenario.
I am trying to populate the Long Text on a PM work order component line for a reservation.
Prior to populating this field, no text will exist in this field.
I create the name key using the following:
sy-mandt + resb-rsnum + resb-rspos + resb-rsart
The object id AUFK and the ID is MATK.
INSERT = X
SAVEMODE_DIRECT = X
OWNER_SPECIFIED = space
LOCAL_CAT = space
When I call the FM I get a return code of 0 and when I do a READ_TEXT FM using this key I can see that the text exists in table STXH.
However, when I go to view the long text for the reservation component in IW32 there is no text there.
If I now manually add text to the long text and save, if I now run the SAVE_TEXT FM with the same key, the FM overwrites the value of the text which was manually entered with the value from the FM.
So, does anyone know why the FM writes an entry to STXH which isn't visible in IW32 prior to manually adding text, but is visible after manually adding text?
Has anyone experienced this problem before?
I would appreciate any help anyone could give me.
thanks,
KevinSorry table was RESB, but answer is correct anyway,
field is RESB-LTXSP.
Look at <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/corr_instr/correction_detail.htm?_CINSTA=0120061532&_CALEID=0000356881&_CPAKID=1&_PGMID=LIMU&_OBJ=REPS&_OBJNAM=ZDELRESBLTXSP&tab=2">Example of program updating flag long text</a> or note <a href="https://service.sap.com/sap/support/notes/706261">Note 488862 - No long text for component although long text flag existing</a>
Regards -
PROBLEM IN CREATING BOM ITEM TEXT FROM TEXT FILE
Hi All,
I am developing interface program for creating BOM based on data it text file. in my text file contain three column(material, qty and longtext). These text i need to upload to BOM TCODE CS01). Using SAVE_TEXT I have generated text object. it don't says any error. But while viewing text in CS03, text is not visible. Give me suggestion or give me any other method for updating item text from textfile.
Thanks in advance.
Regards.
Peranandam.Hi Carl,
Actually problem is SAVE_TEXT updates text but I cant able to view in CSO3 transaction. because while creating BOM I forget for updating language key for long text. After updating language key I can able to view text in CS03.
Now I am facing another problem. If I am executing program directly without going to debug mode, It is not updates text. Logic everything is correct. Give me some suggestions for solving this issue. I am also tried with commit work, Commit_text and wait up n seconds statement.
Regards,
Peranandam -
Saving/Commiting the Long Text
Hi,
I am trying to save the long text created in a Z Transaction (Table Control). While saving it, I am getting the message as Text Saved". But It is not actually stored in SAP. I am not sure, what is that I am missing. I am using the SAP Standard Routine to Save the Long Text. I am also calling the FM: COMMIT_TEXT explicitly after the long text is saved. Can any one please suggest me, what should I do to commit the long text in SAP?
Appreciate Your Help.
Thanks,
KannanMay be my earlier post was confusing, I was asking you to set the Insert parameter to SPACE and the Savemode_direct to 'X' and see if it works or not. I had the same issue and resolved it using the above parameters. Also try and see if Srinivas's suggestion in the following thread:
Problem with SAVE_TEXT FM
hith
Sunil Achyut -
Confirmation using BAPI_ALM_CONF_CREATE - how to handle Longtexts
Hello,
we have to create a custom code to create confirmations for service orders.
At the moment we are using BAPI_ALM_CONF_CREATE within this custom program.
But this BAPI is not handling longtexts within the service confirmation.
Is there another BAPI or FM or how could we add the longtexts to the created confirmations.
Thank you.
Kind regards
ManfredBAPI Create_Text may work for this. Please check below links.
problem in SAVE_TEXT usage
how to create text using BAPI for sale order BAPI_SALESORDER_CREATEFROMDAT2
http://help.sap.com/saphelp_nw04s/helpdata/en/fb/787036172511d2b428006094b944c8/content.htm -
Save_TEXT problem in IW32
Hi All,
I am facing problem as specified below,
In IW32 I am trying to Append or add new text lines to existing long text lines (read_text then append new lines then
save_text) then it is successful,
but if there is no text lines maintained for Long text then read text is successful & having no data its ok, then
I am trying to append new lines then using SAVE_TEXT as well Create_text with commit_text
it successful & once I tryed to use READ_TEXT then it showing new added text
the main problem is it is not DISPLAYED in IW32 TEXT EDITOR.............?
As I tryed to update AUFK table for the same order with LTEXT field = 'X'......
is there any other tables & fields I nedd to update for LONG TEXT so that it becomes visible..............?Hi Vijay,
I had updated AUFK-LTEXT as 'E' also its not giving text output in IW32 text editor...........
is there any additional fields to modify or update.......... -
After using SAVE_TEXT in VA01 getting problem
Hi Friends ,
As per below link i have used SAVE_TEXT with vbeln "XXXXXXXXXX"
'SAVE_TEXT' or 'CREATE_TEXT' unable to use
But text is copied default to other orders also in VA01 ..
I tried using CALL FUNCTION 'FREE_TEXT_MEMORY' but it did not worked .
Please help .
Regards ,
Kumar.hi...
where u getting the user input text and which field......
where u done the coding for this.....can u tell me user exit name....
if u use the user exit no need to use save_text . just modify that field which u get input text...
just send ur coding... -
Hello All,
I am copying text from sales order and inserting into the production order.
I have used read_text, save_text and commit text.
In the debuggin i can see all the data getting populated, even iam getting sy-subrc = 0 in the save_text FM. <b>However text is not copied into the production order.</b>
Also i have a entry in STXH table.
I have posted my code for your reference
FORM ADD_LONG_TEXT1.
DATA: ID LIKE THEAD-TDID VALUE 'KOPF',
LANGUAGE LIKE THEAD-TDSPRAS,
NAME LIKE THEAD-TDNAME,
OBJECT LIKE THEAD-TDOBJECT VALUE 'AUFK'.
DATA: TLINES LIKE TLINE OCCURS 0 WITH HEADER LINE.
DATA: IT_THEAD LIKE THEAD OCCURS 0 WITH HEADER LINE.
*Prepare text criteria
CONCATENATE SY-MANDT txt-aufnr INTO NAME.
LANGUAGE = SY-LANGU.
*Begin of insert
MOVE id TO IT_THEAD-TDID.
MOVE language to IT_THEAD-TDSPRAS.
MOVE NAME to IT_THEAD-TDNAME.
MOVE OBJECT to IT_THEAD-TDOBJECT.
append it_thead.
*clear it_thead.
*End of insert
*First read text for existing data
CALL FUNCTION 'READ_TEXT'
EXPORTING
ID = ID
LANGUAGE = LANGUAGE
NAME = NAME
OBJECT = OBJECT
TABLES
LINES = TLINES
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8.
*Append/Insert new text data
LOOP AT txt-tline INTO wa_bdc.
CLEAR TLINES.
TLINES-TDFORMAT = '*'.
TLINES-TDLINE = wa_bdc-tdline.
APPEND TLINES.
ENDLOOP.
Secondly append new text data to existing data
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
HEADER = it_thead
INSERT = ' '
SAVEMODE_DIRECT = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
LINES = TLINES
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 = OBJECT
NAME = NAME
ID = ID
LANGUAGE = LANGUAGE
SAVEMODE_DIRECT = 'X'
KEEP = ' '
LOCAL_CAT = ' '
IMPORTING
COMMIT_COUNT =
TABLES
T_OBJECT =
T_NAME =
T_ID =
T_LANGUAGE =
ENDFORM. "ADD_LONG_TEXTHi,
This is not a user exit, iam not sure about the update task.
It is a normal report program, have to copy the sales text to prod order and mark the user status check for TXTU .
This piece of code.
SELECT SINGLE matnr INTO i_matnr FROM vbap
WHERE vbeln = afpo-kdauf AND posnr = afpo-kdpos.
SELECT SINGLE mtart INTO i_mtart FROM mara
WHERE matnr = i_matnr-matnr.
IF i_mtart-mtart NE 'ZPPG'. " or i_mtart-mtart NE 'HALB'.
IF txt-t_user CS 'TXTU'.
ELSE.
If the status was changed write out the Order and Date.
PERFORM ADD_LONG_TEXT1.
IF sy-subrc = 0.
READ TABLE GT_STATUS WITH KEY TXT04 = 'TXTU'.
IF SY-SUBRC = 0.
PERFORM UPDATE_USER_STATUS
USING txt-aufnr GT_STATUS-ESTAT ''. "D01K956913+
ENDIF.
WRITE: / txt-aufnr.
ELSE.
FORMAT COLOR COL_NEGATIVE.
WRITE: / txt-aufnr.
FORMAT COLOR OFF.
ENDIF.
ENDIF. -
Problem in populating PO item text using FM:SAVE_TEXT
Hi All,
I am having an issue with SAVE_TEXT FM,
I need to populate the item text field:
This FM works fine if the Item text field is blank and i am populating it with text, say "This is a test case",
How ever if the text field is already populated say the item text field has "Testing", my requirement is i will append the new text to the previously existing, in this case it should come as "Testing This is a test case",
For doing this i am reading the existing text using READ_TEXT FM and concatenating both the texts separated by space, and passing this to i_lines, how ever the O/P which i get in the text field is "Testing".
Please advice.
The cod is shown below:
CALL FUNCTION 'SAVE_TEXT'
EXPORTING
CLIENT = SY-MANDT
header = t_head
insert = 'X'
savemode_direct = 'X'
OWNER_SPECIFIED = ' '
LOCAL_CAT = ' '
IMPORTING
FUNCTION =
NEWHEADER =
TABLES
lines = i_lines
EXCEPTIONS
id = 1
language = 2
name = 3
object = 4
OTHERS = 5.hi,
once u use the save_text also
with save_text u are updating the STXH table .
there is one field in stxh table which is once updated shows the text in the sceen.
or u can run a bdc put the default text where u want to put and afterwards when u use create_text and commit_text,u ll be able to see the text in the screen.
regards
kanishak -
SAVE_TEXT problem in adding new text identifier to an existing text object
I have an existing text object "ZEANR" which stores 9 long text data with identifiers 1 to 9. I want to add a new long text to that text object with id 10. when I use SAVE_TEXT function (with same parameters as others except the ID is set to "0010"), it throws an exception saying : "0010" text identifier is not defined for Text object "ZEANR". How can we append more long texts to an existing object ? I Have tried to change the insert parameter of the SAVE_TEXT function but it didn't work with both cases. I am getting the exception at perform chech_key --> perform check_id of the SAVE_TEXT function.
if someone knows the answer I will be preciated. thanks in advance.The text ID specified in the parameter ID or text header (field TDID) should exist in table TTXID. It must be defined there with the text module object.
Go to transaction SE75, select "Text Objects and IDs", Change. Find your text object (ZEANR) in the list and double click. Choose create. Add a new text id (0010) and description. Save. -
SAVE_TEXT problem - it can't lock??
Hi, ALL.
I use the Function Module 'SAVE_TEXT' in my Zprogram.
It update the Sales long text in MM02.
When a user is in MM02, 'SAVE_TEXT' the Function Module doesn't return error message.
I think it's a LOCK error, but it's not.
Do I need to check LOCK before call function 'SAVE_TEXT' in Zprogram??
If you know that, please let me know.
Regards.
Rie.Your program must use the same logic than the standard program to manage locks.
- Lock same object(s) (ENQUEUE_Exxxx)
- Use same FMs like SELECT_TEXT, READ_TEXT, INIT_TEXT, SAVE_TEXT or similar tools
Tips: Execute transaction SE30 on MM02 and update a text, then evaluate the performance data file, look for call to FM starting with ENQUEUE or calls containing TEXT in the trace.
Remarks:
- A Save module is a little late to manage lock, no ?
- "I think it's a LOCK error, but it's not", it is a LOCK error, but in your program
- You could use BAPI_MATERIAL_SAVEDATA (table parameter MATERIALLONGTEXT) to update/create text, this one manages locks.
Regards,
Raymond
Maybe you are looking for
-
ITunes cannot sync apps to the iPod because the apps installed on the iPod could not be determined
I have a 3rd generation iPod touch. I just downloaded the IOS 5.0, I seem to have all the features (reader, notification center, newsstand, etc.), but I recently experienced a problem. After getting the update and restoring my iPod, iTunes started re
-
Volume too loud. Mixer always resets to 100%.
Using: Windows 7 64bit. Firefox 19.0.2 Flash Version 11,6,602,180 My volume in flash defaults to almost horrifying levels. In the mixer I tone it down but every time I close firefox it resets itself back to 100%. When I go into flash settings there d
-
So I am transferring all of my InDesign files over to my boss because I am leaving my job, but all of the photos placed in the layouts I've created show up blurry when he opens the files on his own computer. We've tried relinking the files, even! We
-
I have installed Oracle 9.2.0.1.0. I had a system crash (Ho, HO, Its microsoft). Since that time, I get the following :- ORA-27101: shared memory realm does not exist. when Itry to login. I search technet, and got six results, each telling me I have
-
I accidentally deleted an app in my sleep?
I must have fallen asleep with my hand on my phone in such a way that I deleted an app without knowing! The worst part is I can't remember which app it was. I tried looking in iTunes, but apparently when I just backed up my phone on my new computer,