How to limit results in search help CV01 (incl. COM_SE_F4_HELP_EXIT)

Hi experts,
in transaction CV03N I want to limit the result list (table RECORD_TAB) of the search help CV01 using authority check. The user should not even see the document shorttext (from table DRAT) of some TOP SECRET documents in the F4-help result ... Actual solution: no user has rights for CV03N ... :-P
I found out, that the search help for the dynpro field DRAW-DOKNR is CV01,
including following search helps:
CV01T
CV01O
CV01C
CV01B
CV_TREX
Also there is a search help exit (function modul) COM_SE_F4_HELP_EXIT for CV01.
I tried to enhance the search help exit using the prepared BADI COM_SE_F4_RESULT_ITEMS, but after i did a short test with the relevant method, i found that there is something not working as i expected ...
Problem:
in the function modul COM_SE_F4_HELP_EXIT there is a step prepared called STEP SELECT.
* STEP SELECT    (Select values)
* This step may be used to overtake the data selection completely.
* To skip the standard seletion, you should return 'DISP' as following
* step in CALLCONTROL-STEP.
* Normally RECORD_TAB should be filled after this step.
* Standard function module F4UT_RESULTS_MAP may be very helpfull in this
* step.
  IF CALLCONTROL-STEP =  'SELECT'.                 "here i put Session BREAK-POINT
    PERFORM STEP_SELECT
              TABLES   SHLP_TAB
                       RECORD_TAB
              CHANGING SHLP
                       CALLCONTROL.
*                                      Don't process additional STEP. ..
    RETURN.
  ENDIF.
But after i put a BREAK-POINT and than start CV03N, searching a document via F4 + press ENTER, no debugging (!).
I have to mention that the search help proceeded was CV01T.
Question:
can anyone explain why STEP SELECT is not proceeded in FM COM_SE_F4_HELP_EXIT using F4-help in transaction CV03N?
I appreciate any hint in my "search help combat"
regards
Jörg
Edited by: Thomas Zloch on Apr 26, 2011 10:11 PM - please do not promise "re-ward"

INCLUDE with FORM
***INCLUDE LZCV_SHLPF01 .
* nach dem Muster der Suchhilfe SAPBC_GLOBAL_F4_SFLIGHT
* ausführlich Doku siehe dort und in den einz. incl. FB Dokus
*&      Form  AUTHORITY_CHECK
*       text
*      -->P_RECORD_TAB  text
*      -->P_SHLP_TAB  text
*      <--P_SHLP  text
*      <--P_CALLCONTROL  text
FORM authority_check
       TABLES   shlp_tab    TYPE      shlp_desct            "#EC NEEDED
                record_tab  STRUCTURE seahlpres
       CHANGING shlp        TYPE      shlp_descr
                callcontrol TYPE      ddshf4ctrl.
* Ablauf:
* 1. GET Inhalte der Suchilfe Parameter (siehe SE11, CV01T)
* 2. Feldinhalte in interner Tabelle anpassen (--> no Authority)
* 3. PUT neue Inhalte der Suchhilfe Parameter an Ergebisliste übergeben
* Teil 1
* ¯¯¯¯¯¯
  CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'   "Inhalte Parameter DOKAR holen
    EXPORTING
      parameter               = 'DOKAR'                     "CV01T
      fieldname               = 'DOKAR'  "it_drat
    TABLES
      shlp_tab                = shlp_tab
      record_tab              = record_tab
      results_tab             = it_drat
    CHANGING
      shlp                    = shlp
      callcontrol             = callcontrol.
  CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'   "Inhalte Parameter DKTXT holen
    EXPORTING
      parameter               = 'DKTXT'                     "CV01T
      fieldname               = 'DKTXT'  "it_drat
    TABLES
      shlp_tab                = shlp_tab
      record_tab              = record_tab
      results_tab             = it_drat
    CHANGING
      shlp                    = shlp
      callcontrol             = callcontrol.
* Teil 2
* ¯¯¯¯¯¯
  LOOP AT it_drat.
    AUTHORITY-CHECK                             " here prepare the change of Paramaters
             OBJECT 'C_DRAW_DOK'
                 ID 'DOKAR'
              FIELD it_drat-dokar.
    IF sy-subrc NE 0.
      it_drat-dktxt = text-001.
*     [!]Text ausgeblendet...Auth.Check(DOKAR)
      MODIFY it_drat.
    ENDIF.
  ENDLOOP.
* Teil 3
* ¯¯¯¯¯¯
  CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
    EXPORTING
      parameter               = 'DKTXT'                     "CV01T
      fieldname               = 'DKTXT'  "it_drat
    TABLES
      shlp_tab                = shlp_tab
      record_tab              = record_tab
      source_tab              = it_drat
    CHANGING
      shlp                    = shlp
      callcontrol             = callcontrol
*     EXCEPTIONS
*       PARAMETER_UNKNOWN       = 1
*       OTHERS                  = 2
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
ENDFORM.                    " AUTHORITY_CHECK

Similar Messages

  • 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

  • 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 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

  • 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

  • HELP_START: how can i do a search help F4 same as field Group PLNNR in CA02

    Hi all,
       I'm developing a report in which i use two field Group (PLNNR) and Group counter (PLNAL) as same as in CA02: choose a group by F4 and after these two fields are filled with the chosen values in help screen.
       My problem: i would like to do a search help for field Group (PLNNR) as same as in CA02. I have used the Function HELP_START for this purpose, but i can not reach my purpose: i choose a group in dialog help and after the field Group have the chosen value, but the field Group counter (PLNAL) don't have any value.
       I don't know which input values for structure HELP_INFOS will be get a result as same as in CA02?
       Anyone know how i should do to solve my problem, please help me?
      Which input is incorrect (code below), please help me!
    Thanks a lot in advance,
    My Actual input for structure HELP_INFOS as below:
    ls_help-call      = 'V'.
      ls_help-tabname   = 'RC271'.
      ls_help-fieldname = 'PLNNR'.
      ls_help-spras     = sy-langu.
      ls_help-docuid    = 'FE'.
      ls_help-object    = 'F'.
      ls_help-dynpprog  = sy-repid.
      ls_help-report    = sy-repid.
      ls_help-dynpro    = sy-dynnr.
      ls_help-pfkey     = 'NXD'.
      ls_help-dynprofld = 'P_PLNNR'. (My fiel 'Group' in Selection screen)
      ls_help-MENUFUNCT = 'HC'.
      ls_help-fieldlng = '8'.
      ls_help-pov = 'N'.
      ls_help-curow = sy-cucol.
      ls_help-cucol = sy-curow.
      ls_help-selectart = 'A'.
    CALL FUNCTION 'HELP_START'
           EXPORTING
                help_infos   = ls_help
           IMPORTING
                select_value = lv_select_value
           TABLES
                dynpselect   = wt_dselc
                dynpvaluetab = wt_dval.
    Thanks,
    Vinh Vo

    Why do it in more complicated way, while the simplest method is available. You can use :
    PARAMETERS: p_plnnr LIKE rc271-plnnr.
    PARAMETERS: p_plnal LIKE rc271-plnal.
    Give it a try.
    Thanks & regards,
    Hadiman

  • How to disable buttons in Search help screen ?

    Hi All,
    How do we disable Print button in customer search help ?
    We want that nobody should be able to take a printout of Customers from Search help result. Hence we want to disable the print button which comes in Search help.
    Any idea how do we go about it ?
    Regards,
    Ashish

    Hi there,
    you should be able to do that with the search help exit. Try replacing the PF-STATUS for instance. I am not sure if this works though!
    For instance:
    IF call_control-step = 'PRESEL'.
    SET PF_STATUS 'ZZ' OF PROGRAM 'ZZZ'
    ENDIF.
    Or you might call the existing PF-STATUS and use EXCLUDING.
    Roy

  • How to delete entries from search help for a field

    hi guys
    how r u all doing.
    i have some questions for u.
    1. How can i delete some entries(from a list of many) from search help of a field with out (writing)going to a program.
    2.in PA10 (Personnel File),when i try to display data for a pernr,i am getting an error saying that infotype 122 doesnot exist.
    3.Again in Pa20,when i try to display data for a custom infotype,it leads me to short dump saying that load program does not exist.
    any help in this regard,wud be appreciated.
    thanks

    Follow this
    What to do before selling or giving away your iPhone, iPad, or iPod touch - Apple Support

  • Populate and display internal table results using search help exit...

    I have copied F4IF_SHLP_EXIT_EXAMPLE and made changes. I want this search help exit to populate and display contents related to 'FIELD1' when the user enters a specific value for it in the search help screen, meaning when the user restricts the search by that value.  For field2, field3, field4, field5, field6, field7, and field8 I am using a custom view.
    Following is the code:
    TYPES:  BEGIN OF t_search,
                   field2 TYPE field2,
                   field3 TYPE field3,
                   field4 TYPE field4,
                   field5 TYPE field5,
                   field6 TYPE field6,
                   field7 TYPE field7,
                   field8 TYPE field8,
                   field1 TYPE field1,
                END OF t_search.
      DATA: it_itab TYPE TABLE OF t_search,
            wa TYPE t_search,
         wa_selopt TYPE ddshselopt,
            wa_fielddescr TYPE dfies.
    ranges: r_field1 for std_table1-field1
    STEP SELECT    (Select values)
        FREE: r_field1.
    **Get the value entered for FIELD1 in search help
        LOOP AT shlp-selopt INTO wa_selopt.
          CASE wa_selopt-shlpfield.
            WHEN 'FIELD1'.
              r_field1-sign = wa_selopt-sign.
              r_field1-option = wa_selopt-option.
              r_field1-low = wa_selopt-low.
              r_field1-high = wa_selopt-high.
              APPEND r_field1.
              CLEAR: r_field1.
          ENDCASE.
        ENDLOOP.
    **Select 'ID' and 'FIELD1' from table into lt_itab
        SELECT id field1
              INTO TABLE lt_itab
                FROM std_table1
                  WHERE field1 IN r_field1.
        IF sy-subrc = 0.
    **Now, based on the particular IDs from lt_itab, I need to select other values
    from other tables which also have 'ID' as the key.
           SELECT std_table2~field2
                std_table2~field3
                std_table3~field4
                std_table3~field5
                std_table3~field6
                std_table4~field7
                std_table4~field8
                std_table1~field1
              INTO CORRESPONDING FIELDS OF TABLE it_itab
              FROM std_table2
                         INNER JOIN std_table3 ON
                                std_table3mandt = std_table2mandt AND
                                std_table3id = std_table2id
                         INNER JOIN std_table4 ON
                                std_table4mandt = std_table2mandt AND
                                std_table4id = std_table2id
                         INNER JOIN std_table1 ON
                                std_table1mandt = std_table2mandt AND                                           std_table1id = std_table2id
              WHERE
                    std_table1~field1 IN r_field1.
    'id' is common in all the std_tables --> std_table1, std_table2, std_table3, std_table4.
    STEP DISP     (Display values)
    **Then I need to gather all the results in my internal table it_itab and display
    in search help results for the value of FIELD1 entered by the user in the search help.
        CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
          EXPORTING
            parameter   = 'FIELD1'
            fieldname   = 'FIELD1'                          
          TABLES
            shlp_tab    = shlp_tab                                   
            record_tab  = record_tab
            source_tab  = it_itab
          CHANGING
            shlp        = shlp
            callcontrol = callcontrol.
    I am not getting all the data in my internal table and wanted to know if there is anyting wrong in my select statement.
    Any guidance will be appreciated and awarded appropriate points.
    Thanks.

    the webdynpro fieldname and the search help input parameter name were made same.

  • 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 see additional individual search helps in sh for PERNR

    Hi,
    In this moment I see only 3 tabs in search help for PERNR. But there are about
    20 search helps. How  can I activate them ?
    I tried to do it by program DBPNPGMC but it didn't help.
    Thank you very much
    Irena

    Hi irena,
    1. Attach the search help PREM
      for pernr.
    2. It has got many different kinds of 20-30 helps inside it.
    regards,
    amit m.

  • 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 add user defined search help to data element -EXTWG ?

    Dear All,
    EXTWG is external material groupp field in Material Master. I am using this field to provide some external material group .But there is no search help attached to it. I want to create a search help and attach to it .I can create a search help but how to attach to a standard date element .How can i do??

    hi
    good
    go through this links ,i hope these ll help you solve your problem
    http://help.sap.com/saphelp_nw2004s/helpdata/en/90/8d7307b1af11d194f600a0c929b3c3/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ee86446011d189700000e8322d00/content.htm
    thanks
    mrutyun^

  • How-to map multiple explicit search help values to context attributes?

    Hi,
    I have a custom explicit Search Help with multiple attributes set as export and uses search help exit for data retrieval. I have set this Search Help for one of the context attribute that is binded to one of the input fields on view.
    Now, is it possible to dynamically map other export attributes from this Search Help to other Context attributes?
    I know this works for Input helps that are directly derived from check tables but not sure how to do it for explicit Search Helps.
    Can anyone please confirm and let me if this is possible? If yes, then can you please share an example or describe how to do it?
    Thanks and Regards,

    Hi Srinivas,
    Check this ..Search help can be dynamically assigned to a field.
    data lo_nd_info type if_wd_context_node_info.
    lo_nd_info = lo_nd->get_node_info( ).
    CALL METHOD lo_nd_info->set_attribute_value_help
    EXPORTING
    name = 'ATTR1'                  " Your attribute Name
    value_help_mode = '121'    " Valid value help mode
    value_help = 'Z187442'.      " Search help name
    The various possible values that you can pass to value_help_mode are as shown below.
    deactivated 101
    automatic 111
    ddic 121
    ovs 131
    Also refer this..
    Re: How to put dynamic search help in web dynpro ABAP.
    Cheers,
    Kris.

Maybe you are looking for

  • Country of Orgin field.

    Hi Guru, User need country of orgin field of material should be add in the report which is running in GTS. I found that field in MARA table but report is running in GTS server so how can it be retirve from R/3 data. I got country of orging field in G

  • How do I convert a PDF File to a JPEG File?

    I have a photo that I scanned. The printer/Computer scans it using Adobe Reader 9. I need to convert the photo to a JPEG file. I have NO idea how to do this.  Can someone please give me an easy to do this?

  • Can I move all my drives from my 1,1 to a 4,1

    Hi, I would like to benefit from a newer, faster mac pro, and I'm considering buying a 4,1 8 core 2.66GHz. I currently use a 1,1 Quad core 2.66 with Digital Performer and a lot of Virtual Instruments and experience crashes and slowdowns galore. To av

  • F4 Input Help in Variable Screen takes about 30 Minutes to display.

    Hello Experts, We have a web-report in which the time taken to display all the entries in F4 Input Help of the variable screen takes about 30 minutes. Have anyone experienced so long a wait time while accessing F4 Input Help in the variable screen an

  • Change the transport  request number

    HI All, One of my program in porduction we done few modifications to that program one month back that is still in QAS,again we done few more modifications to the same program so now I have 2 request numbers due to few problem here my client don't wan