Hi Guru Search Help with Restriction

Hi guru,
What is my requirment . I created elementry  search in se11 and i used this search in dialog program. Its shows all company code and commidity code.
But boss I want restrict this search help only for one Company Code (GB).It should show company code and commidity code only GB comapny Code.
Where I can restrict this search help.
Please give me possible help.
Point will rewards.
Thanks&Regards
Ramana

Hi Mr. Kumar,
                I'll give one examle for which I had done the same scenerio for PP module for version selection...Please find the eg. code. In this scenerio I had restricted only 4 versions....
I'll give you code from select option till at selection-screen on value request...
In this I have also done the validation part...
First create a elementary search help with required fields... As per my scenario I had created two fields VERSB & VBTXT. In my scenario I have given restriction on VERSB....
then the same search help you have to use in the program to pass to the parameters..
****Select Options....
SELECT-OPTIONS: S_VERNUM FOR T459V-VERSB OBLIGATORY NO-EXTENSION NO INTERVALS.
*****At Selection-Screen on value request....
AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_VERNUM-LOW.
  PERFORM F4HELP.
******Form F4HELP....
FORM F4HELP .
  REFRESH IT_DDSHSELOPS.
  CLEAR   WA_DDSHSELOPT.
  WA_DDSHSELOPT-SHLPNAME = 'ZVERSB'.
  WA_DDSHSELOPT-SHLPFIELD = 'VERSB'.
  WA_DDSHSELOPT-SIGN = 'I'.
  WA_DDSHSELOPT-OPTION = 'EQ'.
  WA_DDSHSELOPT-LOW = '04'.
  APPEND WA_DDSHSELOPT TO IT_DDSHSELOPS.
  WA_DDSHSELOPT-LOW = 'TC'.
  APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
  WA_DDSHSELOPT-LOW = 'TE'.
  APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
  WA_DDSHSELOPT-LOW = 'TL'.
  APPEND  WA_DDSHSELOPT TO IT_DDSHSELOPS.
  CALL FUNCTION 'F4_FIELD_ON_VALUE_REQUEST'
    EXPORTING
      TABNAME          = 'T459V'
      FIELDNAME        = 'VERSB'
      SEARCHHELP       = 'ZVERSB'
      DYNPPROG         = SY-REPID
      DYNPNR           = SY-DYNNR
      DYNPROFIELD      = 'VERSB'
      SELECTION_SCREEN = 'X'
      CALLBACK_SELOPT  = IT_DDSHSELOPS.
  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.
*******At selection Screen on above select option field...for validation
AT SELECTION-SCREEN ON S_VERNUM.
  PERFORM VALIDATEVERSIONS.
*******Form VALIDATEVERSIONS
FORM VALIDATEVERSIONS .
  REFRESH R_VERNUM.
  CLEAR R_VERNUM.
  R_VERNUM-SIGN = 'I'.
  R_VERNUM-OPTION = 'EQ'.
  R_VERNUM-LOW = '04'.
  APPEND R_VERNUM.
  R_VERNUM-LOW = 'TC'.
  APPEND R_VERNUM.
  R_VERNUM-LOW = 'TE'.
  APPEND R_VERNUM.
  R_VERNUM-LOW = 'TL'.
  APPEND R_VERNUM.
  IF NOT S_VERNUM-LOW IN R_VERNUM.
    CALL FUNCTION 'C14Z_MESSAGES_SHOW_AS_POPUP'
      EXPORTING
        I_MSGID = 'ZPP'
        I_MSGTY = 'E'
        I_MSGNO = '015'
        I_MSGV1 = 'Please Select'
        I_MSGV2 = 'One of these'
        I_MSGV3 = 'Versions'
        I_MSGV4 = ': 04, TC, TE, TL.'.
    CALL SCREEN 1000.
  ENDIF.
ENDFORM.                    " VALIDATEVERSIONS
This code will help you to work on your query...
Please reward a point . I am sure this will help you....
Cheers.....
Sagun Desai....

Similar Messages

  • Select-Options search help with where

    Hi Experts,
    I need to have a search help in my selection screen with a Where clause.
    I've tried to search it but I cant find answers.
    The logic is like this, wherein the search help for my selection screen should just have the value PM001 and ZMIS.
    SELECT-OPTIONS stsma estat tj30 FOR  s_eqpstt FOR tj30t-estat WHERE stsma = 'PM001' and stsma = ZMIS.
    Thanks

    Sorry, a little more detail... create a view, of search help type, with the columns you present and restrict those two values. Then create the search help with that view. Then add the search help to the select-option.
    Regards,
    Edgar

  • Is it possible to make a search help with dynamic  selection table?

    Hi Experts,
    Is it possible to create search helps with dynamic seletion tables means
    i dont know the selection table names at the time of creation of search help.
    These tables will be determined at runtime.
    if yes, Please give an idea how to create and pass the table names at runtime.
    Thanks
    Yogesh Gupta

    Hi Yogesh,
    Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'field to return from itab'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'field on your screen to be filled'
          stepl           = sy-stepl
          window_title    = 'some text'
          value_org       = 'S'
        TABLES
          value_tab       = itab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    Darley

  • Search help with programming

    Hai,
    Can any one give example for search help with Programming?
    I hope we can create search help with help of coding.
    With Regards,Jaheer.

    yes u can create search help by using match code in programs
    for eq
    go with abap editor se 38
    provide the name of program
    parameters : vendor like lfa1-lifnr matchcode object yzob.
    double click on yzob
    provide description for search help
    provide selection method
    provide search help parameter
    enable check box for import and export
    provide lpos
               spos
    save check activate
    press f4 for check and import values i.e it will display a records list available in database table
    rewards points please

  • Search Help with Web Dynpro call on another system

    Hi all,
    I have to create a search help with web dynpro on a field but the database is on another system... How can I do?
    Many Thanks in advance...

    I would use a search help exit. Nothing WDA specific here, as this has been possible long before WDA came around.  With a search help exit you define the search help like normal, but instead of database table or view being the source of selection, you have a function module.  Within the coding of this function module you can call an RFC to read data from another system or call a web service if you need to bridge over to something that isn't ABAP based.
    You can read more about Search Help Exits here:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

  • Search Help with Web Dynpro

    Hi all,
    I have to create a search help with web dynpro on a field but the database is on another system... How can I do?
    Many Thanks in advance...

    I would use a search help exit. Nothing WDA specific here, as this has been possible long before WDA came around.  With a search help exit you define the search help like normal, but instead of database table or view being the source of selection, you have a function module.  Within the coding of this function module you can call an RFC to read data from another system or call a web service if you need to bridge over to something that isn't ABAP based.
    You can read more about Search Help Exits here:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/cf/21ee52446011d189700000e8322d00/frameset.htm

  • Search help with new selection within if more than 500 entries

    Dear all,
    I created a new search help and this works fine ... If I compare my search help with a default search help from SAP,  I have 1 small feature that not seems to work ... With the default one, it is possible to make a new selection within the search help by clicking on the arrow down :
    If I look at my search help, I don't have the possibility to make a new selection :
    Does anyone how this can be done ?
    Thanks in advance !
    Greetz,
    Kurt.

    HI,
    Here are the general steps to get you started.
    1. Identify the search help being used (on the ship-to-party field, F1 then Tech Info). I believe you want the collective search help SD_DEBI.
    2. Create your own search help with the fields you want to use with SE11, like 'ZDEBI' as an example.
    3. Append 'ZDEBI' to SD_DEBI. (Goto->Append Search Help).
    4. Clean things up by "Hiding" the old search help. In the 'Included Search Help' tab of the collective search help SD_DEBI, there is a check box that you can tick to hide included search helps.

  • Help needed with search help with ina search help

    Hi all,
    i have a field fld1 (non primary key )and to the dataelement of that field a search help is assigned in table ztable1.
    That search help is referring to a table in which fld1 is primary key in ztable2.
    I have created another search help with all the fileds in ztable1 and iam using this search help in a selection screen returning another field say fld2.
    in this search help i have drill down for fld2, which in turn gives the fields of ztable2.
    This is working fine.
    i have created another search help with the fields of ztable1 but this time its its returning the value of fld1. for some reason in this search i am not able to see the drill downn for fld1 .
    can anyone tell me how to get the drill down even the import parameteris fld1
    Thanks

    hi,
    any suggestions on this
    thanks

  • Search help value restriction fields

    Hi experts,
    I have modified the existing search help by  using "SEARCH HELP EXIT".
    Here is the situation:
    As soon as I press F4 button on particular field, it will display search help restrictions window with 4 fields.
    suppose if I enter material number on material number field, it should display only particular material not all materials.
    Normally it was working fine before I written search help exit.
    In search help exit I am selecting values directly from database table with out consider restrictions window parameters.
    How to findout the restrictions window parameter names ( I mean screen field name). So that I can add those fields in my select statement where condfition.
    Pls help me.
    Thanks in advance
    Raghu

    I got the solution. Any how Thanks.

  • Search help entries restriction

    Hi Friends,
    I have created an elementary search help. In which I want to display all the possible values with out resticting the entries. I tries with all the dialogue types(A, C, D). But it allways restricting with 500 entries.
    Could somebody help please.
    regards,
    Giri

    Hi J@Y,
    Thanks for your reply. But, when the control comes to search help exit, already the selected entries were restricting to 500. So, even I am changing the value to zero or space here, it is not solving the issue. So, could you please tell me how to skip the restriction before control comes to the search help exit.
    Many thanks
    Regards

  • Search help value restriction in two tables having same value table

    Hi Gurus,
    I have two tables containing same field having same domain with value table. My requirement is to restrict the values in the tables. For example the field contains 4 values:
    1) A
    2) B
    3) C
    4) D
    For table 1, only A and C should be seen in F4 and for table 2, only B and D should be seen. Also if somebody forces  B or D
    in 1st table should not be allowed and the same for 2nd table ( A & C are not allowed ). How to do this using search help exit . Which event should I use. I don't want to create two separate check tables containing only the required values.
    Regards,
    Debopriyo

    Hi Gurus,
    I have two tables containing same field having same domain with value table. My requirement is to restrict the values in the tables. For example the field contains 4 values:
    1) A
    2) B
    3) C
    4) D
    For table 1, only A and C should be seen in F4 and for table 2, only B and D should be seen. Also if somebody forces  B or D
    in 1st table should not be allowed and the same for 2nd table ( A & C are not allowed ). How to do this using search help exit . Which event should I use. I don't want to create two separate check tables containing only the required values.
    Regards,
    Debopriyo

  • Using Search Help with ALV and Dynamic context node

    The topic subject already describes my situation.
    I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.
    This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.
    Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.
    I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:
      CALL METHOD lo_nd_info_root->add_new_child_node
        EXPORTING
          static_element_type          = vs_tabname
          name                         = 'SAMPLE_NODE_NAME'
    *    is_mandatory                 = abap_false
    *    is_mandatory_selection       = abap_false
         is_multiple                  = abap_true
         is_multiple_selection        = abap_false
    *    is_singleton                 = abap_false
          is_initialize_lead_selection = abap_false
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lo_nd_info_data .
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
          parent_info = lo_nd_info_root
          node_name = 'SAMPLE_NODE_NAME'
          structure_name = vs_tabname
          is_multiple = abap_true ).
    The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

  • Search Help with in a serach help required in SRM 4.0

    Hi,                                                     
    Requirement: Search help required for Product Category field in the Search help for Product(BBPH_PRODUCT) in SRM portal.
    This search help is used in Create shopping Cart transaction. The hyper link on Internal Goods/Services leads to the search help BBPH_PRODUCT. 
    My analysis:           
    The field Product Category (CATEGORY_ID) has search help(COM_CAT_HIER) attached to its data element. When I single test the search help BBPH_PRODUCT in SAP GUI,I can see the search help for field product category in the selection dialogue box. However the same does not appear on the corresponding screen in HTML.
    Please let me know whether I need to do some thing to make the search help appear on the HTML screen?
    With Regards,         
    Prakash Kamath

    Hi Prakash,
    I have the same problem but with another field. Unloading point. Could you please tell me how did you solve this problem with displaying F4 help on html/ SRM portal?
    Thank you very much.
    Best regards,
    Danijela ZIvanovic

  • Custom search help with F4IF_INT_TABLE_VALUE_REQUEST to retrieve 2 columns

    Hi all,
    i have a problem to retrieve selected value from a custom search help. I need to retrieve 2 columns from the selected line. eg. there are A,B,C,D column in the search help. I need to get the B and D. can anyone help? Thanks

    For achieving this follow the following 4 steps:
    1. While calling F4IF_INT_TABLE_VALUE_REQUEST pass the importing paramter return_tab  to make the data selected by the user IN SELECTION screen. Remember that without this the user entry is avaliable only at START OF SELECTION.
    2. Use this value to READ TABLE your internal table to get the  value of other column.
    3. Load an internal table with values you want to assign to selection screen fields.
    4. Assign  values to the field in selection field using Fn Module: 'DYNP_VALUES_UPDATE'.
    Example:
    DATA: ......,
        lit_fields     type table of dynpread,
        ls_fields      type dynpread,
        lit_ret_tab    type table of ddshretval,
        ls_ret_tab     type ddshretval.
    . call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield        = 'VARI'
          dynpprog        = sy-cprog
          dynpnr          = sy-dynnr
          dynprofield     = 'P_VARI'
          value_org       = 'S'
        tables
          value_tab       = lit_abc
          return_tab      = lit_ret_tab
        exceptions
          parameter_error = 1
          no_values_found = 2
          others          = 3.
    check sy-subrc eq 0.
    *-----get the entered value of field vari
    read table lit_ret_tab into ls_ret_tab index 1.
      lv_vari = ls_ret_tab-fieldval.
    check sy-subrc eq 0.
    *-----get value of the other column vari_d
    read table lit_abc into ls_abc with key vari = lv_vari.
      lv_vari_d = ls_abc-vari_d.
    *----- Append to an internal table with values you want to assin to selection screen fields.
    ls_fields-fieldname = 'P_VARI'.
      ls_fields-fieldvalue = lv_vari.
      append ls_fields to lit_fields.
      ls_fields-fieldname = 'P_VARI_D'.
      ls_fields-fieldvalue = lv_vari-d.
      append ls_fields to lit_fields.
    *---- Assign  values to the field in selection field
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-cprog
          dynumb               = sy-dynnr
        tables
          dynpfields           = lit_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.

  • Search Help "PREM"  Restriction on Company Code

    Dear Friends,
    I have modified the screen SAPLKACB 0002. I HAVE APPLIED SEARCH HELP "PREM" ON COBL-PERNR(Personnel No).Now if u go to F-02 Transaction.We have a Company Code entered Say : 2200.
    Now if we fill in the mandatory fields we go 2 next screen there we have personnel no field where i have
    attached F4(Search Help).
    Now i need 2 restrict the search help according to the company code.
    if the Company Code i enter say 2100 and hIt enter.it should give me some king of msg that
    the company code 2100 does not match the (F-02 Transaction Company Code:2200).
    Please Guide as 2 how 2 Accomplish this.
    Regards,
    Essam

    Hi if you need to do any thing to search help u need to create a search help exit for it.
    check my [blog|https://wiki.sdn.sap.com/wiki/x/du0] on this code.

Maybe you are looking for

  • How to construct a sql query when field having single quote

    Hi all, I have been working on web application , here is my requirement: I'm constructing sql statement dynamically from dynamic user input (form data). In one of the field having single quote. while executing the query it is getting problem because

  • Update and Write Back DataTable in Object Variable Using Script Component

    Hi All.. I'm trying to update an Object Type Variable [ReadWrite] with a Data Flow Task Script Component. Variable is already holding a record set with Column(s) like, ID, Name, IsProcessed. Now in my Data Flow Script Component, I'm trying to 1st) Fi

  • 4 gb or 8 gb for vista x64

    Should I stay with 4 gb or shall I go for 8 gb in a vista x64 OS

  • Determine date from string

    Hi, I have an application that reads in information files in text format. Each line is made up of some character delimited fields and one of these fields is a date field. This information files come from can come from many different sources and can h

  • Problems linking between articles

    Even though we follow all the directions from this forum concerning linking between different articles in a magazine we can only get i to work if it is in the same article - not between differet articles. We make a button and the url is set to "navto