cancel
Showing results for 
Search instead for 
Did you mean: 

largeer of two rows in macro formula

Former Member
0 Kudos

Hi,

I have three key figures, A, C, E in my planning book. I need to write a formula as follows:

Result = E / greater of (A or E)

My problem has been to find out a way to write the formula in macro to choose the denominator as greater of either A or E in that bucket

Can some body help me with this? Is there any macro function or operation that can be used?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Raj,

You could use the MAX() function:

e.g.:

Result Row =

Row: E

/

MAX(

Row: A

Row: C

)

Hope this helps. M

Former Member
0 Kudos

Hi Percx,

I some how couldnot use the operation MAX and two rows A and C but could use MAX in functions to get this done. In theory it should work. I might be missing something. I will try that again. For now the problem is soled with MAX().

Thanks a lot for the quick reply. Thanks to srini as well.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Raj,

If you are a technical guy, you can create a BADI implementation for that macro and manipulate the matrix data like the way you want.

the procedure to implement a BADI is

1.SPRO --> SAP SCM - Implementation Guide --> Advanced Planning and Optimization --> Supply Chain Planning --> Demand Planning (DP) --> Business Add-Ins (BAdIs) --> MacroBuilder --> Additional Functions for Macros.

create a new implementation by copying the class for the BADI defenition '/SAPAPO/ADVX' and write your own code in the method '/SAPAPO/IF_EX_ADVX~USER_EXIT_MACRO '. There is a sample code and proceedure explaining how to handle the data in the internal tables C_T_TAB and C_T_TAB_OLD. the calculations can be made with help of I_T_LINES, I_T_COLS which are rows and columns tables.

find out the the row and columns of the grid to be read and do calculation and then put the result in the desired cell.

Please let me know if you need further assistance.

Regards,

Srini.

Award points for the helpful answers