WHERE statement on an inner join with GROUP BY
Can you just put LINE.SALESSTATUS in (3,4) in inner part of subquery like below: 

 SELECT
  LINE.ITEMID
  ,LINE.CUSTACCOUNT
  ,LINE.QTYORDERED
FROM dbo.SALESLINE AS LINE
INNER JOIN dbo.SALESTABLE AS STABLE ON LINE.SALESID = STABLE.SALESID AND LINE.DATAAREAID = STABLE.DATAAREAID 
where  LINE.SALESSTATUS in (3,4)
GROUP BY LINE.CUSTACCOUNT,LINE.QTYORDERED,LINE.ITEMID
HAVING COUNT(*) &gt; 1


may be it helps you to get filtered record sets inside the inner section.