Skip to Content
0
Former Member
Dec 02, 2006 at 01:44 AM

Territory Management Employee assignment

111 Views

hi gurus,

I am facing some problem when i am creating an territory managment hierarchy.

It was creating terrtiory hierarchy succesffully.

But when i am assigning the employee to the territory (territory id) it was not adding an entry to Employee assigned to territory.

This problem i am facing for some dealer only.

I am running the program with 45K records.

Here are the function module that i am using:

To create an territory hierarchy:

CALL FUNCTION 'CRM_TERRMAN_TERRITORY_CREATE'

EXPORTING

it_territory = i_territory

it_territory_v = i_territory_v

it_territory_t = i_territory_t

it_terrattrib = i_terrattrib

it_terrstruct_relation = i_terrstruct

iv_cdb_update = l_cdb_update

iv_bw_update = l_bw_update

EXCEPTIONS

internal_error = 1

bw_update_failed = 2

msa_update_failed = 3.

To create an employee assignment to terrtiroy:

CALL FUNCTION 'CRM_TERRMAN_WRITE_TERR_TO_POS'

EXPORTING

act_position = l_act_position

act_begda = sy-datum

act_endda = '99991231'

IMPORTING

not_saved_at_positions = l_not_saved

TABLES

infty_tab_exp = i_infty5550

EXCEPTIONS

no_active_plvar = 1

no_authorization = 2

error_during_write = 3

objects_locked = 4

OTHERS = 5.

Note: The dealer which are failed to create an employee assignment. If i used the above mention function module to run individually then it runs succesffully. I am facing the problem only in bulk of records(45k).

Please provide the solution what could be the problem.

Thanks

Viswa