 Former Member

# Best Approach for Computing Depreciation over the Budget Period

hello!

i have a requirement to compute depreciation over a budget period of 5 years.

the depreciation method is simple straight-line computation (asset amount divided by 5 years).

however, for each asset, i have 25 "dummy sub-assets" for which i need to calculate depreciation separately because the capitalization date for each of those dummy sub-assets are different and are not maintained as a dimension property.

i have created a data package that calls a considerably lengthy script logic.

in my script, i had to create a *REC statement using the Boolean function below:

*REC(EXPRESSION=((%VALUE%>0)*%VALUE%)/([ACCOUNT].[COST_CAPEX_NET1L]*12),TIME=%TIME_SET%,ACCOUNT=COST_CAPEX_NET1M,VERSION=LATEST_ESTIMATE)

basically, i'd compute depreciation expense for all records. but then, i'd also check the amount of each record. if the amount was zero, depreciation expense is multiplied by zero so the result would be zero. but if the amount was greater than zero, the result would be the depreciation expense (because it would be multiplied by one).

i had to create 25 script files for each dummy sub-asset and in each of those script files, i had to create 52 *WHEN cases.

the data package takes about two hours to execute and this is unacceptable.

as an alternative, i was thinking of using the UJ_CUSTOM_LOGIC BAdI where I may be able to compute depreciation in the abap layer (where I can have more flexibility with computations and looking up from the tables using abap code).

i have a question though - is the BAdI a smarter approach? or can my requirements be handled using script logic (and i just haven't determined the efficient code for my requirements)...?

would greatly appreciate any inputs.

10|10000 characters needed characters exceeded

### Related questions

Posted on Apr 30, 2012 at 04:11 AM

If you are on BPC NW version, I would definitely lean on BADI.

I find Script Logic very programmable un-friendly and immature when compared to ABAP.