Skip to Content
0
Former Member
Jul 26, 2012 at 08:29 AM

Count Calculation for Sales

21 Views

Hello,

My requirement is to take the count of Sales order which are Blocked and the
logic to derive it requires the data to be checked in the Sales Item table.
Join between VBAK and VBAP.

For Eg.
Suppose 1 Sales order has 10 Line Items and 2 are blocked.
Another Sales order has 5 line Items and 3 are blocked
We need to take the values of the blocked Line Items and
show as Blocked Value

Expected Result:
Count of Blocked order = 2

If we take the result at Sales order level(VBELN) things are fine but if we take report at
say Company Code level the values are as follows:

If we make the formula as Before Aggregation the count is coming as 5(2 +3).
and if it is After Aggregation the count is coming as 1 for the Selected Company code.

Is there any way to handle such scenarios?

Regards,
Surya