Skip to Content
0
Former Member
Oct 17, 2007 at 03:08 PM

Problems getting texts items

69 Views

Hi,

How can I compare the old value of an item note (Text tab) with the new value item note at MV45AFZZ method USEREXIT_SAVE_DOCUMENT_PREPARE? I always get the new one (using READ_TEXT).

For example. Sales order number 0005000001 is created. It has one position (000010) and its text item (item note) is “HELLO”.

Using VA02 I modify the text item (item note) of the sales order 0005000001 / position 000010 as “GOODBYE”.

When the following code is executed at user exit MV45AFZZ method USEREXIT_SAVE_DOCUMENT_PREPARE:

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = '0002'

LANGUAGE = SY-LANGU

NAME = 0005000001000010

OBJECT = 'VBBP'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = LINES

  • EXCEPTIONS

  • ID = 1

  • LANGUAGE = 2

  • NAME = 3

  • NOT_FOUND = 4

  • OBJECT = 5

  • REFERENCE_CHECK = 6

  • WRONG_ACCESS_TO_ARCHIVE = 7

  • OTHERS = 8

LINES table contains "GOODBYE".

I don’t know how I can get the old value (HELLO), and I don’t understand why I get GOODBYE, because the new value has not been stored yet (commit comes later).

Thanks in advance,

Ricard.