Territory Replication from CRM to C4C: Multiple territory hierarchies in CRM
Issue:
In CRM you can have multiple territory hierarchies with multiple root territories whereby in C4C only one territory hierarchy with exactly one root territory is supported.
Hence if you try to replicate more than one root territory from CRM to C4C, the webservice message will fail in C4C with the error message: “No parent territory has been assigned”.
Solution:
Introduce a virtual root territory in CRM under which all CRM root territories are linked as childs.
Note: The virtual root territory need not be persisted in CRM but is only referenced virtually in the outgoing IDoc.
Solution Details:
1.) CRM: Create a BAdI implementation for the BAdI CRMPCD_TERRITORY_OUTBOUND.
2.) CRM: Implement the following logic in BAdI method ADJUST_IDOC. By doing so all CRM root territories will be childs of the virtual root territory with the ID $$$$$$
3.) C4C: Create a root territory if it is not yet available.
4.) C4C: Go to the ID Mapping and map the C4C root territory that you have created in previous step to the virtual CRM root territory with the ID $$$$$$.