Hello Shaker,
First would you explain why you want to assign the different line items to different groups ? If that is your requirement then create separate deliveries for both.
If you have already created the delivery, then use Delivery Split using VLSP and separate the line items and then assign the Deliveries to different groups as desired.
Thanks,
Sai Arala.