Showing results for 
Search instead for 
Did you mean: 

Territory not determining according to postal code rules

Former Member
0 Kudos

Hi Experts,

Im new to SAP CRM Territory Management.

The requirement is to have the Territory determined in an Opportunity for Sales Employees.

I have set up the territory hierarchy in the WEBUI as follows -


     Line Of Business



                    Territory 1( Here i assigned a sales rep)


                    Territory 2( Here i assigned a sales rep)

I created the Rule Policies, the rule policies for Builder and created a rule for each of the lowest level territories - Postal code rules

Rule 1 : between 1950 and 2050 = Territory 1

Rule 2: between 2051 and 3050 = Territory 2

Each lowest level territory has an employee assigned to it (Sales Rep)

Im using two customers to test -

Customer 1 falls within Postal Code 1 and has Sales Rep 1 assigned on BP

Customer 2 falls within Postal Code 2 and has Sales Rep 2 assigned on BP

I am Sales Rep 1, I am also the "User" for config and testing


I copied OPPT to Z txn

Kept it as standard but I ticked the Territory Check box

Org Data Profile is copy of 000000000005 SALE Org. Data Profile for Order (Header) to Z txn with Org Model Det Rule 10000194

Now, when I log onto the WEBUI and create a new txn Opportunity, and select my Z opportunity from the pop-up, it immediately populates Empl Resp with my name and determines Territory 1. So I am assuming its determining the empl resp from my user, and in turn its pulling Territory 1 because I (as sales Rep1) am assigned to this territory.

When I enter Customer 2 as Prospect (who according to the postal code rule I set up, should fall within Territory 2), it doesn't change the territory to Territory 2. It just stays as Territory 1. No errors or anything. Even though Customer 2 with Postal Code 3005 should = Territory 2.

The problem is I don't want it to populate Territory on opening the transaction, but only by the postal code of the BP (Prospect) I enter in the transaction, and by this, in turn determine the responsible employee who is assigned to that territory.

Have I got the right idea here, or am I missing something? It seems it is ignoring the rules I created for postal codes.

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Found the problem -

Once the settings have been applied as per Best practice documentation C79_Territory Management, make sure of the following :

Go to the customizing SPRO -> SAP Reference IMG -> SAP Customizing Implementation Guide -> Customer Relationship Management -> Basic Functions -> Partner Processing -> Define Access Sequences Select access sequence 0030 -> Go to individual accesses.

Check access step 15 CRM_PARTNER_M -> Here the field partner function (scroll right) is maintained as 000000001 Sold to party; this has to be changed to 00000021 Sales prospect; what we are trying to say here is when employee responsible is being determined, and when the step 15 is being evaluated, then the partner sales prospect needs to be used to determine employee through territory.

You need to run the CRM_TERRMAN_PROC_REL report. This is the report which forms the relations between accounts and territory based on the rules. Once you run this there should be a relation formed in the table CRMD_TERR_ACCREL for account and territory.

If determination still isn't working, check the following -

SPRO -> SAP Customizing Implementation Guide-> Customer Relationship Management -> Master Data -> Territory Management -> Assign Partner Function to Assignment Function Category. here you have maintained the partner function 00000012 (sales representative) and corresponding assignment function category 0002. If you see the documentation of this customizing, AFC 0002 means that partner determination and territory determination will not work.

Change the AFC in the customizing to 0000; then go to the territory xxxxxx, just edit the employee, change the partner function once, then revert back to original value and save. (This ensures a MODIFY trigger on the database to adjust some DB values for the partner determination to work).

Active Participant
0 Kudos

Hi Kendal,

I am also facing the same issue however I plan to determine the territory for my branch sales manager in the lead transaction,

a) I have done the following settings copied the standard access sequence from 0030 to Y030.

in the batch sequence and dialog sequence 15 changed the partner function to prospect

00000021, I have assigned the access sequence to my partner function and this partner function is assigned to my determination procedure which in turn is assigned to my transaction lead

b) I do not have any rules which are set for my territory however I have created my territory and assigned my employee to the same.

c) In the customization Assign Partner Function to Assignment Function Category I have assigned  my Z patner function along with the Z relationship category

d) In my prospect master data I have assigned my branch sales manager in the relationship category however my partner function and territory does not get determined.

Kind Regards


Active Participant
0 Kudos

This is resolved through the below thread.

Kind Regards


Former Member
0 Kudos

Hi Atul,

Your settings seem to be correct.

We did however decide to use another option when determining territories, even though we did get it to work with postal codes.

We are using direct account assignment, where rules are created to directly assign accounts to territories.

Territories are thus the "anchor' with employees determined via assignment on the territory structure and accounts determined via rules.

We have accounts that belong to multiple sales orgs across the country, so to filter correctly, we used territory attributes Account ID and Sales Area.

This means we create rules that say if it is account ID 123456 and belongs to sales area ABC, determine "Territory 1"

If it is account 123456 and it belongs to sales area XYZ, determine "Territory 2".

Sales Area being determined by the person logged on.

These rules are assigned to their respective territories.

The employee responsible and territory are only determined when the account number is entered.

More than one person assigned to the territory will give a pop-up to choose from.

Relationships work too as you have done, the only problem we have found is that if the person resigns, and he was assigned multiple territories and multiple customers, you have to manually change all of these from the old employee to the new employee and make sure you miss nothing somehow.

If people are hired, fired and resign monthly, this becomes a tedious exercise. Whereas, if you do determination by rules, you can just edit the rule by copying the current rule, change the "valid to" date on the original rule to expire on the date you need it to expire and setting a "valid from" date on the copied rule with the new employee assigned, to start on the day the new person starts in the position.

It will end the old rule and start the new one automatically with all conditions / attributes carried over automatically too. No manual relationship settings. Especially where a rep might have 100's of customers.

Every instance is unique, so if your settings suit your requirements and make it easy to maintain for the customer, use what you have. Well done on finding a solution so quickly!



Answers (1)

Answers (1)

Former Member
0 Kudos

There is good information about emp.resp determination in this conf. guide