Hi all,
Because I didn't get an answer and because the answer could interest someone else :
1) the formula to calculate the item available Quantity is as follow :
Total Available Quantity = Total Quantity - Current Reserved Quantity.
= Total Quantity - (total requested quantity + current pending quantity).
= Quantity in inventory – (all demands + quantity not yet committed to the database).
where

The Total Quantity could be calculated based on the "Remaining Qty." from the Item Ledger Entry table (SUM with filter on fields Open = True and Positive = True).
The Total Requested Quantity is the quantity reserved on other outbound documents which is not posted yet and could be calculated based on the Reservation Entry table
The Current pending quantity, if you are assigning lots on by code where you group Quantity by Lot No. or Serial No., you don't need to use it, because if fact it means the quantity on the current document not committed yet (not committed to Reservation Entry table) and this could be used when you have a page with temporary table.
2) To check a Lot No./Serial No. is valid (already exists) you can filter on the Lot No./Serial No. on the Item Ledger Entry (with filter on fields Open = True and Positive = True if you want Lot No. Serial No. with positive available Quantity).
--
If someone reads this and needs more info, just write me back and I hep you.
-----
Best Regards,