cancel
Showing results for 
Search instead for 
Did you mean: 

ASSET_MASTER_RECORD_UPDATE

Former Member
0 Kudos

Hi,

We have a requirement to add an additional field in the asset master data.

We were able to succesfully add it using a user exit. Unfortunately, when this new field is changed, it is not monitored in the asset history change screen.

Our ABAP person looked at it and found that for table ANLU (used for user exit), the function has only table T_ANLU_GES (for new changed data) but not table T_ANLA_OLD (for old data). This is in comparison to ANLA table.

Has anybody added a field in their asset master data before?

How did you update the asset history change during AS02 transaction?

Any help is appreciated.

Regards,

Patricia

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Patricia,

Could you please describe how you added this new asset field? If you added this field into the ANLU table, there should have been a corresponding entry made in the change documents table regarding the change to the field under the object type ANLA. Since the Asset history data makes no distinction between tables (it reads all Change Document type ANLA), it should pick up both the new and old values accordingly.

You can test this in detail by putting a breakpoint in program FA02SCDC and debugging it.

The value of *ANLU and ANLU will contain the old and new versions of the ANLU table.

If you trace into the ANLA_WRITE_DOCUMENT function module, and into the line which contains:

IF UPD_ANLU NE SPACE.

CALL FUNCTION 'CHANGEDOCUMENT_SINGLE_CASE'

EXPORTING

TABLENAME = 'ANLU '

WORKAREA_OLD = O_ANLU

WORKAREA_NEW = N_ANLU

CHANGE_INDICATOR = UPD_ANLU

DOCU_DELETE = ' '

EXCEPTIONS

NAMETAB_ERROR = 1

OPEN_MISSING = 2

POSITION_INSERT_FAILED = 3

OTHERS = 4.

CASE SY-SUBRC.

WHEN 0. "ok.

WHEN 1. MESSAGE A182 WITH 'NAMETAB-ERROR'.

WHEN 2. MESSAGE A182 WITH 'OPEN MISSING'.

WHEN 3. MESSAGE A182 WITH 'INSERT ERROR'.

WHEN 4. MESSAGE A182 WITH 'SINGLE ERROR'.

ENDCASE.

ENDIF.

You should see that changes to ANLU is being recorded.

I am assuming that you were referring to the history of changes. But what were you looking at concerning T_ANLU_GES vs T_ANLA_OLD? User fields seem to always be saved under ANLU, so you should be examining T_ANLU_OLD.