Hi,
Sorry to have opined in between. What if we break the query in two parts.
One will retrieve the GRPO total.
One will retrieve OPCH total and then compare.
I think by declaring the variables we can assign the query result.
Thanks & Regards
Narayani