Hi Vishal,
you can use the user exit EXIT_SAPLL03A_005 where you can write the logic to sort the LQUA record internally on ascending order of quantity (LQUA_VERME) and then pass the value to create the transfer order.
Hope this helps, Let me know if you need any further information