Hi Tamas
can you give some idea more in detail about your requirement , step by step . I thing your issue can be resolved by standard way.
what I understood is you have HU which has A,B,C product ( what is st type you keep this HU?)
You receive D product and then u want to pack and ship.
Please let me know my understanding is correct or wrong.
Regards
Suraj