cancel
Showing results for 
Search instead for 
Did you mean: 

Use BAdI CRM_TERRMAN_FILTER to filter accounts by SA attributes ?

Former Member
0 Kudos

In Territory Management (CRM7) we need to get accounts related to a territory using both BP and SA attributes. So far I have found that I should/could use the CRM_TERRMAN_FILTER BAdI to Filter Related objects by the Sales Area attribute (All the BP attribbutes are working fine, SA attributes are ignored). I cannot figure out where this BAdI is being kicked off. Is this better than using the BAdI CRM_TERRMAN_ATTRIB?

Example:

     Territory A has

     Employee Responsible: John Doe

     Sales Area: SOrg1 Division1 Channel1

At the moment it correctly associates accounts where John Doe is the employee responsible with Territory A

but it completely ignores the Sales Area attribute and includes accounts with different Sales Area data than what we want.

If anyone has any opinions or could shed some light on this, I would be very grateful! Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Siobhán

did you find a solution for this? I have the same challenge now...

Thanks for any hints!

Philipp

Former Member
0 Kudos

Hi Philipp,

I came up with my own solution which was:

I implemented the BADI CRM_TERRMAN_ATTRIB and in the method PROCESS_RELNSHPS I wrote my own code to filter acconts for the the SA arrtibutes.

I hope this is helpful to you.

Regards,

Siobhán

0 Kudos

Hi Siobhán

thanks for your quick reply. This is exactly what I have done as well. It works fine when running the territory assignement coming from the territory rule and searching for matching business partners.

But how did you solve the challenge, that territory assignment should change when the value in crmm_but_class is changed in the business partner? How does the system determine the correct new territory in this case?

Have you encountered this issue as well?

Philipp

Former Member
0 Kudos

There is a program that needs to be run which updates the territories for the partners. It would be best to set up a scheduled background job to run this program regularly. The program is called CRM_TERRMAN_PROC_REL.

This program essentially updates the following relationship tables:

CRMD_TERR_ACCREL

CRMD_TERR_PRDREL

CRMD_TERR_SAREL

which are used by the CRM system to determine what territory a BP is in.

Former Member
0 Kudos

Dear Siobhán, could you pleae provide an example code? best regards Christina

Answers (1)

Answers (1)

thomas_weiner
Member
0 Kudos

Hi,

in TM we also need to filter territories for sales area (CRM7). Since SAP recommends activating BAdi CRM_TERR_FILTER_TMPL (CR300 page 12-10), we did that. We also ran into the problem, that territories aren't filtered by sales area. Is this part of information obsolete by now (propably CRM_TERR_FILTER_TMPL is pre-BRF+)? Which result is to be awaited, if CRM_TERR_FILTER_TMPL is activated? Would activating an own implementation of CRM_TERRMAN_ATTRIB where only method PROCESS_RELNSHPS is implemented the right solution?

Any help would be nice.

Regards,

Thomas