cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Implementation of BADI_CRM_BUPA_IL_SEARCH not called

Former Member
0 Kudos
533

Hi everyone.

Please help. I have created an implementation of BADI_CRM_BUPA_IL_SEARCH via the Enhancement Spot CRM_BUPA_IL_SEARCH. I need to filter the business partners returned in a search.

I have markded the implementation as "Active - not switchable through IMG".

However whenever I search for accounts via the WebUI the filtering I coded in the implentation is ignored. When I set a breakpoint in the code I can see that it is not even being called.

One thing I have not done is set a filter value for FILTER_KEY as I don't know what to set there.

What else must I do???

We are in CRM 6.0.

Thanks

Dave

Ok I have found that the reason is to do with the FILTER_KEY. Now my issue is how do I know what to enter for the FILTER_KEY value in my implementation? The data element just indicates CHAR4 and the SAP standard implementations have used 4 letters out of their implementation names.

Edited by: Dave Beardall on Jun 26, 2009 4:39 PM

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

By the way, there is a filter-less way to do this with the BADI CRM_ACC_SEARCH.

Regards,

Sowmiya

Former Member
0 Kudos

Hi Sowmiya

Sorry for the late reply. I was waiting for a response to an OSS message we raised on this issue. The SAP response was pathetic, and basically just repeated what I had said in the message.

The BADI CRM_ACC_SEARCH is unfortunately called by the method CHECK_OBJECTS of CL_BUPA_IL_HEADER_SEARCH after the table GT_FILTER_BADI is read. So the opportunity to set the filter key has passed. Naturally I could have filtered the values there as well but I wanted to get the enhancement spot to work.

So I finally created an enhancement in method CHECK_OBJECTS where I simply added my filter key to the table GT_FILTER_BADI. It works but I'm sure this is not the way it is meant to be done. It seems like a work around.

If anyone else reading this knows where I have gone wrong please share the knowledge.

Thanks.

Dave

0 Kudos

Hello

The solution seems to be much simplier.

Search strukture CRMT_BUPA_IL_HEADER_SEARCH include the field FILTER_KEY. Set value as a parameter manually or in the program and then BAdI is call

Regards

Lukasz

Former Member
0 Kudos

In the same class, in method FILTER_BY_SEARCH_CRITERIA, I found the following pieces of code.

MOVE-CORRESPONDING is_parameters TO ls_search_criteria.

MOVE-CORRESPONDING ls_search_criteria TO ls_address.

and then

COLLECT ls_search_criteria-filter INTO gt_filter_badi .

Maybe this helps a little further.

Reagrds,

Sowmiya

Former Member
0 Kudos

Hi Sowmiya

We don't have method FILTER_BY_SEARCH_CRITERIA (CRM 6.0).

Former Member
0 Kudos

Hello

As far as I can see, you just need to enter a filter value for which the code needs to be executed. It has to be 4 characters long. That is all. There is no other value table to choose from.

Regards,

Sowmiya

Former Member
0 Kudos

Hi Sowmiya

Thanks for the reply.

I had already entered a 4 character filter value. The problem is how do I tell the SAP code to use my filter?

In debugging I have found that method CHECK_OBJECTS of CL_BUPA_IL_HEADER_SEARCH has an internal table called GT_FILTER_BADI. The code uses the values in this table to do the required GET BADI. However when I run the program the table is empty so my code does not get called. If I add my filter value to the table in debugging mode my code gets called.

So I need to work out how to tell the SAP code to use my filter. I was pretty sure it was through transaction BSP_WD_CMPWB on component BP_HEAD_SEARCH but I could not find it there.

I am sure that I am missing something really basic here but I am new to CRM.

Regards

Dave

Edited by: Dave Beardall on Jun 29, 2009 1:01 PM

cigdemcetin
Discoverer
0 Kudos

Hi,
This may be the badi you are looking for, the methods mentioned in this article are available.
BADI_CRM_BUPA_IL_SEARCH_EXT