I'm pretty sure this should be feasible without such custom development. Please try the suggestion from Michael and look for more information on handling different packaging in SAP. This is not an unusual scenario and most likely a standard process exists for it. (I'm not an SD expert, sorry.)
What people frequently don't realize with such splitting ideas is the ripple effect it causes on all other processes. E.g. how would you get all the items back on the invoice? The customer did not order 10 items of 10, they ordered 100 and couldn't care less about your warehouse challenges.