User Exit for Asset Master Data Maint.
You can use this enhancement to include fields you defined yourself in the asset master record. Follow these steps:
- Create structure CI_ANLU in the ABAP Dictionary, and define the fields that you want to have in the asset master record in addition to the
standard fields. The master record data of these fields will later be stored in the separate table ANLU.
- Create include ZXAISU03 in function group XAIS. Enter program code there in order to transfer the asset master data to global variables. The asset master data referred to here is the data that is transferred
using function module EXIT_SAPLAIST_002, and which you need later for checking the field contents of the fields that you have defined. At the least, you should transfer the values transferred in parameter I_ANLU to a global structure.
- In function group XAIS, define one or more subscreens that you want to
integrate into the maintenance interface of the asset master record. On these subscreens, you can either
- Make the fields available to the global ANLU structure that you defined in the previous step
- Make any other fields available, from which you then derive values for the ANLU fields.
- Create include ZXAISU04 in function group XAIS. Enter code there in order to assign the ANLU structure that was returned to asset master data maintenance by parameter E_ANLU of function module EXIT_SAPLAIST_003.
- Create a customer enhancement project, referring to SAP enhancement AIST0002, and activate this project (transaction CMOD).
- Define master data tab layouts that use the subscreens (group boxes) you have defined. Assign these tab layouts asset classes.
Once you define your own user-defined fields, you can include them in Asset Accounting reporting. You can use your user-defined fields when
defining sort versions. They are also available when you use dynamic selection for selecting assets. To be able to use your user-defined fields in this way, you only have to create your own selection view for the logical database ADA and assign the user-defined fields to a
functional group (for example, functional group 10 for general data).
If you want your user-defined fields to be displayed in reports, in addition to being used for sorting and selection, you have to create your own report or your own query. The system makes the user-defined
fields available at the time of GET ANLAV via logical database ADA in the ANLAV structure. Therefore you do not need to program your own data retrieval program.
- It is not possible to enter default values in the asset class for user-defined fields.
- User-defined fields are not integrated in the screen layout control of Asset Accounting. However, you can program your own field control that is dependent on the asset class and/or company code (in function module EXIT_SAPLAIST_002). In your program, you can distinguish between asset main numbers and asset subnumbers.
When you create
- an asset with a reference
- a subnumber
- a target asset for a transfer
the system copies the user-defined fields from the
- reference asset
- main number
- sending asset
In function module EXIT_SAPLAIST_002, you can delete or modify the adopted values, either completely or in part.
- User-defined fields cannot be substituted or validated.
- In the standard system, no change documents are written for user-defined fields that were defined in table ANLU.
- EXIT_SAPL1022_001: Check of User-Defined Fields when Using Create and Change BAPI
- EXIT_SAPLAIST_002: Transfer Data for User Subscreens
- EXIT_SAPLAIST_003: Transfer of User-Defined Fields to SAP Master Data Transactions