While doing a stock movement for a Purchase Request, the system performs a check on the availability of each item within the specified location and its sublocations. The grid is dynamically populated based on this assessment. If the required stock is not fully available at a specific location, the system allocates the available quantity from that location and picks up the balance from other relevant sublocations.