SAP Message VHUAP222 - The handling unit cannot be assigned to delivery &1

Diagnosis
You wish to assign a delivery to an HU. However, the document (order/purchase order that is assigned to the HU does not match the documentthat is used as the preceding document for this delivery.

Procedure
Select the HU and choose Change HU Reference. Enter the precedingdocument of the delivery or the delivery itself in the dialog box andchoose ENTER.
After you have refreshed the list, you can include the HU that is nowassigned to the correct document in the delivery.