sorting data

Hi all,

Here’s one situation as,

  1. First, i need to select a record from PurchTable.

  2. Now, i have to check the purchid from the purch table in VendPackingSlip Jour table.

  3. If found, we have to go to packing slip trans table for that particular purchid

  4. Now, if all the lines of the in that packing slip trans have the qty as -ve value, then that purchid has to taken else it should break from loop and go to the next purcid in the purchtable…

How can i check whether all the lines of one purchid has negative Qty. If one line has +ve qty, then it should not consider that particular purchid itself…How?

Please help friends and Xperts…