cancel
Showing results for 
Search instead for 
Did you mean: 

Macro Logic

Former Member
0 Kudos

Hi Experts

I need to write the based on the below logic:

Prod1 -


Cust1 = 100 Qty (forecast for Current Month)

Prod1-----Cust2 = 200 Qty (forecast for Current Month)

Prod1-----Cust3 = 200 Qty (forecast for Current Month)

Prod1-----Cust4 = 200 Qty (forecast for Current Month)

Totals for the Prod1 with All Customers = 700

I want to calculate the percentage in the Macro.

Percentage of the Cust1 with Prod1 = 100/700 * 100

Cust2 and Prod1 = 200/700 * 100 and so on...

Please advice me the logic.

Thanks in advance.Your reply is highly appreciated.

Thanks

Vicky

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

It may be all too simple but use a standard calculation in the macro and don't forget to multiply the answer by 100.

Also investigate how the key figure is set up. Should have an "integer" type.

Former Member
0 Kudos

Use standard button in IDP to total all selected columns and switching between Absolute values to %.

i) Selected Columns Totals from Menu

ii) Click on % view.

So u can look % and Absolute(in Column Totals) at a time

Former Member
0 Kudos

Hi Experts

Sorry for delay reply.

Any guess to design above macro.

Thanks

former_member182607
Active Participant
0 Kudos

Hi Vicki,

Today there was a requirement of this type. I found one macro fucntion PERC_CALC but could not fund an example macro and there was no info in SAP marektplace. I tried various options but the logic is breaking down. If you find a solution, please post it. Likewise I will post if I break the issue.

Subash

Former Member
0 Kudos

Hi,

You can use Proportional Factor calculation for the same.

Hope this helps.

Thanks & Regards

Mani Suresh

Former Member
0 Kudos

Hi Mani

If i use proportional factors for the above logic, system will give unknown numbers, but when we view it shows in percentages.

I want to get the appropriate values with percentage.

Is it possible to write the macro for the above logic?If yes how?

Thanks in advance.

Regards

Vicky

Former Member
0 Kudos

Hi Mani

Any idea?

Thanks