SAP Message C8040 - Status profile cannot be changed in selection profile &2

Diagnosis
The status profile cannot be changed in the selection profile &V2&since user statuses from the status profile &V1& are still used.

Procedure
First delete all the user statuses used from the status profile &V1&in the selection profile &V2&. Afterwards you can change the statusprofile.