Hi Lailus,
That should be possible. You can adapt the query to not consider the working document (SO#2016).
just add this to the WHERE clause:
AND NOT DocNum = $[ORDR.DocNum]
Regards,
Johan
P.S. I have not looked at your query, so you may have to tweak the line above a little.