Hi Jey
It depends on warehouse priorities. In our case warehouse had space constraints & FIFO was not must. So emphasis was on picking full pallets 1st. For remainder qty, pick partial pallets starting from smallest quantity. By this we are limiting creation of partial pallet out of a full pallet. Also releasing several bin positions occupied by partial pallets.
For your case BADI should have code to get all quants on available qty in descending order into a internal table. Check if there is matching quant for pick qty. If found use this for WT creation.
Else allocate picking qty to 1st quant of internal table. If picking qty is fully supplied store information in internal table for WT creation. If not, allocate remaining pick qty to 2nd quant. Repeat this till pick qty is exhausted. Store source bin, quant, qty to be picked from above iteration in internal table. Use this for WT creation.
You can optimize it further by checking for matching quant after every iteration
Just an example. You can optimize it even better Based on client requirements. Hope this helps.
Best Regards
Phani