cancel
Showing results for 
Search instead for 
Did you mean: 

Enhancing BuilEmpAdvancedSearch with standard field BU_GROUP

Former Member
0 Kudos

Hi,

I have the specification to return lists of employees with BUT000-BU_GROUP = X when a search for employees is performed on Web UI.

The standard already returns it with other BU_GROUP types both on dev and quality environments. I then do a custom filter at the view level to get the required ones. However, on quality environment, the results are limited by the number of MAX_HIT specified in the standard and it does not return the required type (found at the end of the table BUT000) in the list and the custom filter does not work.

If the MAX_HIT is increased to millions on the search screen, the custom filter works but then it causes a performance issue.

The new solution to be implemented is to enhance the search object BuilEmpAdvancedSearch so as to add our custom condition BUT000-BU_GROUP = X into the query itself. The query's result attribute structure CRMST_EMP_OBJECT_BUIL does have the field BP_GROUP in it, however the field is not present on the search object attribute structure CRMST_EMP_SEARCH_BUIL.

How can I make the BuilEmpAdvancedSearch query object take BP_GROUP as a search criteria too?

Accepted Solutions (0)

Answers (1)

Answers (1)

kumar5
Active Contributor
0 Kudos

Hi ,

I think this can be done using Badi 'BADI_CRM_BUPA_IL_SEARCH_EXT' .

In below doc they have added Tax field to employee search.

http://scn.sap.com/docs/DOC-35476

You can add the BP_GROUP field in the same way.

Thanks

Kumar.

Former Member
0 Kudos

Thanks for the reply Kumar.

I have created an implementation of the BAdI 'BADI_CRM_BUPA_IL_SEARCH_EXT' as you suggested, however it triggers only when searching for an account and not when doing search for employees  (BP_KIND = EMP) present as a Search and Result view on another workcenter.

Can you advise?

kumar5
Active Contributor
0 Kudos

check the filter for you your implementation.

Thanks

Kumar

kumar5
Active Contributor
0 Kudos

Hi,

There is one another approach if the Badi is not getting called.

The class 'CL_BUPA_IL_EMP_SEARCH' is responsible for the search for employees.

Now just copy this class to zclass in 'se24' TC and maintain the same in SPRO under path

SPRO->CRM->CRM Cross-Application Components->Generic Interaction Layer/Object Layer->Component-Specific Settings->Extend Object Model for Business Partner


Here external object name will be BuilContactAdvancedSearch & implementation class would be your custom  z class.


Now put the debugger in the custom class methods and execute the search from UI and check how does it work and try to implement your custom logic in similar way.


Thanks