Skip to Content
author's profile photo Former Member
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.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.