Just FYI because I didn't read the BAPI documentation before I tested this, running the BAPI_USER_ACTGROUPS_ASSIGN FM will DELETE all records in the table for that username and add back only the records from the ACTIVITYGROUPS table.