Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

SAVE_TEXT not working

Former Member
0 Kudos

I have a requirement of populating a text in the "Inspection Description" column of QE02 transcation through user exit.

The problem is that when I, first time create it, it gets saved but when I change the text (passed through the user exit), though the values get displayed in the column but on saving the transaction the text doesnot get saved.

Whereas If without using the user exit I change the text manually then on saving the transcation QE02, it gets saved in the column.

The "Inspection Description" column is asscociated with a Long text field. Hence I also tried using the SAVE_TEXT function module in the BADI QE_SAVE. But still then I am unable to save the text.

Also while using READ_TEXT in SE37 I can see that it picks up the text that has been changed by the user exit (the latest on). But I do not see it in SO10. Whereas in SO10 it says it doesnot exist. Hence I don't find it saved in the database.

How can I save the text on clicking the SAVE button in QE02.

2 REPLIES 2

Sandra_Rossi
Active Contributor
0 Kudos

SO10 only contains texts of type "standard" (object = TEXT).

I don't know QE_SAVE BAdI, maybe that SAP calls SAVE_TEXT after it, so overwrites your own SAVE_TEXT. Did you make sure when SAVE_TEXT is called by SAP, before or after the BAdi? Note that SAVE_TEXT only writes to memory if you don't use parameter SAVEMODE_DIRECT = 'X'. Instead, you may also call COMMIT_TEXT to write text to database (and don't be mistaken by its name, it doesn't COMMIT, it just writes to database).

0 Kudos

I am not using any more the BADI instead I am using an User Exit which displays a button. On click of the button I add my text into the long text. Here I am using READ_TEXT and then SAVE_TEXT without SAVE_MODE = 'X'. Due to this the text gets stored at the last line of the long text.

But i want the text in the first line, in order to show it in the short text (Inspection description) column so that on saving the transaction QE02 the text would get saved in table QASE. If I insert the line at the first position then I am unable to see the text but if i append the text then in the long text editor I can see it as the last line but not in QASE table.

If the same thing is done manually, the text does get stored in QASE but not through the user exit.

If I insert the line at the first position and forcefully open the text editor then on saving the transaction QE02 the text would get saved in table QASE. But we do not want to open the text editor every time for every line item.

Is there a way out through which I can save the changed text brought through user exit in short text (Inspection description) column of QE02 and also save it in QASE table.