In the CRM Webclient, it is very often that the standard contact history assignment block in the account overview or in the customer fact sheet does not meet up to the requirements of the users. For instance, SAP will always select all historical contacts. This of course will take some time in case of large 'busy' accounts.
Customizing can be done to improve the performance on this assignment block, by setting a maximum number of selected activities. The selection on the database will then be 'up to n rows'. The effect of this is that the system will select the first n rows it finds.
As the crmd_order_index is sorted by guid, the outcome of the selection is not guaranteed. Most likely, the system will show the n oldest activities, and the chance that the most recent activity is shown, decreases overtime as more activities are created in the system.
Especially in a B2B environment with many contacts on large accounts, this can become a problem.
The solution is to implement your own logic in the BADI CRM_BP_UIU_BT. Here, you can delete items based on their contents. This will improve performance as after the BADI, more details will be retrieved from the system, and less data is moved to the browser.
In our example, we added coding to delete marketing-related activities from the overview, for the account manager business role, as this is of less interest for them. After reading the current profile, we used the following code to narrow the selection:
ls_selrow-attr_name = 'PROCESS_TYPE'.
ls_selrow-sign = 'I'.
ls_selrow-option = 'NE'.
ls_selrow-low = '[PROCESS_TYPE]'.
APPEND ls_selrow TO ct_selection_param.