Dear SAP Colleagues,
As far as I can see below configs are the ones important for this determination:
Plant Maintenance and Customer Service > Master Data in Plant Maintenance and Customer Service > Basic Settings > Partners > Define Partner Determination Procedure and Partner Function
Plant Maintenance and Customer Service > Master Data in Plant Maintenance and Customer Service > Basic Settings > Partners > Copy Partner Functions to Master and Movement Data