Restrict F4 help values for select option

Hi All,
How to restrict the F4 help for select option in Webdynpro for ABAP based on some input.
Regards,
Karthick S

Hi Karthick,
Use OVS help. It will take your inputs for search and give you corresponding search value list.
Refer my blog, it will be helpful.
[OVS Help in WDA|/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap]
Thanks.

Similar Messages

  • How to restrict f4 help values in select options of  Employee Search

    Hi,
    I am using HRASR_EMPLOYEE_SEARCH  for employee search and created a new query ,infoset , usergroup which is responsible to  fetch the selection criteria and result.I have one field in the search criteria as Cost Center which is connected to P0001-KOSTL.f4 help for that field fetches all the values(Local cost center,starts with M and Global Cost Center,starts with G)
    I want to filter out the f4 values in WDA  so that it can fetch values only starts with G
    Thanks
    Bala Duvvuri

    Hi Bala,
    Do you mean to say that when the user gets the OVS popup he should be able to use wildcard characters like G* in there? If thats your requirement then thats quite possible. You can do this within the phase 2 of the OVS. You first read the values that were entered by the user in the restriction screen by saying something like:
    assign ovs_callback_object->query_parameters->* to <ls_query_params>.
    You then fetch the desired attribute into a local variable like:
    lv_matnr = <ls_query_params>-matnr.
    Then you can say like:
    REPLACE ALL OCCURRENCES OF '*' IN lv_matnr WITH '%' .
    SELECT <your fields>  FROM <table> INTO TABLE lt_select_list WHERE MATNR LIKE lv_matnr.
    Hope that this is clear for you now. You can also try go through this [full example|http://****************/Tutorials/WebDynproABAP/OVS/page1.htm] where they have explained the same concept using step-by-step screenshots.
    Regards,
    Uday

  • Set of default values for Select-Options

    Hi Gurus,
    I have a requirement where I need to set default values for select options
    ex: SELECT-OPTIONS: S_MTART FOR MARA-MTART
    default values must be ERSA - HIBE- FHMI - DIEN - GEST
    Please tell me how to do it.
    Effective replies will be rewarded with full points
    Karthik

    Hi,
    For each SELECT-OPTION, you can only specify one DEFAULT.
    You must specify the default value g in its internal format, e.g. "SELECT-OPTIONS DATE FOR SY-DATUM DEFAULT '19931224'", not "... DEFAULT '24.12.1993'".
    The default value g should normally be a literal because, at runtime when you use SUBMIT, it is transferred to the selection options table sel so early that no value can be assigned to the field g. System fields like SY-DATUM are an exception here because the system usually assigns values to them as soon as the report processing starts.
    When you use user-defined selection screens in your programs that you do not call using SUBMIT, the DEFAULT value is transfered when the selection screen is first called. In this case, therefore, you can use other fields g.
    regards,
    sowjanya
    Message was edited by: sowjanya suggula

  • Search help icon for select option

    hello all...
    can some one let me know , how to attach F4 help icon to select option..??
    in select option im referrin to a data element, this data element has a domain which has value range.
    if i press F4 on the select option, im gettin the values in the search help but the icon is not appearing..
    any suggestions...
    regards..
    vishal

    Hi,
    Select TABLE-FIELD GOTO>Search help>For field.
    If you have Search help you can assign here or else you need to create search help through SE11.
    Or programatically you can code like below.
    See below code........
    selection-screen: begin of block B1 with frame title text-001.
    select-options: s_pernr for zfdmr_records-pernr,
    selection-screen end of block B1.
    data: begin of t_itab occurs 0,
          pernr like zfdmr_records-pernr,
          end of t_itab.
    DATA: t_return like ddshretval occurs 0 with header line.
    *at selection-screen on value-request for s_pernr-low.
    perform get_values changing s_pernr-low.
    *at selection-screen on value-request for s_pernr-high.
    perform get_values changing s_pernr-high.
    *&      Form  get_values
          text
         -->P_S_PERNR_LOW  text
    FORM get_values CHANGING    P_S_PERNR.
      refresh t_itab.
      clear t_return.
      select pernr  from zfdmr_records into table t_itab.
      delete adjacent duplicates from t_itab.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
      DDIC_STRUCTURE         = ' '
          RETFIELD               = 'PERNR'
      PVALKEY                = ' '
         DYNPPROG               = sy-cprog
         DYNPNR                 = sy-dynnr
         DYNPROFIELD            = 'ZFDMR_RECORDS-PERNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
         VALUE_ORG              = 'S'
         MULTIPLE_CHOICE        = ' '
         DISPLAY                = 'F'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
        TABLES
          VALUE_TAB              = t_itab
      FIELD_TAB              =
         RETURN_TAB             = t_return
      DYNPFLD_MAPPING        =
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE t_return INDEX 1.
      p_s_pernr = t_return-fieldval.
    ENDFORM.                    " get_values
    Thanks.
    If this helps you award points and close the thread.
    Message was edited by: Deepak333 k
    Message was edited by: Deepak333 k

  • Default  value for select options.

    Hi folks
    I have to default four values in select-options.
    eg.,
    S_lfart for likp-lfart, default zse, zin, znd, zps.
    Thanks in Advance,
    Rao

    Hi,
    Go through the following syntax:
    SELECT-OPTIONS <sel> FOR <f>
                   [DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>]
                   [MEMORY ID <pid>]
                   [LOWER CASE]
                   [OBLIGATORY]
                   [NO-DISPLAY]
                   [MODIF ID <key>]
                   [NO-EXTENSION]
                   [NO INTERVALS]
                   [NO DATABASE SELECTION].
    Declares a selection table <sel> for the field <f>. For <sel>, places input fields on the corresponding selection screen. The additions allow you to set a default value, accept input in lowercase, define a required field, suppress or modify the display on the selection screen, restrict the selection table to a line or a selection to a single field, or prevent input from being passed to a logical database
    Regards,
    Bhaskar

  • How to assign list of default value for select-option variable???

    Hi every one
    This is Deepak,
    I want to know how to assign list of default value to select-option variable ? please any body tel me solution
    for example
    select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
    Thank you in advance
    Deepak

    Hi.
    Check the following sample code.
    REPORT ztn_test.
    " It is example for list populating.
    TABLES:knvp.
    data: BEGIN OF itab OCCURS 10,
          kunnr like knvp-kunnr,
          END OF itab.
    data: wa_itab like itab.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: s_kunnr(20) type c  as LISTBOX VISIBLE LENGTH 40 .
    AT SELECTION-SCREEN OUTPUT.
    SELECT kunnr from knvp  into  CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
    " I have used loop to populate some values from table
    loop at itab into wa_itab.
      name = 'S_KUNNR'.
      value-key = sy-tabix.
      value-text = wa_itab-kunnr.
      append value to list.
      clear wa_itab.
    endloop.
    " If u want individaully assign the values change the code as
    name = 'S_KUNNR'." Select option name
      value-key = 1." Index
      value-text = 'VAL1'.
      append value to list.
    name = 'S_KUNNR'." Select option name
      value-key = 2." Index
      value-text = 'VAL2'.
      append value to list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING id = name
    values = list.
    Edited by: tahir naqqash on Feb 21, 2009 4:38 PM

  • Default Values for Select-options In Webdynpro-ABAP

    Hi Freinds,
    Kindly,Help me in setting the Default values for the Select-options in Webdynpro ABAP.
    Here the Node and the Attributes are Created Dynamically, and then Displayed Select-options Component View.
    Regards,
    Xavier.P

    Xavier Reddy Penta sent me this question via email and I answered it directly yesterday. Here is the solution that I provided to him, so that it is stored with the original question:
    I believe your problem is that you are not setting the value into the range correctly.  You are setting it directly into the field symbol of the range like such:
    <FS> = L_STRING2.
    But ranges are deep objects. They have four fields: Sign, Option, High, and Low. This is from the online help:
    1.     sign of type c and length 1. The content of sign determines for every row whether the result of the condition formulated in the column is included or excluded in the entire resulting set for all rows. Evaluable values are "I" for include and "E" for exclude.
    2.     option of type c and length 2. option contains the selection option for the condition of the row in form of logical operators. Analyzable operators are "EQ", "NE", "GE", "GT", "LE", "LT", "CP" and "NP" if column high is initial, and "BT", "NB" if column high is not initial. With the options "CP" and "NP", the data type of the columns low and high must be of the data type c, and special rules apply for entries on the selection screen.
    3.     low of the data type defined after FOR. This column is designated for the comparison value or the lower interval limitation.
    4.     high of the data type defined after FOR. This column is designated for the upper interval limitation.
    So when you are moving the value into the field symbol you are setting it into the sign column.
    Here is an example of how you can access the components of the range:
    * create a range table that consists of this new data element
        lt_range_table =
          wd_this->lv_sel_handler->create_range_table(
               i_typename = l_typename ).
        IF l_fieldname = 'CARRID'.
          FIELD-SYMBOLS: <tab>         TYPE INDEX TABLE,
                             <struct>      TYPE ANY,
                             <wa>          TYPE ANY,
                             <option>      TYPE char2,
                             <sign>        TYPE char1,
                             <high>        TYPE ANY,
                             <low>         TYPE ANY,
                             <wa_values>   TYPE ANY.
          ASSIGN lt_range_table->* TO <tab>.
          APPEND INITIAL LINE TO <tab> ASSIGNING <wa>.
          ASSIGN COMPONENT 'OPTION' OF STRUCTURE <wa> TO <option>.
          ASSIGN COMPONENT 'HIGH' OF STRUCTURE <wa> TO <high>.
          ASSIGN COMPONENT 'LOW' OF STRUCTURE <wa> TO <low>.
          ASSIGN COMPONENT 'SIGN' OF STRUCTURE <wa> TO <sign>.
          <sign> = 'I'.
          <option> =  'EQ'.
          <low> = 'AA'.
        ENDIF.

  • Keep previous values for Select-Options

    I am using macros to populate my selections with the previously entered values.  Everything works fine until I want to delete the previous selections for so_snp via the Trash Can button.  The selections come back.  The issue seems to be that the selections are deleted from the so_snp range but then the AT SELECTION-SCREEN OUTPUT executes makro_get_range which re-populates the so_snp selection from the data stored in the buffer because so_snp is initial.  How do I get the AT SELECTION-SCREEN code to execute first so that the makro_set_range can clear out the shared buffer for '/SAPAPO/PT_PLAN_SNP'.  I have included excerpts from my ABAP program.
    Any help would be appreciated.  I struggled with this all day long.
    Best regards,
    Sandy
    DEFINE makro_get_range.
    initialization
      clear:
        lv_line,
        lv_key.
    import SET/GET-parameter from shared buffer
      if &2[] is initial.
        concatenate sy-uname  &1 '_T' into lv_key.          
        import &2[] from shared buffer indx(st) id lv_key.
        if sy-subrc eq 0.
          read table &2 index 1.
        endif.
      endif.
      if &2 is initial.
        get parameter id &1 field &2.
        if sy-subrc ne 0 and &2 is initial.
          refresh &2[].
        endif.
        if not &2   is initial
           and &2[] is initial.
          append &2.
        endif.
      endif.
    END-OF-DEFINITION.
    DEFINE makro_set_range.
    initialization
      clear:
        lv_line,
        lv_key.
      concatenate sy-uname &1 '_T' into lv_key.
    export SET/GET-parameter to shared buffer
      describe table &2[] lines lv_line.
      if lv_line gt 1.
        export &2[] to shared buffer indx(st) id lv_key.
      else.
        delete from shared buffer indx(st) id lv_key.
        set parameter id &1 field &2.
      endif.
    END-OF-DEFINITION.
    SELECT-OPTIONS so_snp FOR /sapapo/matloc-planner_snp.
    AT SELECTION-SCREEN OUTPUT.
       makro_get_range '/SAPAPO/PT_PLAN_SNP'    so_snp.
    AT SELECTION-SCREEN.
        makro_set_range '/SAPAPO/PT_PLAN_SNP'    so_snp.

    Can you set a flag to indicate that it needs to be done only once like below?
    AT SELECTION-SCREEN OUTPUT.
    IF v_flag_get_done_once IS INITIAL.
    *-- get the values from the shared buffer
      makro_get_range '/SAPAPO/PT_PLAN_SNP' so_snp.
      v_flag_get_done_once = 'X'.
    ELSE.
    *-- user manipulated the selection screen values, so
    *   don't do it again. Do Nothing.
    ENDIF.
    Srinivas

  • Specific default values for select-options high and low

    Hi
    My requirement is in the selection screen i have a select-options field for which i need to give default values as mentioned below.
    Description                              Data Type       Default Value     Mandatory?             Sel Scrn Type     
    Delivery/BOL Date        ekab-bedat                         1st DOM to current day     Y              Range     
    The datatype is ekab-bedat.
    In the low value field ,it should be 1st Date of month(DOM) and in the high value field it should be current day.
    Give me the code for the same asap.

    >
    sreedeep.sreekumar wrote:
    > Dont mistake my intensions. When i tried to write it in the form of a request it showed me that it cannot me posted beacuse the words that i am using (please,kindly) is not following the terms and conditions of the words to be written in the threads
    Sounds quite vague to me.
    >
    sreedeep.sreekumar wrote:
    > I was asking help for this as i am a novice in SAP-ABAP and i couldnt find solutions for it and also i have seen people directly writing codes for the queries.
    Becuase you see people posting pieces of code doesn't mean you can ask for a solution asap. Besides, whether you're new or a veteran in ABAP, what you need can be solved with some very basic knowlegde of ABAP. Just use a bit of common sense.

  • Hard coding f4 help values in select options

    hi ,
    i have requirement to hardcode certain values in the select-options in the selection-screen as F4 help . how to do it please help me out.

    Hello,
    Plz try this code below:
    DATA:
          v_fname        TYPE fieldname,
          v_dynfield     TYPE dynfnam,
          v_fname01      TYPE fieldname,
          v_dynfield01   TYPE dynfnam.
    CONSTANTS:
    c_fname01    TYPE fieldname VALUE 'S_LOKKT-LOW',
    c_fname02    TYPE fieldname VALUE 'S_LOKKT-HIGH',
    c_dynfield01 TYPE dynfnam   VALUE  'S_LOKKT-LOW',
    c_dynfield02 TYPE dynfnam   VALUE  'S_LOKKT-HIGH'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lokkt-low.
      v_fname    = c_fname01.
      v_dynfield = c_dynfield01.
      PERFORM f_get_help
      USING v_fname
                 v_dynfield.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_lokkt-high.
      v_fname01    = c_fname02.
      v_dynfield01 = c_dynfield02.
      PERFORM f_get_help
      USING v_fname01
                 v_dynfield01.
    FORM f_get_help USING fp_v_fname    TYPE fieldname
                          fp_v_dynfield TYPE dynfnam.
    TYPES:
    BEGIN OF ty_f4_tab,
      data type char2,               
    END OF ty_f4_tab. 
    DATA:
    l_it_return TYPE STANDARD TABLE OF ddshretval,
    l_wa_return TYPE ddshretval,
    l_it_f4_tab TYPE STANDARD TABLE OF ty_f4_tab,
    l_wa_f4_tab TYPE ty_f4_tab,
    l_v_program TYPE sy-repid,
    l_v_dynnr   TYPE sy-dynnr.
    CONSTANTS: c_s    TYPE char1 VALUE 'S'.
    * Populate the hardcoded values here
    l_wa_f4_tab-data = 'AA'.
    APPEND l_wa_f4_tab TO l_it_f4_tab.
    l_wa_f4_tab-data = 'AB'.
    APPEND l_wa_f4_tab TO l_it_f4_tab.
    l_wa_f4_tab-data = 'AC'.
    APPEND l_wa_f4_tab TO l_it_f4_tab.
    l_wa_f4_tab-data = 'AD'.
    APPEND l_wa_f4_tab TO l_it_f4_tab.
      l_v_program = sy-repid.
      l_v_dynnr   = sy-dynnr.
    *Function module used to display F4 help in the selection-screen
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = fp_v_fname
          dynpprog        = l_v_program
          dynpnr          = l_v_dynnr
          dynprofield     = fp_v_dynfield
          value_org       = c_s
        TABLES
          value_tab       = l_it_f4_tab
          return_tab      = l_it_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc NE 0.
        CLEAR l_it_f4_tab.
      ELSE.
        READ TABLE l_it_return INTO l_wa_return INDEX 1.
        IF sy-subrc = 0.
          fp_v_fname =  l_wa_return-fieldval.
        ENDIF.
      ENDIF.
    ENDFORM.
    Hope this is clear.
    BR,
    Suhas
    Edited by: Suhas Saha on Dec 18, 2008 2:18 PM

  • How to pass the low value and high  values for select options.

    Hi,
           In selection screen I want to display the first date, last date of this month as a default value in low and high fields.  Please exaplain me how.
    Thanks and Regards,
    Surya

    hI,
         Very thanks ,
            I  did it what u said now. but those contents does not displaying on the screen.
    In this order I write the code. Please explain me
    SELECT-OPTIONS s_date FOR likp-wadat_ist.
    DATA  BEGIN TYPE wadat_ist.
    DATA LAST TYPE wadat_ist.
    initialization.
    s_date-low = BEGIN.
    s_date-high = LAST.
    at selection-screen output.
    CALL FUNCTION 'HRWPC_BL_DATES_MONTH_INTERVAL'
      EXPORTING
        datum                =  SY-DATUM
        month_pst            =  '0'
        month_ftr            =   '0'
    IMPORTING
       BEGDA                =  BEGIN
       ENDDA                =   LAST
    EXCEPTIONS
      INVALID_VALUES       = 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.

  • Default values for Select options

    Hi All,
      I want to have default values X0 and ND for a select-options field.how can i get the same?
    Thanks,
    Rakesh.

    Initialization.
    s_akont-low = 'X0'.
    s_akont-sign = 'I'.
    s_akont-option = 'EQ'.
    APPEND s_akont.
    s_akont-low = 'ND'.
    APPEND s_akont.

  • Dynamic Values for Select Option

    Hi, 
      My requirement is that i have to set
      yesterday for the low range of select option
      and today for the high range.
      I tried the selection variables and found that
      only low range can be specified in the
      selection variable.
    Thanks,
    Siva

    Hi,
    You mean default display variant.
    Then try this.
    data w_variant TYPE disvariant.
    PARAMETERS P_LAYOUT LIKE DISVARIANT-VARIANT.
    INITIALIZATION.
    *Get Default display variant
    PERFORM F100_DISPLAY_DEFAULT_VARIANTS.
    FORM f100_display_default_variants.
      w_variant-report   = sy-repid.
      w_variant-handle   = c_handle.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save        = 'A'
           CHANGING
                cs_variant    = w_variant
           EXCEPTIONS
                wrong_input   = 1
                not_found     = 2
                program_error = 3
                OTHERS        = 4.
      IF sy-subrc EQ 0.
        p_layout = w_variant-variant.
      ENDIF.
    ENDFORM.

  • Remove screen values for select options after report runs

    I have a report that runs and when it is finished there is garbage in 3 select-option fields.  I put it there because i want the report to run if the field is blank.  here is a sample of that code.
    IF SO_APS = '  '.
        SO_APS = 'IEQn'.
        APPEND SO_APS.
      ENDIF.
    what happens is that there is an displayed after the report is finished, and I don't want to confuse the end users.

    You can try clearing it as the last statement.
    clear  SP_APS.   Refresh SO_APS.
    If that doesn't work, then try FREE MEMORY as the last executable statement.
    Regards,
    Rich Heilman

  • How to set default values in initialization event for select option

    Abapers,
    I have 3 GL account like 0024831231,0024831238,0024831245.
    Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
    Thanks

    Select option is table <Structure> with fields, low, high, sign & option
    you need to append the value into the select option, with appropriate value in low or
    example:
    S_HKONT-low  = <value>
    S_HKONT-SIGN = 'I'
    S_hkont-OPTION = 'EQ'
    append s_hkont.
    Default value for select-option also can be added directly in select-option statement.
    Regards,
    Mahesh

Maybe you are looking for

  • NoClassDefFoundError exception

    I think I need to reload NWDS on my laptop. I just attended the 2005 CRM Boot Camp and they had us load, unload, reload stuff on our laptops so many times that it doesn’t look anything like it did. In order to use my NWDS, I had to pull down J2SE 1.4

  • External optical drive in older mac mini

    The optical drive in my mini is starting to go bad. Rather than take it in to be replaced, can I just but an external super drive and plug it into the usb and be good to go? Thank you

  • Help me map out a rebuilding plan

    In early 2013 my husband and I decided we wanted to start looking into home ownership so we met with a lender and started working on their plan for us. We paid off a ton of debt and both had credit scores in the mid to high 600s. Then he got accepted

  • How to make scheduled jobs Fail if the return partial results?

    How to make scheduled jobs Fail if the return partial results? Does anyone know if there is a way to do this? We have a number of reports that we schedule to various locations in Excel and PDF. We are frequently getting problems which are manifesting

  • Top 5 wait events in AWR Repprt

    Hi, The following is top 5 wait event in my AWR reports... Whenever I take reports this are always top 5 events Top 5 Timed Events ============================================================================================================= Event