Hello Abhijit,
From your post the requirement is not clear. Need to understand whether you wan to re-determine the partners at item level only or at header level.
If it is for header level then you can configure your system in SAP std without going for any enhancement. In Partner determination procedure configuration for sales order header, there are the fields: source or origin (not sure as not in front of the SAP system). By using these you can control the behaviour of partner determination.
Hope this will help you.
Thanks and Regards,
Atulkumar Dagade