Skip to Content
0
Former Member
Jul 12, 2006 at 05:47 PM

Abap question

10 Views

Hi people,

OK, I need to make some computations by group.

For example: Group 1, 2, 3 and 4 and divide the sum of the group by the totals of each column.

eg.      column1    column2   column3  column4
total:   112,000     500.00    200.00   315.00

first_group_a = total_group1 / column1.
first_group_b = total_group1 / column2.
first_group_c = total_group1 / column3.
first_group_d = total_group1 / column4.

second_group_a = total_group2 / column1.
second_group_b = total_group2 / column2.
second_group_c = total_group2 / column3.
second_group_d = total_group2 / column4.

third_group_a = total_group3 / column1.
third_group_b = total_group3 / column2.
third_group_c = total_group3 / column3.
third_group_d = total_group3 / column4.

four_group_a = total_group4 / column1.
four_group_b = total_group4 / column2.
four_group_c = total_group4 / column3.
four_group_d = total_group4 / column4.

Exist other way to do that because if the total of the column is equal to '0' the system give me a error. So I don't whant to make a if for each variable to check is equals to '0' or not.

Thanks!!!