Hi Martin,
I had the exact requirement and have just done that.
You need CRM_ORGMAN_POPUP_INF_1020_SET funtion module to access to the pop-up and fill it with the values you want after implementing your own logic in a custom function module for your organizational rule.
You might want to check this SAP Note, too: