cancel
Showing results for 
Search instead for 
Did you mean: 

Script Logic Calculation needed

Former Member
0 Kudos

Hi All,

I have a scenario here whereby I have a annual salary which for 1 year say 300,000 dollars, now I need to break them down accross 12 months period ? How can I achhieve this in Script Logic, can anyone give me a sample of this say with example on HR calculation module.

Thanks

Zan

Edited by: Muhd Rikhzan on Nov 17, 2011 12:18 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can do this in a number of ways:

- You can use allocations to allocate the amount in 20X1.TOTAL into each period

- You can use normal script logic with multiple rec statement, 1 line for each period of the year with /12 in each

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Nillanjan,

I'm sorry do you a better example, I don't seem to get it.

Thanks

Zan

Former Member
0 Kudos

Hi,

There is a good document on the allocation engine, available on SDN. You can refer to that. It has lot of examples, with script. You can find few examples in the below link from SDN:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e09eb0c0-87b1-2b10-06be-f1061a206...

Hope that helps.

Former Member
0 Kudos

Hi Nilanjan,

What is INP ?

Thanks

Former Member
0 Kudos

Hi,

2011.INP is a base level member where you can enter the total salary for the entire year. You need to have such kind of dummy member, since you cannot enter any amount in 2011.TOTAL.

Former Member
0 Kudos

Hi,

Since you have the annual salary, it must be entered to some base level member of the time dimension, lets say 2011.INP (since you cannot enter values in the parent node).

Now to allocate this you can try using the allocation script:

*RUNALLOCATION
	*FACTOR = 1/COUNT
	*DIM ACCOUNT	WHAT = SALARY;		WHERE = <<<
	*DIM TIME		WHAT = 2011.INP;	WHERE = BAS(2011.TOTAL)
*ENDALLOCATION

The above logic will evenly distribute the salary of 2011.INP to all the base level members of 2011.TOTAL.

Hope this helps.

Former Member
0 Kudos

Hi Tom,

Can you give me an example of the Script

Thanks