cancel
Showing results for 
Search instead for 
Did you mean: 

Macro to calculate/Copy figures for a Specific CHAR-VALUE

Former Member
0 Kudos

Hello,

I am new to DP, my business has requirement to write macro which should calculate or copy figures based on Characteristic values. I have following rqt:

(KF) Sales FC Total 3000

(Char. Val) Cust01 1200

(Char. Val) Cust02 1800

(KF) Corrected FC Total 3100

(Char. Val) Cust01 1250

(Char. Val) Cust02 1850

(KF) FC to Release Total 3100 (Copy from Corrected FC)

(Char. Val) Cust01 1200 (Copy from Sales FC)

(Char. Val) Cust02 1900 (calculate, Total - FC from Cust01)

Is it possible to write macro for key figure "FC to Release" as above? Cust 01 and Cust 02 are characteristic values for char. Customer.

Any help is much appriciated!

thanks

Rohit

Edited by: Rohit Sharma on Jul 8, 2011 3:21 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member583013
Active Contributor
0 Kudos

Hi,

yes,you can.using macro function ACT_IOBJNM_VALUE() you can dertermine the current char. Customer value.

based on that you can maintain Kf value.i.e in macro use if condition eg if current char. Customer value = 'X'

kF1 = X.

elseif current char. Customer value = 'y'.

KF2 = Y.

More information on macro function ACT_IOBJNM_VALUE() :

ACT_IOBJNM_VALUE( 'IOBJNM'; <GRID2'> ) returns the value of the InfoObject that is currently being planned. 'GRID2' is an optional parameter. If you specify this parameter, the value of the specified InfoObject in the second grid at the time of the calculation is returned. For example, the result of ACT_IOBJNM_VALUE( 'SALORG') might be 'north'.

Hope this will helps you.

Regards,

Sunitha

Former Member
0 Kudos

Hello,

THanks a lot for the reply, it help a lot. I however have a question about the caclulation when the char value is 'cust02', because as you can see in the example, there is a calculation involved.

I would appriciate any help on this.

Thanks

Rohit