Hi Shankar,
As per standard SAP flow,
Step 1 ) system picks the stock removal indicator from the WM1 view of material master
Step 2) Picks the storage type from the T334T table based on the removal indicator from step1
Step 3) Once the storage type selected it goes and check the available Quant in the storage type
Step 4) After selection of all the Quant it sorts the selected record based on the GR date
Step 5) Once the first quant selected it pass all the Quant information to internal table
Step 6) Checks the required quantity minus quantity of first quant selected if the balance is greater then zero process continue from step 2 till the time required quantity - allocated quantity =0
Now your query how system selects the Storage unit type, as you can see from above steps system selects the Quant and the quant is already having the Storage unit type assigned. in the below example i have four quant in the stock and my requirement is for 120 PC, you can see the Sequence in Transfer order system stamps the TO line item based on the Storage type search (003,002 in below case) and then based on ascending order of Goods receipt it selects the Quant from within the Storage unit
in the below example
Storage type search strategy (Entry into T334T)
Stock in warehouse