How to restrict the values for selection in the search help..

hi,
i have a requirement regarding screen programming. i have added a i/o field in a screen and i linked a search help for that field.
i used the standard search help it holds some 15 values for selection...
when i click on the  search help i m getting some 15 values for selection. but i dont need all the 15 values. i need only 4 values for selection..can any one help me regarding this...
waiting for ur reply...
Uday.
Edited by: uday13 on May 31, 2010 9:17 AM

Hello,
Refer the below code and you can provide your own search help to a parameter depending on the value in another parameter:-
PARAMETERS : p_belnr TYPE belnr,
             p_bukrs TYPE bukrs.
DATA : BEGIN OF itab OCCURS 0,
         bukrs TYPE bukrs,
       END OF itab.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
  PERFORM f4_bukrs_help USING p_bukrs.
*&      Form  f4_bukrs_help
FORM f4_bukrs_help USING p_bukrs.
  DATA : itab TYPE STANDARD TABLE OF it WITH HEADER LINE,
         tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE,
         v_belnr TYPE belnr.
  CLEAR:   tb_dynpfields.
  REFRESH: tb_dynpfields.
  MOVE 'P_BELNR' TO tb_dynpfields-fieldname.
  APPEND tb_dynpfields.
  CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
      dyname                               = 'Z_F4' "program name
      dynumb                               = '1000' "screen number
    TABLES
      dynpfields                           = tb_dynpfields
  IF sy-subrc NE 0.
  ENDIF.
READ TABLE tb_dynpfields INDEX 1.
  IF sy-subrc EQ 0.
    v_belnr = tb_dynpfields-fieldvalue.
  ENDIF.
  SELECT bukrs from <db_table> INTO TABLE itab WHERE belnr = v_belnr.
  CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield               = 'BURKS' "internal table field
      dynpprog               = 'Z_F4' "program name
      dynpnr                 = '1000' "screen number
      dynprofield            = 'P_BUKRS' "screen field name
      value_org              = 'S'
    TABLES
      value_tab              = itab "internal table
  IF sy-subrc NE 0.
  ENDIF.
ENDFORM.                    " f4_bukrs_help
Hope this helps you.
Regards,
Tarun

Similar Messages

  • How to restrict Option values for a particular metadata in profile checkin

    How to restrict Option values (drop down) for a particular metadata in profile checkin-
    Metadata field Color is having options dropdown values (stored in table/views)-
    Display name - Blue, Value=1
    Display name - Red, Value=2
    Display name - Yellow, Value=3
    Display name - Green, Value=4
    Display name - Black, Value=5
    For a particular profile checkin form, for the metadata field Color I want the dropdown value consist of only top three options
    Display name - Blue, Value=1
    Display name - Red, Value=2
    Display name - Yellow, Value=3
    But this should be done on profile level only, should not impact the standrad checkin form and other profile checkin forms.
    Please help me if any one having any suggestion to implement the above secnario
    Thanks,
    Sumit

    Hi,
    Into the rule containing the Color metadata, you can restrict the values of the list.
    In "Has restricted list and pane", list the values 1, 2 and 3 (new line for each value) :
    1
    2
    3
    Romain.

  • How to get a value for Select One Choice in the backing bean

    Friends,
    Does any one have any idea, how to get the value of a selected item value from the Select One Choice component in the backing bean iin valueChangeListener method. Right now I am always getting the sequence of the selected item, instead the actual selected value. I tried using 'ValuePassTrhough=true' also.. but didn't help
    Below is the my code snippet
    <af:selectOneChoice value="#{bindings.country.inputValue}"
    required="#{bindings.country.hints.mandatory}"
    shortDesc="#{bindings.country.hints.tooltip}"
    id="soc1" autoSubmit="true" valuePassThru="true"
    valueChangeListener="#{pageFlowScope.Bean.onValueChange
    <f:selectItems value="#{bindings.country.items}" id="si2"/>
    </af:selectOneChoice>
    Thanks in advance.

    check my other post at Re: Pass data from a variable to another page

  • How to Restrict F4 values for Std Field

    Hi ,
    I need to restrict the F4 values of a standard field from a standard t-code.
    Example:
           In standard t-code : XD01 .
           If i press F4 on company code field , i shows all the company codes exists from table , like : 1000 , 2000 , 3000 ...etc..,
          But, My requirement is : I want the restrict the values .     
          Say , I need to show only 1000 & 3000 company codes when he press F4 on company code field on XD01 or XK01 ,
         where  ever the Comapny Code field (BUKRS) is used.
         Answers will be rewarded

    Hi Lakshman,
    Me to aware of search help exit...
    If i do for search help level , it affects only 1 field of 1 transaction.
    Say Example: If i have search help exit for BUKRS field in XD01 t-code , it will not affect in t-code XK01 , since Xk01 BUKRS
    field uses some other Search help...
    I need to know , if we set once for BUKRS field .. will it affect on all T-Codes..
    Is there any way to do it
    Edited by: Surendar on May 6, 2010 2:38 PM

  • Passing the values to table row with search help

    Hello experts,
            I was developed one custom component which is displayd in table format.here in one column i was put F4 functionality.whenever the user click on that f4 one pop up window will come with few columns and few records then user selects one row from that pop up window.Now my requirement is whatever the row is selected by user that row will come and set in my table .its very needful..
    Regards,
    Bixamaiah.

    Hi Bussa,
    If the field for which you are trying to get F4 help is a context node attribute, its very simple.
    First, make sure that the field is an input field.
    In the corresponding context node class, implement the get_v method of the attribute. A utility class has been created to simplify the definition of F4 Help -
    CL_BSP_WD_VALUEHELP_F4DESCR.
    Check out the implementation of this class in any of the standard code, that will guide you. Also, make sure that you have defined the input and output mapping properly.
    The input mapping defines the search criteria that is used and output mapping defines in which fields the selected values have to be transferred.
    Hope this helps!
    Regards,
    Padma Guda

  • How to add a value/entry in a exisiting search help

    Hello,
    I want to insert bank name and account number in a search help of a SAP field, how can i make an entry in the exisiting search help ?
    Thanks
    Shehryar

    That is a search help exit, u cannot use that if it is a standard search help (unless ofcourse u have the access key)
    Search help exits are coded to define own path to retrieve the values.. suppose u need to have some logical retrieval ..say data is in some other system..or simply if u want to restrict the output programatically in a search help, then we use search help exits.
    bad luck ..in your case u cannot

  • How to get accurate values for select statement using single column

    Hi All,
    Below is my query which runs fine
    Select Distinct Top 4
    FiscalYearId,
    FiscalMonthOfYearId
    From ODS.Common.tODS_Date
    Inner Join
    UTL.Utility.tUTL_ProcessDate
    On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
    And tUTL_ProcessDate.DatabaseName = 'ODS'
    Order By
    FiscalYearId Desc,
    FiscalMonthOfYearId Desc
    Below is the generate output
    FiscalYearId FiscalMonthOfYearId
    2014 2
    2014 1
    2013 12
    2013 11
    But i want to use this query in one of my where clause condition as its being used in the where clause it can only return 1 row.So, i tried something like this
    Select Distinct Top 4
    FiscalMonthOfYearId
    From ODS.Common.tODS_Date
    Inner Join
    UTL.Utility.tUTL_ProcessDate
    On tODS_Date.DateShort < tUTL_ProcessDate.ProcessDate
    And tUTL_ProcessDate.DatabaseName = 'ODS'
    Order By
    FiscalMonthOfYearId Desc
    And the result set of this one gives me the output like
    FiscalMonthOfYearId
    12
    11
    10
    9
    Which is not correct,( if you see the result set above). 
    Can someone please help me with any ides on this.

    If you want to use this query in the WHERE clause, then use it with EXISTS option which allows to return more than 1 column. 
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How to restrict the user for re-submitting the same form

    Hi All,
    I would like to know, How to restrict a user for re-submitting the same page.
    I have a jsp page with submit button... and should not allow the user to save the same data again ..
    Anil

    Try the followings. If user disable cookies, this will not work. You need to modify to detect such situation!
    String processed = "mycooke";
    Cookie[] cookies = request.getCookies();
    Cookie c = null;
    if (cookies!=null) {
       for (int i=0; i < cookies.length; i++) {
           if (cookies.getName.equals(processed)) {
    c = cookies[i];
    break;
    if (c!=null) {
    // already processed.
    // send error message and exit.
    // set cookie;
    c = new Cookie(processed , "yourdata");
    c.setMaxAge(-1);
    response.addCookie(c);
    // process as it is the first;

  • How to get the value from select list to text box

    Hi,
    I have a select list i want to retrieve the value from select list to text box.
    How can i do that???
    Regards,
    Sakthi.

    Hi Sakthi,
    Yo can use the Java script for that..
    Dynamically the value will come into text box.
    Use the below script.
    <script type="text/javascript">
    function disFormItems()
    var lReturn = $v(here your select list name)
    alert(lReturn);
    document.getElementById(here your text box name).value =lReturn; }
    </script>Cheers,
    Shan

  • How to get the values of Select-options from the screen.

    The value of parameter can be obtained by function module 'DYNP_VALUES_READ' but How to get the values of Select-options from the screen? I want the F4 help values of select-options B depending on the values in Select-option A.So I want to read the Select-option A's value.

    Hi,
    Refer this following code..this will solve your problem...
    "Following code reads value entered in s_po select options and willprovide search
    "help for s_item depending upon s_po value.
    REPORT TEST.
    TABLES : ekpo.
    DATA: BEGIN OF itab OCCURS 0,
    ebelp LIKE ekpo-ebelp,
    END OF itab.
    SELECT-OPTIONS   s_po FOR ekpo-ebeln.
    SELECT-OPTIONS s_item FOR ekpo-ebelp.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_item-low.
      DATA:
      dyn_field TYPE dynpread,
      temp_fields TYPE TABLE OF dynpread,
      zlv_dynpro TYPE syst-repid.
      zlv_dynpro = syst-repid.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = zlv_dynpro
          dynumb     = syst-dynnr
          request    = 'A'
        TABLES
          dynpfields = temp_fields
        EXCEPTIONS
          OTHERS     = 0.
      LOOP AT temp_fields INTO dyn_field.
        IF dyn_field-fieldname EQ 'S_PO-LOW'.
            SELECT * INTO CORRESPONDING fields OF TABLE itab FROM ekpo
            WHERE ebeln EQ dyn_field-fieldvalue.
            EXIT.
        ENDIF.
      ENDLOOP.

  • How to use Multiple Single Option for selection in the Customer Exit

    Hi,
    How can we handle the multiple single values in the customer exit variable.
    I have a requirement which is as follows -
    Table A fiields -> Field Coach, Partner 2, Relation between PArtner 1 & Partner 2, Valid from, valid to date.
    Table B ->  Service Month, Start Date, End Date.
    Table C -> Billing Date, Execution Partner,cal month /year.
    For the Field coach in TABLE A, multiple Partner 2 are present.
    Report has to be built on Table C.
    User inputs the Service month and Field Coach . User can enter multiple field coach values.
    For the All the Field Coach values entered, corresponding Partner2's have to be found from Table A and to be passed to the Execution Partner in Table C.
    Now if we want to use customer exit variable on the field Execution Partner, how can we handle the Multiple Single selections in the customer exit.
    Thanks,
    Shubham

    Hi,
    While creating the variable you must have to specify multiple value.
    In customer exit
    write code multiple times and append the values.
    For example:
    when 'variable'.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 1.
    APPEND L_S_RANGE TO E_T_RANGE.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 2.
    APPEND L_S_RANGE TO E_T_RANGE.
    l_s_range - sign = 'I'.
    l_s_range - OPT = 'EQ.
    l_s_range - LOW = EXECUTION PARTNER 3.
    APPEND L_S_RANGE TO E_T_RANGE.
    Regards,
    Ranganath.

  • How can I filter the Values for the dropdowns in webdynpro

    I have given data source to table, but as there are some repetitive values in table of dropdowns, I want to filter the Values for the dropdowns in webdynpro.
    How can I do this?

    I have given datasource to table in properties of table.
    I have 2 different dropdowns for different columns in the table.
    if the size of the table is 20 I get all the values populated in the dropdowns.
    In these values, there are some repetetive values which I dont want to appear.
    I can display it by making loop and can select from the values.
    the problem is how to set the new values to that drop down again using context?
    eg
    dropdowns have,
    presales activity
    presales activity
    presales activity
    presales activity
    presales activity
    I need to filter the variable element and put back it in dropdown.
    Thanks and regards
    Hanif Kukkalli

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • How to get the values for the Authorization Object Fields....

    Hi Everyone,
    I'm pretty new to the SAP Security and have been working on the Basis sides...I created a new role in PFCG and added a few transactions (ME13) and clicked on the Authorizations tab. In there, the authorization tree is in yellow and red. After providing the Org Values, only the yellow lights remain (apart from the green one ofcourse). Now how do we get the values for the different auth obj fields that are in yellow... say for example
    Conditions                                                   COND
    Maintain Condition: Auth. for Use/Appl./Cond.Type/Table      V_KOND_VEA
    Activity                       03                                                                        ACTVT
    Application                                                                                KAPPL
    Condition table                                                                                KOTABNR
    Condition Type                                                                                KSCHL
    Usage of the condition table                                                                 KVEWE
    Here the values for V_KOND_VEA fields e.g. KAPPL, KOTABNR etc are missing.
    My question is how do we get these values in regard to the requirement provided by the client...is it the functional guys who provide these values or else how is a security person supposed to know it...
    All the help in this regard is sincerely appreciated along with the awarding of points...

    Hey thanks Alex and Catastrophe for the quick response...
    I'll be sitting with the functional team and reviewing the roles created.
    Thanks for all the help once more
    Regards,
    Akash.

  • How to set default value in select option for ABAP query

    Hi experts,
    What is the way to set up default values for select-options in ABAP query.
    e.g.
    I have one field 'Year' in my ABAP query selection screen.
    I want value of current year to be appeared here whenever user execute report
    Thanks in Advance
    -Harkamal

    Hi Harkamal,
    execute your Query via SQ01. On Selection-Screen
    goto save Variant. Mark your field
    as selection variable an press Button election variable.
    Take variable from TVARV and use it.
    Than save the Variant.
    Look at TVARV if the 'Year' is updated to the actualYear!
    regards, Dieter

Maybe you are looking for

  • HDMI output not working on HP Pavilion 15

    Hi guys, i am new here on HP Forum. My problems started when i got my new laptop and i HATED windows 8. So a friend of mine had a disc with Windows 7 on it. After the installation nothing worked, Not wlan, USB, HDMI and so on, I serched for days for

  • Error message while trying to sync photos

    While trying to sync my photos to my new iPod Classic (80G), I get an error message that says "Some of your photos were not copied to the iPod because they can not be displayed on your iPod." In reality, NONE of my photos were copied. They're JPEG (a

  • Can I change the view of the the new SMS conversation to look like the old one

    I have a Storm 9530 v5.0.0.328 Verizon and I just have done a update played with it after and like all the upgrades but the way my coversation looks in SMS.  I really don't like way the text looks to much like IM is their any way to change view back

  • Stream based socket , server implementation

    Please help me with this simple server and socket problem. SERVER_ package com.supratim; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class S

  • Debug Start routine in BW 3.5

    Hi, I have start routine at Update rules and I have observed that some of the quantity and amount key figures are not calculating properly. It is complex start routine. Can you please let me know the steps to debug the start routine for every record?