Entering content frame

This graphic is explained in the accompanying text Sample Code for Calculating Tax Depreciation Base Locate the document in its SAP Library structure

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

  1. Define which client and company code the user exit is for.
  2. Define the range of transaction types or transaction type groups that trigger the exit. Failure to define a proper range will result in either too many or too few transactions being affected. The former will create extra steps for users to post a transaction; the latter will cause the system to post incorrect qualifying costs to the tax area. In this example, only transaction types 100 and 120 are specified, due to the fact that these two types are the most commonly used.
  3. Calculate the qualifying costs as a percentage of acquisition costs offline. You also define qualifying costs as a percentage of acquisition costs, depending on one of the evaluation group fields in the asset master.
  4. 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.

  5. Create a separate message class for error messages.
  6. Retrieve data from tax depreciation area.
  7. Calculate the qualifying costs by multiplying acquisition costs by the appropriate percentage rate.
Leaving content frame