cancel
Showing results for 
Search instead for 
Did you mean: 

Territory Management

uday_sunkara3
Explorer
0 Kudos

Hello,

Need some advise on the below requirement,

Current process is every new customer is manually assigned to a territory.

Changes or reassignments of customers to different territories is also a regular process

Process used is BRF rules

Every time a new Business partner or a customer is created, we edit the current rule and copy the rule and add a new customer and assign a valid start date of the new rule from the following day and end the existing rule with today’s date.

To deal with any changes like un assigning a customer from a territory and assigning it to another territory.

We have to edit the existing BRF rule, copy and delete the customer and set the valid start date of the rule from the following day and end the existing rule with today’s date.

Then follow the same above process to add the deleted customer to another territory.

I am planning to get this automated using the below

We would like to automate this process with the below modifications

Automatic assignment of customers to Territory based on BP relationships

BP Relationship – Is Responsible Employee

Create a new custom Territory attribute for BP and use necessary Business Add-ins to extract the Business Partner and relationship (Is Responsible Employee)

Please suggest a solution to this requirement, or if i can achieve this with the above changes and what changes are required on BRF side?

Thanks

Regards

Uday

Accepted Solutions (1)

Accepted Solutions (1)

spencer_liang
Active Contributor
0 Kudos

Hi Uday,

This is Spencer . You may remember me.

There is no attribute for BP relationship. You will need to firstly define the attribute in Maintain Territory Attributes and code your logic in BADI: Implement Business Logic for Additional Attributes.

You may read the document first.

You may refer document

Personally, I have never seen any customer who requires establishing account - territory relationship based on BP relationship. Who will be the source of the BP relationship? How to assign it to territory? I do not an answer. You may have to implement the logic in the badi.

At the end, the final result of maintaining account - territory relationship is to update the crmd_terr_accrel table which is the relationship table for account and territory. This table is used during territory determination and territory check (note 2291621 ) rather than calculate the rules (performance). Consequently, you have to consider updating this table. There are 2 ways.

1, run report CRM_TERRMAN_BUILD_REL during non business hours, or

2, dynamic update of relationship


Spencer

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

Yes I do, I have spoke with you the other day.

I understand what you mean,  Account - Territory assignment process is not by post code on a geographical location and has lead this to a manual process.

I couldn't think of any other option other than relationships to automate Account assignment to Territory.

Please let me know if there is another option.

I will go through the document and get back to you.

Thanks again as always for your support.

spencer_liang
Active Contributor
0 Kudos

Hi Uday,

There are only 2 ways to assign relationship for account and territory.

Manually assign the relationship in account details with assignment type overriden.

Or generated by territory rules automatically.

As you want to "automate" it, rule is the only option.

I have the BOM item deletion incident in status customer action.

I will try to give you a call and explain both. Hopefully, we may have some new idea.

Spencer

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,


Thank you, I will close the call for BOM item deletion, I will wait for your call.


Regards

Uday

spencer_liang
Active Contributor
0 Kudos

Hi Uday,

Thanks. You may reply it with your number. I called your mobile +** 4** **8 **1 but cannot reach you.

Spencer

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

Sorry, I was at my colleagues desk, by the time I got back to answer your call, it was disconnected, tried to call back, but it got to the switch.


Can you please call me now.


Regards

Uday

uday_sunkara3
Explorer
0 Kudos

Dear spencer,

Sorry, I apologise missed your call again, Do not disturb was active, turned it off now.

Regards

Uday

spencer_liang
Active Contributor
uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

Really appreciate your help with this, I think I can take it from here to proceed further.

Regards

Uday

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

We have started to work on this and our developer had a question which i was not able to answer.

I have setup a new Territory attribute for BP as ZB_BPREL and our developer has added code to the BADI as below and activated the BADI and method.

method IF_EX_CRM_TERRMAN_ATTRIB~PROCESS_RELNSHPS.

  break usunkara.

   DATA: lw_accrel TYPE crmd_terr_accrel.

   LOOP AT it_rule_attr TRANSPORTING NO FIELDS

            WHERE attribute = 'ZB_BPREL'.

*        ls_subrc = 0.

     EXIT.

   ENDLOOP.

endmethod.


His question is how can we initially trigger the break point set in the code to go through the process steps.


Please assist with this.



Thanks

Regards

Uday

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

Please ignore my request, was able to find out what the issue was.


Regards

Uday

Answers (1)

Answers (1)

uday_sunkara3
Explorer
0 Kudos

Dear Spencer,

We have started to work on this and our developer had a question which i was not able to answer.

I have setup a new Territory attribute for BP as ZB_BPREL and our developer has added code to the BADI as below and activated the BADI and method.

method IF_EX_CRM_TERRMAN_ATTRIB~PROCESS_RELNSHPS.

  break usunkara.

   DATA: lw_accrel TYPE crmd_terr_accrel.

   LOOP AT it_rule_attr TRANSPORTING NO FIELDS

            WHERE attribute = 'ZB_BPREL'.

*        ls_subrc = 0.

     EXIT.

   ENDLOOP.

endmethod.


His question is how can we initially trigger the break point set in the code to go through the process steps.


Please assist with this.



Thanks

Regards

Uday

spencer_liang
Active Contributor
0 Kudos

Hi Uday,

Sorry, I do not know it.

Try to maintain the break point set in SU3 for the logon user with value X?

Why not set a breakpoint in this method directly?

Spencer