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

Similar Messages

  • How to enhance standard collective Search Help VMVM

    Hey Expert,
    Any pointer to enhance the standard search help VMVM with custom search option will be highly appriciated.
    Thanks in advance,
    Sayak

    Hey Expert,
    Any pointer to enhance the standard search help VMVM with custom search option will be highly appriciated.
    Thanks in advance,
    Sayak

  • 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

  • How to use the created search helps in the program?

    Hi Everyone,
    I know how to create Search help elementary / collective search help through SE 11. I have a question, how can I make use of the created search help in the program.
    How to use the Search help in the programs, which is created through SE11
    Subbu.

    Hi,
    In case if you want to use in parameters statement, then we can use the suffix MATCHCODE OBJECT syntax.
    Eg.
    report abc.
    parameters : a(10) type c matchcode object ZBELNR.
    Hope this helps.
    regards,
    amit m.

  • 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

  • Marketing calendar: How to enhance the marketing calendar search

    Hi experts
      I working with Marketing calendar enhancement, the requirement is to add the custom fields to marketing search view, but this view is not supporting the AET or EEWB , kindly help what is the alternative approach to enhance the marketing search view.
    Thanks & Regards
    Rajasekhar

    Hi Rajasekhar,
    It is not possible to enhance the marketing projects search used in marketing calendar directly. However, whenever you add custom fields to object like campaign, these objects become available in the marketing calendar search. So, first add the new field in the corresponding object. Then you can try AET to add this field from available fields list on the marketing calendar page.
    Regards,
    Shiromani

  • 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 make custom append search help tab default for all users?

    I've implemented my own search help append and I need to make the F4 search help to display my tab as default for all users. I know that search help stores the last tab used by the user in memory and when user uses the search help next time the last used tab is displayed but I have to make the system display the tab od my search help append always as default tab. Any idea how to do it?
    Message was edited by:
            Marcin Milczynski

    hi
    <b>Enhancement using Append structures</b>
        Append structures allow you to attach fields to a table without actually having to modify the table itself. You can use the fields in append structures in ABAP programs just as you would any other field in the table.
    Click on the append structure tab and opt to create new
    structure.
    Append structures allow you to enhance tables by adding fields to them that are not part of the standard. With append structures; customers can add their own fields to any table or structure they want.
    Append structures are created for use with a specific table. However, a table can have multiple append structures assigned to it
        Customers can add their own fields to any table or structure they want.
    The customer creates append structures in the customer namespace. The append structure is thus protected against overwriting during an upgrade. The fields in the append structure should also reside in the customer namespace, that is the field names should begin with ZZ or YY. This prevents name conflicts with fields inserted in the table by SAP

  • How to change the default search engine? I accidentaly change it from google to yahoo, and I can't get it back. I changed my homepage too, but it isn't solved. Thanks

    dear, there.
    how to change the default search engine? I accidentaly change it from google to yahoo, and I can't get it back. I changed my homepage to google too, but it isn't solved. Thanks

    Clarification:
    I believe now you potentially lose all extensions, plug-ins when you use the new reset function, but you will let me know.
    If that is the case, your find corrupt file method maybe better. However, I reviewed the two help articles and there appear to be more files than just the delete search.json file and a possible search.sqlite file in the Firefox Profile Folder. I am confused. Then I have to find the folders. I think help articles mentioned how to find the profile containing the files, but not sure.

  • Web dynpro for abap how to create a customize search help in alv column

       hi:
          Web dynpro for abap how to create a customize search help in alv column and put search help value into alv column?
          Are there specific examples ?
          thanks!!

    HI:
       I want to created a freely programed help which include date&time,and put help value to alv column.
      I have created a freely programed help in web dynpro for abpa application,I refer:
      **************** - WebDynpro for ABAP
      but have a problem!
       If you focus on the the input field in the first row, you get the value help
    However if  I go to the second row and focus on the same input field in this column, I don't get the value help:
    What is a good way to solve similar problems?
    thanks

  • How to get results of search help window?

    Hi, experts,
    I have a question here.
    For a field vendor id there is pre-defined search help, with which the detailed information of vendor inclusive the vendor id will be returned. But it will only fill this vendor id field. other information in the result like vendor name will be lost. I still need this information for other fields. And I hope to get other fields filled with the info in the results.
    How can I get the complete info in the result delivered by search help window?
    Can anybody help?
    Best regards,
    Fan

    In short you need to fill the other fields on the screen using the same search help.
    for that read this thread, Thomas nicely explained the same with an example
    Re: Help On Search Help !!!!!
    Abhi

  • How to find an existing search help?

    Hi Friends,
    How to find an existing search help for some certain fields? for example search help "H_TVKO" is for "Help view for Sales Organizations"[for the field VKORG], and search help "MAT1" is for "Find Material Number"[for the field MATNR]...... but how to find these search helps for a certain field?
    Thanks a lot!!

    Hello Qiwei,
    You can find the search help using their table and fields name.
    simply you have to point the cursor on same field for which you want to see search help in SE11.and then in same window search help tab available click on this..
    It will show all search help which is having same field.
    Have a Nice Day.
    Regards,
    Sujeet
    Edited by: Sujeet on Jan 14, 2009 10:41 AM

  • How to remove additional of search help?

    In complex standard of search help S_MAT1 has added the additional of search search help ZTEST_SEARCH, now I wish to remove the additional  of search help ZTEST_SEARCH, but at removal attempt the error stands out: "Because of use in objects of the dictionary it is impossible to spend removal".
    We look magazine of use for additional of search help ZTEST_SEARCH - shows use only in standard of search help S_MAT1. And how to be, how to remove additional  of search help?

    hi,
    try to do the where used list of ZTEST_SEARCH for all the objects, programs, function moduels, exits, screens etc etc....any of the object may be using your search help.......
    hope this helps,
    thanks,
    tanmaya

  • How to Automate the Query Search Upon Return to the Calling Form?

    Greetings Ya’ll Gurus,
    Could you please share with me how to make the Query Search executed automatically each time, when database table is updated, upon return to the “Calling Form” (i.e. FormA in this posting) from the “Called Form” (i.e. FormB from here on)?
    I have FormA call_form to FormB. FormB may return to FormA. FormA allows users to enter the Query parameters and perform query Search to the database table with a list of search results afterward; whereas FormB allows users to add or delete the same database table records. Both form images are as follows:
    FormA:
    !http://dot.state.ak.us/nreg/jtomasic/FormA_DWR_SEL.GIF!
    FormA call_form to FormB by clicking PB “Daily Work Report” (see circled PB "Daily Work Report" in the above image.)
    FormB Image (FormB allows users to add and delete database records):
    !http://dot.state.ak.us/nreg/jtomasic/FormB_DWR.GIF!
    FormB EXIT_FORM and returns to FormA (see circled PB "DWR Selection" in above image).
    Currently, our users must press the PB “Search” on FormA each time to refresh the Query “Search” results after returning to FormA, and they request to have the "Search" done automatically/programmatically upon return to FormA each time when the database table is updated.
    If you have programming code on this and are willing to share or if you have any suggestion or thoughts on this, it would be most greatly appreciated.
    Thanks a lot & Happy Holidays!

    Thanks so much Andreas, and yes, your link for calling a form and passing a context is very helpful. I believe, your suggested use of the global variable for the saved database table will work for the automation of the Query Search. I am, however, not sure how to make the code and the trigger to automatically perform Query PB "Search". The code for our current "WHEN-BUTTON-PRESSED" Trigger for the PB-Search of FormA is as following:
    DECLARE
         alert_button     NUMBER;
         alert_id               ALERT;
      MY_WHERE VARCHAR2(2500);
      MY_DIST_ID         DIST.DIST_ID%TYPE     := :BLK_UPDATE.DIST_ID;
      MY_ORG_ID          DWR.ORG_ID%TYPE       := :BLK_UPDATE.ORG_ID;
      MY_ACTY_ID         DWR.ACTY_ID%TYPE      := :BLK_UPDATE.ACTY_ID;
      MY_ACTY_WORK_ID    DWR.ACTY_WORK_ID%TYPE := :BLK_UPDATE.ACTY_WORK_ID;
      MY_CNTY_ID         DWR.CNTY_ID%TYPE      := :BLK_UPDATE.CNTY_ID;
      MY_ASSET_GRP_ID    DWR.ASSET_GRP_ID%TYPE := :BLK_UPDATE.ASSET_GRP_ID;
      MY_ASSET_ID        DWR.ASSET_ID%TYPE     := :BLK_UPDATE.ASSET_ID;
      MY_RTE             DWR.RTE%TYPE          := :BLK_UPDATE.RTE;
      MY_BEG_MP          DWR.BEG_MP%TYPE       := :BLK_UPDATE.BEG_MP;
      MY_END_MP          DWR.END_MP%TYPE       := :BLK_UPDATE.END_MP;
      MY_FROM_DATE       DWR.DWR_DATE%TYPE     := :BLK_CONTROL.FROM_DATE;
      MY_TO_DATE         DWR.DWR_DATE%TYPE     := :BLK_CONTROL.TO_DATE;
      MY_FLAG_OFFSYS     VARCHAR2(11)          := :BLK_UPDATE.FLAG_OFFSYS;
      MY_FLAG_COMMENTS   VARCHAR2(11)          := :BLK_UPDATE.FLAG_COMMENTS;
      MY_SPECIAL_EVENT_SEQ_NO SPECIAL_EVENT.SPECIAL_EVENT_SEQ_NO%TYPE  := :BLK_UPDATE.SPECIAL_EVENT_DESCR;
      MY_FLAG_ACCDT      VARCHAR2(11)          := :BLK_UPDATE.FLAG_ACCDT;
    BEGIN
    :blk_control.dummy_flag := 1 ;
    :BLK_CONTROL.DUMMY_ERR_FLAG := 'N';
    VALIDATION_SELECTION;     -- Program Unit VALIDATES DWR SELECTION PARAMETERS PRIOR TO
                                                    -- PERFORMING THE SEARCH AND POPULATING THE DISPLAY BLOCK
    if :blk_control.dummy_flag = 1 then
      IF :BLK_CONTROL.DUMMY_ERR_FLAG = 'N' THEN
        MY_WHERE := BUILD_WHERE_CLAUSE(MY_DIST_ID,
                                       MY_ORG_ID,
                                       MY_ACTY_ID,
                                       MY_ACTY_WORK_ID,
                                       MY_CNTY_ID,
                                       MY_ASSET_GRP_ID,
                                       MY_ASSET_ID,
                                       MY_RTE,
                                       MY_BEG_MP,
                                       MY_END_MP,
                                       MY_FROM_DATE,
                                       MY_TO_DATE,
                                       MY_FLAG_OFFSYS,
                                       MY_SPECIAL_EVENT_SEQ_NO,
                                       MY_FLAG_ACCDT,
                                       MY_FLAG_COMMENTS);
        SET_BLOCK_PROPERTY('BLK_DISPLAY', DEFAULT_WHERE, MY_WHERE);
        GO_BLOCK('BLK_DISPLAY');
        CLEAR_BLOCK(NO_VALIDATE);
        EXECUTE_QUERY(ALL_RECORDS);
        IF :BLK_DISPLAY.DWR_SEQ_NO IS NOT NULL THEN
                   SET_ITEM_ON_OR_OFF('BLK_CONTROL.PB_PRINT', TRUE);
        ELSE
                   SET_ITEM_ON_OR_OFF('BLK_CONTROL.PB_PRINT', FALSE);
                   alert_id := FIND_ALERT('no_data_query');
                   IF ID_NULL(alert_id) THEN
                        error_msg(1000);
                   ELSE
                        set_alert_message(alert_id, 1040);
                        alert_button := SHOW_ALERT(alert_id);
                   END IF;
              END IF;
              GO_BLOCK('BLK_UPDATE');
              GO_ITEM('BLK_CONTROL.PB_SEARCH');
         END IF;
    end if;
    END;My questions are:
    After initializing, set and/or reset the global variable for the saved database table,
    do I copy the above code (i.e. the "entire" code in the "WHEN-BUTTON-PRESSED" Trigger for the PB-Search) to the WHEN-NEW-FORM-INSTANCE-trigger, or other trigger(s), of FormA to automate the Query Search whenever there is a successful database commit/save? Or
    is there a simple way to activate the code in the "WHEN-BUTTON-PRESSED" Trigger for the PB-Search of FormA? Or
    is there a simple way to activate the EXECUTE_QUERY(ALL_RECORDS) command in the WHEN-NEW-FORM-INSTANCE-trigger or other trigger(s) of FormA ?
    Thanks and always.

  • How to enhance the cube to include 0CS_TRN_QTY

    Hi Gurus
    In 2004S what are the steps to enhance the field, please help me.
    How to enhance the cube to include 0CS_TRN_QTY, this field is coming from GL Totals table? this is  new table included to 2004S.
    please help me
    Thanks
    lalit

    Hi Lalit,
    1) Go to Rsa6 and select the DS that belongs to your particular cube , and double click on it and note down the ES name .It is
    2) Go to Se11 and keep the ES name at DATATYPE and clcik on Display. and then Click on Append structure Button.
    3) Give the techinica name to AS in the immedaite screen and then give description in other screen and enter the zzfields that you want to add. Finally activate the Append Structure.
    4) aggin goto RSA6 and enter into change mode for the DS , and then remove tick mark for newly added fields aginst Hide only .
    5) Replicate the DS into BIW.
    6) give th ccoding for these newly added fields in CMOD.
    7) in CMOD , you need to use already existing project. If there is no project existing,then create new one . While creating take RSAP0001 as Enhance ment assignement.
    8) you have to code the ABAP lines in EXIT_SAPLRSAP_001 component and in the include ZXRSAU01.
    9) Donot forget the activation of Project and include after every modifications.
    Regards,
    Lakshman.G

Maybe you are looking for