How to enhance the standard search with custom field?

Hi all,
I would like to know the general optimal procedure to enhance the standard searches like Opportunity search or Lead search.
I've gone through some of the threads here. Some suggest, to add the new field using AET and copy the IMPL class of the search and then code the custom logic. Some say, append the new field to the structure of the search object and then implement the BADI.
I'm actually a bit confused to understand the correct procedure.
Can someone please help me with a generic procedure to enhance the standard search with a custom field?
Thanks in advance.

Hi Maren,
Once I have got the same development. I have followed the below steps, please check with this. Let me know for further inputs.
  Add new field using Append structure of type ‘XXX’ in search
  Create BADI implementation for Enhancement spot ‘ES_CRM_RF_Q1O_SEARCH’ and include filter ‘BTQOPP’
  Put your logic in BADI implementation – SEARCH method
  Add it in WebUI configuration
  Remove the operator if required
Regards,
Swadini Sujanaranjan

Similar Messages

  • Is it possible to enhance the dynamic search with Option field with custom

    Hi All,
    is it possible to enhance dynamic search with OPTION parameter like Equals to , Between etc, instead of these are we able to add our own? If yes, then which are steps need to perform.
    Thanking you.
    Regards,
    VjMHyd

    Just to test is this possible i wrote a sample program
    data: lr_dquery type REF TO cl_crm_bol_dquery_service.
    data: lv_status TYPE CRMT_PROCESS_DESCRIPTION.
    data: mv_bol_core type REF TO cl_crm_bol_core,
            lr_result_obj type ref to if_bol_bo_col,
            lv_opp_id type string,
            lr_entity type ref to cl_crm_bol_entity.
    MV_BOL_CORE = CL_CRM_BOL_CORE=>GET_INSTANCE( ).
    MV_BOL_CORE->START_UP( 'BT' ).
    *data: lv_opp_id type string.
    lr_dquery = cl_crm_bol_dquery_service=>GET_INSTANCE( 'BTQOpp'  ).
    if lr_dquery is bound.
    *   prepare the selection paramters
      lr_dquery->add_selection_param(
        exporting
          iv_attr_name =  'OBJECT_ID'   " Component name
          iv_sign      =   'I'  " Inclusion/exclusion criterion SIGN for range tables
          iv_option    =   'PI'  " Selection operator OPTION for range tables
          iv_low       =   lv_opp_id
    *   Get the dynamic result object and read the opportunity status from there
      lr_result_obj ?= lr_dquery->get_query_result( ).
      lr_entity ?= lr_result_obj->get_first( ).
      if lr_entity is bound.
        lr_entity->get_property_as_value( exporting iv_attr_name = 'STATUS'
                                    importing ev_result = lv_status ).
      endif.
    endif.
    BREAK-POINT.
    No syntax error but junk values returned as I had not written the logic for retrieval based on this operator. This means that if you add the selection_param to the dynamic query and then handle that same thing in the GENIL class for the component then you would be able to retrieve the values based on this.
    On the UI , you would be retrieving all the operators for the parameters. There for that particular field you have to add the new operator for your case. And this would be send to the Dquery class and added as a selection param. When the query is executed, if the genil class has been updated to handle this parameter, you should be able to retrieve the results.
    Regards
    Kavindra
    Edited by: joshi_kavindra on Jan 19, 2012 2:45 PM
    Edited by: joshi_kavindra on Jan 19, 2012 2:53 PM

  • How to Enhance the Standard Report?

    Hi All,
    How to Enhance the Standard Report? :
    When I am trying to execute the query called ZTIMES in the user group SQ01 it is navigating the screen to selection-screen with some inputs to be given here on the selection screen company code is mandatory as an input. The company code field is having the search help and it is fetching the values for the company code from table called PROJ  Table (Project definition Table).But I want the company code should fetch the value from the  PRPS Table ( Work break structure(WBS Element) Level).
    Tables used are PROJ and PRPS.
    The company code in PROJ is PROJ-VBUKR
                                    In PRPS is PRPS-PBUKR
    In the coding part related to that selection screen I have to replace PROJ-VBUKR with
    PRPS-PBUKR.But it is standard report to enhance.
    What is suggestible solution for this issue?
    Thanks,
    M Raju

    Hi,
    Since this is an ABAP Query, You can change the infoset query in SQ02 and establish the join linkages between PROJ and PRPS
    Also on the selection screen of the Query make sure you provide company code from PRPS table and report output also from the same table reference.
    Once you have modified the ABAP Query, activate and generate it so that it will internally regenerate the a standard program.
    http://help.sap.com/erp2005_ehp_02/helpdata/en/d2/cb4256455611d189710000e8322d00/frameset.htm
    ABAP Query (Sq01)Modification
    Hope this helps
    Regards,
    Shiva

  • How to enhance the Opportunities search help in UI

    Hi all
    I have a requirement wherein I need to enhance the Standard Search help of  Opportunities in UI.
    The requirement is, we have few custom fields and few fields from 'Milestone' tab .These fields needs to show it in the initial screen of 'Opportunities' to search the different opportunities.
    Ex:1.We have a custome field called 'Direct  Margin%' and this should appear in the drop down of Opportunity search help in UI
            and if the user enters a value against this then system should filter all the opportunities and should display the oportunities which are having the value entered by the user for ''Direct  Margin%' (similar to standard search).
    2. We have a field called Contract Start Date*' and this should appear in the drop down of Opportunity search help in UI
         and if the user enters a date against this then system should filter all the opportunities and should display the oportunities
         with the date entered.
    Hope!! the requirement is clear to all.
    Can you please let me know the detailed steps to acheive this requirement.
    Regards
    Anil

    Hi,
    Put the break point and check  in GET_DYNAMIC_QUERY_RESULT of CL_CRM_QOPP_RUN_BTIL at line no 133, inside the get_result_values method at line 4 get_result_guids will be called, within this method the above mentioned Enhancement spot will be called.
    following is the sample code:
    **********Reading the Values from the Fields in the UI************************************
      READ TABLE IT_MULTIVALUES INTO LW_MULTI_VAL
                  WITH KEY FIELDNAME = 'ZXXX'.
        LT_BSP_RANGE = LW_MULTI_VAL-SEARCHVALUES.
        READ TABLE LT_BSP_RANGE INTO LW_BSP_RANGE INDEX 1.
        LV_PART = LW_BSP_RANGE-LOW.
    ************Calling standard search for all fields except ZXXX partner function********************
        CALL FUNCTION 'CRM_BSP_OIC_1O_SEARCH_FROM_RF'
               EXPORTING
                 IT_SEARCH_TAB             = IT_SEARCH_TAB
                 IT_MULTIVALUES            = IT_MULTIVALUES
                   IV_NUMBER                 = IV_NUMBER
                 IV_EXTERN_CALL            = 'X'
                 IV_SELECT_FOR_HEADERLEVEL = 'X'
               IMPORTING
                 ET_GUIDLIST               = ET_GUIDLIST
                 ET_RETURN                 = ET_RETURN
               EXCEPTIONS
                 DATE_NOT_CORRECT          = 1
                 NO_CARD_TYPE              = 2
                 NO_CARD_NO                = 3
                 NO_PROGRAM_ID             = 4.
        LV_MAXHITS = IV_NUMBER.
    ******Function called to change partner number in the required format *********
        CALL FUNCTION 'BUPA_SEARCH_2'
          EXPORTING
            IV_PARTNER       = LV_PART
          TABLES
            ET_SEARCH_RESULT = RESULT
            ET_RETURN        = RETURN.
        CLEAR LV_PARTNER.
        READ TABLE RESULT INTO WA_RESULT INDEX 1.
        IF SY-SUBRC EQ 0.
          LV_PARTNER = WA_RESULT-PARTNER.
        ENDIF.
        IF LV_PARTNER IS NOT INITIAL.
    ************Calling Search for field ZXXX partner function**********************************
          SELECT HEADER FROM CRMD_ORDER_INDEX
                    INTO TABLE LI_GUID
                  WHERE PARTNER_NO EQ LV_PARTNER
                  AND  OBJECT_TYPE EQ 'BUS2000111'.
    ********LOOP will filter the guids according to the partner function  **********************
          LOOP AT LI_GUID INTO WA_GUID.
            SELECT SINGLE GUID_HI FROM CRMV_LINKPARTNER
                      INTO LV_GUID
                      WHERE GUID_HI EQ WA_GUID-LV_GUID
                      AND PARTNER_FCT = C_PFT .
            IF SY-SUBRC EQ 0.
              LV_OBJECT_KEY = LV_GUID.
              APPEND LV_OBJECT_KEY TO ET_GUIDLIST_PFT.
            ENDIF.
          ENDLOOP.
    ********Search guids by standard search function called ***************************
          LI_GUID_KEY = ET_GUIDLIST.
    *******Guids on partner number search******************************************************
          LI_GUID_KEY2 = ET_GUIDLIST_PFT.
    **Comparison of the results from the standard field search and the results got from Z field search**
          LOOP AT LI_GUID_KEY INTO WA_GUID_KEY.
            READ TABLE LI_GUID_KEY2 INTO WA_GUID_KEY2
                 WITH KEY LV_KEY2 = WA_GUID_KEY-LV_KEY.
            IF SY-SUBRC EQ 0.
              LV_COUNT = LV_COUNT + 1.
              IF LV_COUNT LE LV_MAXHITS.
                APPEND WA_GUID_KEY2 TO LI_RESULT_ETGUID.
              ENDIF.
            ENDIF.
          ENDLOOP.
          IF LV_COUNT GT LV_MAXHITS.
            WA_RETURN-TYPE = C_MESSGTYPE.
            WA_RETURN-ID   = C_MESSGCLASS .
            WA_RETURN-NUMBER = C_NUM.
            WA_RETURN-MESSAGE_V1 = LV_MAXHITS.
            APPEND WA_RETURN TO LT_RETURN.
            ET_RETURN = LT_RETURN.
          ENDIF.
          CLEAR ET_GUIDLIST.
          ET_GUIDLIST = LI_RESULT_ETGUID.
    *****************Partner Number Entered in ZXXX not Found*******************************************
        ELSE.
          CLEAR ET_GUIDLIST.
        ENDIF.
    ENDMETHOD.
    Regards,
    S Reddy

  • How to enhance the standard web query template in BW 3.5

    hello experts,
    How can I enhance the standard web template in BW 3.5? I can see that in 3.5 0QUERY_TEMPLATE is not longer the standard web template, the new standard template looks completely different with new functionalities etc. I can't follow the steps in the How To guide as this refers to 0QUERY_TEMPLATE. Also in transaction RSCUSTV11, it's got now only two options: style sheet and template attributes but no longer web template.
    Any help would be much appreciated.
    Many thanks,
    Inma

    Many thanks for your help.
    I managed to set a new standard web template based on 0ADHOC but now I've found a new issue: in the WAD, I have created a new web template also copied from 0ADHOC. This web template will embed a query and the web report will be executed from WAD, not from BEx. The problem is that the different buttons (Save View, Bookmark, Variable Screen, Export Excel, Export to CSV, etc)don't seem to work when I click on them once the report is showing the results.
    Can you please give me any idea on what's happening and if there's anything else I should do?
    Many thanks in advance.
    Inma

  • Replacing the standard workflow with Custom Workflow

    Hi Experts..!!
    I need one help ..!!!
    I want to know how can I replace the standard work flow of Travel Management WS2000050 / WS2000040  with my custom Workflow. Please help    me..!!
    Thanks & Regards:
    Gaurav Singh

    Hi Gaurav
    check below link
    http://wiki.scn.sap.com/wiki/display/ERPHCM/Workflow+Customizings+in+Travel+Management
    Travel management workflow temapltes you mentioned in your query are teiggered from event CREATED of busines object BUS2089. You just need to define same event as triggerimg event for your cust workflow in basic data setting (hat symbol) in swdd. Also go to standard workflow templates in swdd and check if event linkages are active (in green) if yes then dwactivate it by clicking on option A gree icon or by going in transaction SWETYPV.
    REGARDS
    IBRAHIM

  • How to Change the default Search value for Field Role?

    HI,
    I went through numerous threads on how to default the search value , but does not help for my issue. Hence im posting this new thread. Please provide your suggestions on how to achieve this.
    For the Ship-to party field (in item detail )  on webui when i do a F4 help i get the pop up with various search criteria and  for the field Role the default value is "Ship-to party".  which is visible. we need to change this default value to Prospect which is available in drop down.
    The attribute is STRUCT.ROLE  and view BP_HEAD_SEARCH/SearchHelp . The method GET_DQUERY_VALUEHELPS  from the context node class is called to fill the value help for this attribute, but i dont understand how the ship-to party is filled as default. There is no code in this method to default the value.
    The generic GET_V_S_STRUCT method also does not default the Ship-to party on this field.
    I want to understand how this Ship-to party is filled by default and how can i change this to prospect..
    Many Thanks,
    Shaik

    We had a same requirement of defaulting Sales org and division in search criteria for a specific value.
    this can be doen by redefining "DO_PREPARE_OUTPUT" method in IMPL class for the respective view.
    See the code:
    METHOD do_prepare_output.
    *CALL METHOD SUPER->DO_PREPARE_OUTPUT
    **  EXPORTING
    **    iv_first_time = ABAP_FALSE
      DATA:
        lr_qs TYPE REF TO cl_crm_bol_dquery_service.
    * Get current query object
      lr_qs ?= me->typed_context->search->collection_wrapper->get_current( ).
      IF iv_first_time = abap_true.
        lr_qs->clear_selection_param_values( ).
        lr_qs->delete_empty_selection_params( ).
    *   if l_sales_orgs is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '1'
            iv_attr_name = 'SALES_ORG'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = 'O 50000514'.
    *   endif.
    *   if l_dist_chan is initial.
        CALL METHOD lr_qs->insert_selection_param
          EXPORTING
            iv_index     = '2'
            iv_attr_name = 'DISTR_CHAN'
            iv_sign      = ' '
            iv_option    = 'EQ'
            iv_low       = '01'.
    * endif.
    Hope this will help..
    THanks & Regards,
    Amit

  • Enhance search functiponality with custom fields

    Hi Experts,
    I want to enhance component PRD01QR/Search with custom field in order to allow seraching for it. It is enhanced via set type. Please could you send me steps how to dpo it?
    Thanks,
    Juraj

    Hello,
    Maybe this helps:
    http://scn.sap.com/thread/3151887
    Best regards,
    Thomas Wagner

  • Replace the standard page with the customised page.

    how to Replace the standard page with the customised page.?

    Hi,
    I am not cleared with your requirement. However u can try this:
    Check if your standard page is attached with some function.
    You can then create a new custom function, attach that with the same responsibility as that of standard one. Thus u can access your custom page.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to copy a standard search help to another field

    Hi All,
    I have a BSP screen in that for one input field i need to copy the standard search help for the Business Partner. Could any one guide me how to copy the standard search help for the business partner into the input field in the BSP screen.
    Thanks In advance for the help...
    Thanks,
    SAP SAP

    Hi,
    the BP search is its own web client UI component. For the integration you could check any standard transaction UI component like the BT115H_SLSO, as those contain several partner fields.
    Best Regards,
    Michael

  • Name the PDF file with a field name

    Hi,
    I'm new to ES2 and Form creation in LiveCycle, my knowledge in scripts is very less or none i can say, if any one out there could help me out with this i'd be greateful.
    I have created a fillable PDF Form using LivecCycle ES2 and would like to know how to name the PDF file with a field value from the form when " save form " or " submit " button are clicked.
    Thanks in advance.
    Mithun.M.I

    You can save the form with name generated from a field's value, but therefore you will have to install a folder level script first and design a custom save button in your form.
    You cannot do this with the applications save or save as... buttons, and you also cannot rename a file on submit.
    Here's an example form and a folder level script. (Maybe to complicated fdr newbies)
    http://thelivecycle.blogspot.com/search/label/Save

  • Use of FM BAPI_EQUI_CHANGE to update equipement with customer fields

    Hello all
    I have extended the EQUI table with customer fields using customer include structure and append structure.
    I want to populate these customer fields with BAPI BAPI_EQUI_CHANGE Or BAPI_EQUI_CREATE.
    So I have extended the structure ITOB appending the same customer fields as in table EQUI.
    I have enhanced the function MAPXI_BAPI_ITOB_TO_ITOB which map data from structure BAPI_ITOB to internal structure ITOB.
    But the fields are not populated ?
    Has someone already the BAPI in that way ?
    Thanks
    Jerome

    Hello all
    I have extended the EQUI table with customer fields using customer include structure and append structure.
    I want to populate these customer fields with BAPI BAPI_EQUI_CHANGE Or BAPI_EQUI_CREATE.
    So I have extended the structure ITOB appending the same customer fields as in table EQUI.
    I have enhanced the function MAPXI_BAPI_ITOB_TO_ITOB which map data from structure BAPI_ITOB to internal structure ITOB.
    But the fields are not populated ?
    Has someone already the BAPI in that way ?
    Thanks
    Jerome

  • How to find the Standard Program associated with a Standard IDOC

    Hi,
          I am going work on enhancing the standard IDOC. Any body can suggest how to find a standard pogram associated with a Standard IDOC. And can any body send some exaple code for extending a standard IDOC and to implement the logic in the standard program .....

    Hi,
    For outbound IDoc the program can be found:
    1) For master IDoc via transaction BD60. Here for the message type you can find the function module used to generate the IDoc. Within this function module you can find the user exit where you can code your logic.
    2) For IDocs with message control (output control) we maintain settings for proces code in WE41. This process code will lead to outbound IDoc generation program.
    For Inbound IDoc the program can be found:
    Via WE42 where inbound process and its related inbound function module is maintained.
    In each cases above we can go the function module and find the customer exit where idoc enhancement logic can be coded.
    For extending IDoc look at the following links:
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/dc/6b7d6243d711d1893e0000e8323c4f/content.htm">Extending IDoc - SAP help</a>
    It can be summarized as follows:
    Enter transaction WE30 (ALE->Extension-> IDOC types->Maintain Idoc type)
    - Type in your name of the extended IDOC type (usually starting with 'Z') and click on the Basic IDoc type, click the create icon.
    - Click on Create new and enter a description and press enter.
    - Click on ZIDOCTYPE01 and then on the Create icon.
    - Enter ZIDOCTYPE as the segment type, click on Segment Editor.
    - Enter a description for your segment type and create.
    - Enter a description for your segment, enter each field required in your IDoc and press enter to validate.
    - Save and generate, press back
    - To release the segment choose Goto, Release from the menu.
    - Check the box on the line of your segment.
    - Save, back and enter.
    - Your Idoc type structure should be displayed with your new segment.
    - Save and back.
    - To release the Idoc type choose Extras, Release type from the menu and Yes.
    Hope this helps.
    Regards,
    Gajendra.

  • Extending the Search Object of a BOL Entity  with custom fields

    Hi All,
    I have to enhance the structure of the BOL search object 'BuilHeaderSearch' with custom fields!.
    i went to the transaction genil_bol_browser and find out the structure of the object as, 'CRMST_HEADER_SEARCH_BUIL'
    how can i insert custom fields into this structure, so that i can display these custom fields at the Front end ( Web IC ).
    Thanks in advance,
    sudeep v d.

    Hi Sudeep!
    First of all it should be mentioned that: it is NOT possible to change list of <b>SEARCH</b> criteria in IC!
    So, in other words, you can search BP ONLY by params listed in native structure 'CRMST_HEADER_SEARCH_BUIL'.
    BUT: You can <b>FILTER</b> search results!
    For example: you get the list of BP with MC_NAME1 (lastname) search criteria (only by SAP class!)and THEN you can filter (delete from list) by YOUR criteria (in your class!).
    Is it clear?
    So how to add your own criteria?
    1. Transaction GENIL_MODEL_BROWSER - Model Browser forGen.IL Applications
    2. Component Set - ALL
    3. Search Objects -> BuilHeaderSearch -> Attribute Structure ->CRMST_HEADER_SEARCH_BUIL (Dbl Click)
    4. Append Structure (or F5)
    5. Name the new sub-structure and provide all new fields
    So now you can use this new fields in IC Z-classes.
    I had the same task and nobody in SDN could help - so I had bought new SAP_book: <a href="http://www.sappress.com/product.cfm?account=&product=H1909">mySAP CRM Interaction Center</a> because in Contents there were:
    <b>"Extending the Business Partner Search in IC WebClient by New Search Fields"</b>.
    So in fact it is not truth: it is not possible to <i>extend search</i>. You can only filter results!
    <b>BUT</b>!
    It is not the end of my post! I hope that SAP people will see this post. I found a BUG in SAP classes and methods: it is not possible to navigate to first position in collection wraper!
    exactly:
    lr_current ?= entity_col->if_bol_bo_col~get_first( ).
    doesn't work.
    So position of cursor puts on second record in structure!
    In other words it is not possible to filter the first record in search result! And so new search is not efficient
    I think that is is bug and wait for comments of SAP.
    <b>Reward points if it helps.</b>
    Regards,
    Alexander

  • Enhancing the component ERP_H with a custom field in the web UI

    Hi,
    I'm facing an error when enhancing the component ERP_H with a custom field in the web UI.
    I've followed the steps mentioned in the pdf document called "Enhancement Options for the Lean Order Interface" (Note
    1224179):
    I´ve done a enhacement on ERP_H component.
    I added a field to the view Headerdetail called "ZZCCTYPE1", but when I set a value in UI, I haven´t read this field in abap code.
    The SET method (SET_ZZCCTYPR1) in the context node is ok, in debug I see that the method current->set_property, is working fine.
    I've tried to read the atribute with lr_entity->get_property_as_string ( 'ZZCCTYPR1' ), but doesn´t work. When I read other "standard field", the statement is ok and it has value.
    When I set the value of the field from ECC (VA01/VA02), it is kept by the system.
    Could anybody help me?
    Thanks in advance,
    Regards,
    Andrea Ricci

    Hi Pooja,
    When you created your custom views, did you bind the view context nodes to the corresponding context nodes of your component controller?
    From the exceptions you reported it seems that this binding is missing.
    To create this binding, you can right click on your view context node , choose "Create Binding" and bind it to the context nodes of your Component Controller.
    Hope this helps.
    Regards,
    Nisha

Maybe you are looking for

  • Javascript to put text of selected tab in a header element at top of page

    Create a simple html document a header and main div's.   tab menu, say three tabs, in the main div.  Want the header to display the text of the selected tab. Here is the example with default SpryTabbedPanels.js and SpryTabbedPanels.css. <!DOCTYPE htm

  • Why doesn't markup in Mail app work on screen captures or pasted images?

    When in Mail app, If i right click and choose Capture selection from Screen I can take a screenshot which is inserted into the email.   The markup icon in the top right of the image never appears.  This is also true for images I copy and paste into t

  • Search not working in WebHelp

    I have a project containing hundreds of table definitions, for each I have created a separate topic. For example one such table is FR_STAN_RAW_BOOK and I have created a topic of the same name. The topic is in the TOC and indexed but when I try and se

  • Submit button won't email

    Currently my os is windows 7.  I have created a form using acrobat 9 pro and when I test the submit button instead of opening up the email it asks me to save the form.  Before my os was switched I wasn't having this problem.  Can anyone tell what the

  • Crystal Report extending the number of columns

    Am creating a report with a lot of columns. I have gone to page setup and made it landscape but I still have a lot of columns missing