Skip to Content
author's profile photo Former Member
Former Member

Filtering out DDLB options in Trade Promotion Search Screen

Hey Folks,

I am trying to filter out the DDLB options for a couple of search criteria in the Trade Promotion Search screen.

Changing filter values for any value help can be achieved by implementing the BADI 'CRM_MKTPL_OL_OBJ' and putting the necessary logic in the method IF_EX_CRM_MKTPL_OL_OBJ~CHANGE_VALUEHELP_ENTRIES of the implementing class.

This works just fine when the value help drop down is in case of elements in the Overview page.

However, when I try to apply the same for the Search, the BADI is not called at all.

The cause of this issue is as follows:

All calls to the afore mentioned BADI happens in method FILTER_VALUE_HELP of class CL_CRM_MKTPL_VH_BOL_PROXY.

However for objects not of the type cl_crm_bol_entity, an exception is thrown at line 8 and the control exits out of the method.

The exception is thrown on this assignment

lr_entity ?= mr_bol_abstr_bo.

Here mr_bol_abstr_bo is an instance of CL_CRM_BOL_DQUERY_SERVICE at runtime and lr_entity is of type CL_CRM_BOL_ENTITY. Hence the move cast error is encountered on the assignment. However both inherit the same abstract class 'CL_CRM_BOL_ABSTR_BO '.

This problem could have been resolved if the object lr_entity was of type CL_CRM_BOL_ABSTR_BO instead of CL_CRM_BOL_ENTITY.

Now coming back to the issue which led to this, is there any easy way to circumvent this issue or ensure that the BADI which filters out the DDLB options is being called in this case for the search Criteria in Trade Promotions.

Thanks and Best Regards,

Puja.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on May 29, 2008 at 01:03 PM

    Hi Puja,

    It is correct that this BADI does not trigger for a Search view.

    As,I understood you are trying to remove some entries from the Search Criteria.

    So, the IMPL Class for the Trade Promotion search is

    CL_TPMOE_ADVANCEDSEARCH_IMPL

    There is a method in this class,

    GET_POSSIBLE_FIELDS.The returing parameter for it is RT_RESULT. You can debug and check that all the values available for Search criteria are available in this table.

    Redefine this method and filter the required entries.

    Reward if useful,

    Imran

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Imran,

      I am trying to filter out the value help entries for a couple of Search Criteria, ie, I want to filter out values that appear in the dropdown in the third column, which are value options for the Search Criteria selected in the first column.

      For eg: If I select 'Status' as my criteria, then the resulting dropdown in the third column would be , say. 'Status1', 'Status2' and so on.....I need to filter out these dropdown value help options for the search criteria 'Status'.

      You rightly pointed the method that needs to be redefined in case the entries for the search criteria has to be changed. However my requirement is to filter out the value helps available for some of these search criteria.

      Please let me know if there are any pointers you have towards this.

      Thanks and Best Regards,

      Puja.

  • Posted on May 29, 2008 at 04:19 PM

    Hi ,

    Can you create OSS message. Exception should be corrected to use the BADI exit.

    Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.