How to save consumption issue if after entering consumption order and its details, system shows error ‘Record not found’?

Cause:
1) System will not allow to save the consumption issue if item lot used in the issue are near expiry.
2) System will show the error ‘No records for and above the minimum shelf life found for the item’.
Logic:
If you click on ‘Allocate’ button, the system will allocate the materials automatically as per the below conditions:
If item master having track shelf life defined as ‘Yes’ then allocate the approved (If available selected as ‘Yes’ else un-approved material allocated) then based on expiry date and then based on first in first out logic.
If you click on ‘All Items’, system will allocate the materials for all items which items are available in consumption order and conditions as above.
Remedies:
1) User should enter other lot no or click of Stock button and drop down the required stock from stock window.
2) User should enter the lot sl or click of Stock button and drop down the required stock from stock window.