!--a11y-->
Sample Code for Calculating Tax Depreciation Base 
Below is an example of the code that you can use for calculating the tax depreciation base (see
Posting Acquisition and Production Costs).Include ZXAPCU05 is part of SAP enhancement AINT0004. In Singapore it can be used to replace the acquisition costs with the qualifying costs, the tax depreciation base amount, when you post an asset acquisition. The purpose of the sample include given below is to simplify the data retrieval procedures in assets reports relevant to capital allowance. Because this include is used together with enhancement AINT0004, the limitations and specifications stated in AINT0004 apply here as well.
The code provided here serves as an example only. You will need to modify the lines by accounting for the Customizing parameters and other specifications unique to your own requirements.
*---------------------------------------------------------------------*
* INCLUDE ZXAPCU05 - Calculation of Qualifying Costs
*---------------------------------------------------------------------*
DATA l_percentage TYPE p DECIMALS 2.
1) IF sy-mandt = '003 "check client
AND i_ants-bukrs = 'SG01 "check company code
2) AND (i_rlambu-bwasl = '100 "check transaction type
OR i_rlambu-bwasl = '120'). "check transaction type
3) CASE i_ants-gdlgrp.
WHEN 'SAME'. "qualifying costs = APC
l_percentage = '100.00'.
WHEN 'QUA90'. "qualifying costs = 90% APC
l_percentage = '90.00'.
WHEN space. "no value in EGF
4) MESSAGE w000(8z) WITH
'Eval.group field not maintained.'.
WHEN OTHERS. "default other percentage
l_percentage = '85.00'.
ENDCASE.
5) READ TABLE t_anepi WITH KEY afabe = '15'. "read amount posted
IF sy-subrc NE 0.
" Error handling e.g. message e001(za) with t_anepi-afabe.
ELSE.
m_anepi-afabe = '15'. "area for capital allowance
6) m_anepi-anbtr = t_anepi-anbtr *
l_percentage / 100.
APPEND m_anepi. "fill output structure
ENDIF.
ENDIF.
Notes on the Code
In Customizing, choose one of the evaluation group fields (ANLA-ORD41 to ANLA-ORD44, or ANLA-GDLGRP) to maintain possible values, where each value stands for different percentage. You must account for one field value for use in the event of the acquisition costs being the same as the qualifying costs. Maintain the evaluation group fields in the asset masters or default them at asset class level.
If none of the evaluation group fields are available, use user exit AIST0002 to create user-defined fields as an alternative to this step.
