Skip to Content
avatar image
Former Member

SAVE_TEXT is not working in USEREXIT_SAVE_DOCUMENT in VA01

Hi gurus,

i have a requirement to add a new text in sales order header when saving the document (transaction VA01). I use the SAVE_DOCUMENT userexit in program MV45AFZZ to do this. I loop at xvbap table and retrieve some texts in a Z table to fill the 'IT_LINES' required by the function 'SAVE_TEXT'. It works fine if I don't type anything directly on the text before saving (id 0001, object VBBK). But if something is inputed on the text during sales order creation, I lost the texts I have in the Z table, the only text saved is the text I inputed manually. Curiously, if I call transaction VA02 to change the sales order ( I have to change at least one field, like customer purchase order number), then all texts are saved. I have tried several different options with many functions related to text as SAVE_TEXT, INIT_TEXT, READ_TEXT, DELETE_TEXT and CREATE_TEXT bu with no success. The last code I have is:

if not it_lines[] is initial.

call function 'SAVE_TEXT'

exporting

header = st_thead

save_mode_direct = 'X'

tables

lines = it_lines

exceptions

bla bla bla

endif.

Please note my requirement is to add some addition text to the Existing Sales Order Text i.r. Header -> Text -> One text already exists ...This should happen only in VA01.So please answer only relevant to VA01

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    May 17, 2017 at 06:40 AM

    Hi @paulo.ferreiracaf2 Could you please provide the solution for this since I found some thread

    https://archive.sap.com/discussions/thread/3590670

    Add comment
    10|10000 characters needed characters exceeded