Problem on Search Help  for select-option

Hi,
Iam working on a search help for select-option,
is there a way to incorporate select-all or multiple
selection on this?
Thanks!

Hi catherine,
1. Just copy paste this program.
  (It will POPULATE the SELECT-OPTION,
   based upon
   MULTIPLE Selection,
   selected by the user,
   in the  help provided thru F4IF_INT_TABLE_VALUE_REQUEST.)
2. Eg. is for BUKRS (company code)
3.
REPORT ABC.
TABLES : T001.
DATA : ITAB LIKE TABLE OF T001 WITH HEADER LINE.
DATA : RETURN LIKE TABLE OF DDSHRETVAL WITH HEADER LINE.
SELECT-OPTIONS : BUKRS FOR T001-BUKRS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-LOW.
PERFORM MYPOPULATE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR BUKRS-HIGH.
PERFORM MYPOPULATE.
FORM MYPOPULATE.
  REFRESH ITAB.
  SELECT * FROM T001 INTO TABLE ITAB.
  call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
      retfield        = 'BUKRS'
      dynprofield     = 'BUKRS'
      dynpprog        = sy-REPID
      dynpnr          = sy-dynnr
      multiple_choice = 'X'
      value_org       = 'S'
    TABLES
      value_tab       = ITAB
      return_tab      = return.
IF RETURN[] IS NOT INITIAL.
REFRESH BUKRS.
CLEAR BUKRS.
  LOOP AT RETURN.
    BUKRS-SIGN = 'I'.
    BUKRS-OPTION = 'EQ'.
    BUKRS-LOW = RETURN-FIELDVAL.
    BUKRS-HIGH = RETURN-FIELDVAL.
    APPEND BUKRS.
  ENDLOOP.
ENDIF.
ENDFORM.
regards,
amit m.

Similar Messages

  • Search help for select options

    Hi,
    I want to give search help for a field on selection screen based on value in another field in same selection screen. I am using DYNP_VALUES_READ function module to retain the values and F4IF_INT_TABLE_VALUE_REQUEST function module to give search help and it works fine, but when i give multiple selections i am not able to read the values. Please help. Points will be rewarded.

    Hi,
    Check the below code.
    tables: t001k.
    For Identification Number
    DATA: BEGIN OF it_bwkey OCCURS 0,
            bwkey LIKE t001k-bwkey,
          END OF it_bwkey.
    data: v_bukrs(4).
    For Run date
    DATA: BEGIN OF it_bukrs OCCURS 0,
            bukrs LIKE t001k-bukrs,
          END OF it_bukrs.
    DATA it_ret LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS:    p_bukrs(4) TYPE c.
    SELECT-OPTIONS s_bwkey FOR t001k-bwkey NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK main.
    Validation Section
    INITIALIZATION.
      SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BUKRS'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'P_BUKRS'
          value_org       = 'S'
        TABLES
          value_tab       = it_bukrs
        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.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bwkey-low.
      TABLES: t130r.
      DATA: BEGIN OF dynpfields OCCURS 0. "Hilfsstruktur zum auslesen des
              INCLUDE STRUCTURE dynpread. "Feldwertes vom Dynpro bei >F4<
      DATA: END OF   dynpfields.
      DATA : sy_repid LIKE sy-repid,
             sy_dynnr LIKE sy-dynnr.
      CLEAR dynpfields.
      REFRESH dynpfields.
      dynpfields-fieldname = 'P_BUKRS'.
      APPEND dynpfields.
      Lesen des akt. Wertes von Dynpro
      sy_repid = sy-repid.
      sy_dynnr = sy-dynnr.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname     = sy_repid
          dynumb     = sy_dynnr
        TABLES
          dynpfields = dynpfields
        EXCEPTIONS
          OTHERS     = 01.
      IF sy-subrc = 0.
        READ TABLE dynpfields WITH KEY fieldname = 'P_BUKRS'.
        IF sy-subrc = 0.
          v_bukrs = dynpfields-fieldvalue.
        ENDIF.
      ENDIF.
      SELECT bwkey FROM t001k
      INTO TABLE it_bwkey
      WHERE bukrs = v_bukrs.
      DELETE ADJACENT DUPLICATES FROM it_bwkey.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BWKEY'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_BWKEY'
          value_org       = 'S'
        TABLES
          value_tab       = it_bwkey
        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.

  • Can i assign a collective srch help for select option in list display

    can i assign a collective srch help for select option in list display

    Hi,
    Yes ,u can assign a collective search help for select-option in list display.
    Eg:
    Define your select option like this
    SELECT-OPTIONS: s_vbeln FOR likp-vbeln MATCHCODE OBJECT vmva.
    Regards,
    Shiva.

  • How to get calender in f4 help for select options in module pool (URGENT)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi Amruta,
    First of all, you can not create select-options directly in module pool.
    For creating <b>select-option is dialog prog</b> follow these steps:
    1. create your selection screen model as subscreen by:
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
    PARAMETRS: P_MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
    SELECTION-SCREEN END OF SCREEN 2000.
    2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
    3. write this bit of code in PBO and PAI of the screen 100;
    CALL SUBSCREEN SUBSCREEN_2000.
    4. include this code in PBO:
    INCLUDING SY-REPID '2000'
    6. write user_command of PAI, call screen which is going to executable after selection-screen.
    5. create a transcation for this dialog module pool with screen 100.
    6. execute this transaction and you can see it's behaving like cool with select-options.
    After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
    Hope it will solve the problem.
    Regards
    Krishnendu

  • Applying stadard search help to SELECT-OPTIONS

    applying stadard search help to SELECT-OPTIONS
    i have the below code in the selection screen:
    SELECT-OPTIONS : so_stain FOR gv_stai1
                                  MATCHCODE OBJECT ZSTA,
                     so_staex FOR gv_stai1
                                  MATCHCODE OBJECT ZSTA.
    where ZSTA is the search help defined in the data dictionary which is the copy on standard SAP search help..
    but this is not working..:(  when i run the program and click on the
    F4 help for these two fields i get no out put..
    can any one suggest me to search help to select-options..

    Hi,
    u can see this example code for f4 help on the select-option,
    DATA: li_ret_tab TYPE STANDARD TABLE OF ddshretval,
            lws_retfield TYPE dfies-fieldname.
      DATA : wa_ret_tab LIKE LINE OF li_ret_tab.
    **- Get the device numbers
      SELECT serge FROM equi
             INTO TABLE i_help1
             WHERE sparte EQ c_51.
      IF sy-subrc EQ 0.
        lws_retfield = text-030.
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield        = s_device
            dynpprog        = sy-repid
            dynpnr          = c_dynpnr
            dynprofield     = s_device
            value_org       = 'S'
          TABLES
            value_tab       = i_help1
          EXCEPTIONS
            parameter_error = 1
            no_values_found = 2
            OTHERS          = 3.
        IF sy-subrc <> 0.
        ENDIF.
      ENDIF.
    Regards,
    kk.

  • F4 help for select options based on parameter value

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

  • Search Help for selection screen select-option

    Hi Friends,
              I want have search help for KSCHL with only the condition types starting with Z. I need your help to do that.
    Thanks in Advance.

    hi,
    chek a sample code, for restricting the serach help.
    REPORT Z_CONECT_A.
    Include type pool SSCR
    TYPE-POOLS sscr.
    TABLES : marc.
    defining the selection-screen
    select-options :
      s_matnr for marc-matnr,
      s_werks for marc-werks.
    Define the object to be passed to the RESTRICTION parameter
    DATA restrict TYPE sscr_restrict.
    Auxiliary objects for filling RESTRICT
    DATA : optlist TYPE sscr_opt_list,
               *** type sscr_***.
    INITIALIZATION.
    Restricting the MATNR selection to only EQ and 'BT'.
      optlist-name = 'OBJECTKEY1'.
      optlist-options-eq = 'X'.
      optlist-options-bt = 'X'.
      APPEND optlist TO restrict-opt_list_tab.
      ***-kind = 'S'.
      ***-name = 'S_MATNR'.
      ***-sg_main = 'I'.
      ***-sg_addy = space.
      ***-op_main = 'OBJECTKEY1'.
      APPEND *** TO restrict-***_tab.
    Restricting the WERKS selection to CP, GE, LT, NE.
      optlist-name = 'OBJECTKEY2'.
      optlist-options-cp = 'X'.
      optlist-options-ge = 'X'.
      optlist-options-lt = 'X'.
      optlist-options-ne = 'X'.
      APPEND optlist TO restrict-opt_list_tab.
      ***-kind = 'S'.
      ***-name = 'S_WERKS'.
      ***-sg_main = 'I'.
      ***-sg_addy = space.
      ***-op_main = 'OBJECTKEY2'.
      APPEND *** TO restrict-***_tab.
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
       EXPORTING
        restriction                  = restrict
       EXCEPTIONS
         TOO_LATE                     = 1
         REPEATED                     = 2
         SELOPT_WITHOUT_OPTIONS       = 3
         SELOPT_WITHOUT_SIGNS         = 4
         INVALID_SIGN                 = 5
         EMPTY_OPTION_LIST            = 6
         INVALID_KIND                 = 7
         REPEATED_KIND_A              = 8
         OTHERS                       = 9
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    regards
    anver
    <b><i>if helped pls mark points</i></b>

  • Value help for select-option not filling selection field

    I'm having some problems with a value help on a select-option. I've managed to get the value help displaying the correct values but for some reason can't get it to populate the selection field after I've selected a record.
    I have the following call:
      wd_this->m_handler->add_selection_field(
                          i_id = 'SHORT_D'
                          i_description = 'Program'
                          it_result = lt_range_table
                          i_read_only = read_only
                          i_value_help_type = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
                          i_value_help_id = 'ZPROGSTUDY' ).
    where ZPROGSTUDY is a new search help I've set up with an exit to retrieve the values.
    Any ideas ? Thanks.

    Hi Malcolm,
    The code you have is OK. I copied your code into a test program and it worked as expected.
    I used a search help where the possible values are populated in the search help exit, exactly as in your case. The only time it did not work was when read_only = X, but that is obvious also from a visual point of view since the input field is greyed out in that case. The popup also tells you is in RO mode...
    Does your SHLP work when you test it from SE11? Returns values?
    SAP provides a lot of WD4A sample code, see for example component WDR_TEST_SELECT_OPTIONS look for
    select-option fields > special cases > input helps > Non field-specific input help using search help
    Regards,
    George

  • Search help in select option

    Hi,
    I created a select options with a field.The field does't have any search help in it.
    I needs to give an explicit search help for that field , for that i created one serch help and i passed the
    search help name in the parameter i_value_help_id  of method add_selection_field.
    But i didn't get the f4 in my select options.
    please help to solve this issue.
    Thanks.

    hi bala,
    Whether the search help field refers to any dictionary field ( ie any customized table field)..
    if so, thn give ur search help name for that dataelement in furthercharacteristics tab.. b'z u have to
    use DATAELEMENT for defining the select option..

  • SEARCH HELP FOR SELECT PTIONS IN REPORTS

    hI,
       I HAVE ONE SELECT-OPTION FOR ZTSH-TSMONTH. HOW CAN I SET SEARCH HELP FOR THAT
    SHYJA

    Hi Sihya,
    You can create search help in 2 ways:::
    1) Goto SE11 and create search help with any name ZSRCHELP.
    For reference u can see some standard search help like H_T530E for field PREAS in table PA0002.
    Now go to SE11 in table ZTSH, u can find the tab for search help, select your field TSMONTH, and click on search help tab and give the name of search help u created.
    Now activate it.
    Now u goto ur report u will find search help will be shown for that parameter.
    2)See the report below
    TABLES: mara, makt.
    DATA mat LIKE mara-matnr.
    DATA: BEGIN OF itab OCCURS 0,
    matnr LIKE mara-matnr,
    END OF itab.
    DATA : BEGIN OF btab OCCURS 0,
    maktx LIKE makt-maktx,
    END OF btab.
    DATA : return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    SELECT-OPTIONS: so_matnr FOR mara-matnr,
    so_maktx FOR makt-maktx.
    INITIALIZATION.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-low.
    PERFORM matnr.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_matnr-high.
    PERFORM matnr.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-low.
    PERFORM maktx.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_maktx-high.
    PERFORM maktx.
    *& Form matnr
    text
    FORM matnr.
    REFRESH itab.
    SELECT matnr FROM mara INTO TABLE itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'MATNR '
    dynprofield = 'P_MATNR '
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    value_org = 'S'
    TABLES
    value_tab = itab
    return_tab = return.
    mat = return-fieldval.
    UNPACK mat TO mat.
    so_matnr = return-fieldval.
    REFRESH return.
    CLEAR return.
    ENDFORM. "matnr
    *& Form maktx
    text
    FORM maktx.
    REFRESH btab.
    SELECT maktx FROM makt INTO TABLE btab WHERE matnr = mat AND spras =
    sy-langu.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    retfield = 'MAKTX'
    dynprofield = 'SO_MAKTX '
    dynpprog = sy-repid
    dynpnr = sy-dynnr
    value_org = 'S'
    TABLES
    value_tab = btab
    return_tab = return.
    so_maktx = return-fieldval.
    REFRESH return.
    CLEAR return.
    ENDFORM. "maktx
    <b>KINDLY REWARD IF USEFUL
    ROHIT G</b>

  • Search help for selection screen field

    Hi ,
    steps for creating search help for a key field in selection screen..
    tables is a userdefined from which the field is taken..
    thxs,
    vind

    hi,
    c this.
    REPORT ZXYZ_0002 .
    data: dynfields type table of dynpread with header line.
    data: return type table of ddshretval with header line.
    selection-screen begin of block b1 with frame title text-001 .
    selection-screen begin of line.
    PARAMETERS: P_BUKRS type T001-BUKRS.
    selection-screen comment 30(20) BUTXT for field p_bukrs.
    selection-screen end of line.
    selection-screen end of block b1.
    at selection-screen output.
    if butxt is initial.
       select single butxt into butxt
             from t001
            where bukrs = p_bukrs.
    endif.
    at selection-screen on value-request for p_bukrs.
      call function 'F4IF_FIELD_VALUE_REQUEST'
           exporting
                tabname           = 'T001'
                fieldname         = 'BUKRS'
                dynpprog          = sy-cprog
                dynpnr            = sy-dynnr
                dynprofield       = 'P_BUKRS'
           tables
                return_tab        = return
           exceptions
                field_not_found   = 1
                no_help_for_field = 2
                inconsistent_help = 3
                no_values_found   = 4
                others            = 5.
      read table return with key fieldname = 'P_BUKRS'.
    Add it back to the dynpro.
      dynfields-fieldname = return-retfield.
      dynfields-fieldvalue =  return-fieldval.
      append dynfields.
    Get the company code from db and add to dynpro
      data: xt001 type t001.
      clear xt001.
      select single * into xt001
             from t001
            where bukrs = return-fieldval.
      dynfields-fieldname = 'BUTXT'.
      dynfields-fieldvalue = xt001-butxt.
      append dynfields.
    Update the dynpro values.
      call function 'DYNP_VALUES_UPDATE'
           exporting
                dyname     = sy-cprog
                dynumb     = sy-dynnr
           tables
                dynpfields = dynfields
           exceptions
                others     = 8.
    start-of-selection.
    rgsds
    anver
    if hlped mark points

  • Search Help in Select - Options for Time field

    Hi,
    I have a select option which is a  time field.
    For date field the F4 help is automatically generated.
    How to get F4 help for time field.
    Regards,
    Remo

    Selection-Options or normal field - it doesn't matter.  There is no system delivered value help for a time field. This is documented in the online help:
    There is no automatic F4 help for data element TIMS.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
    You would have to create your freely programmed value help if you want something like the time value help available in the SAPGUI.

  • Search Help in Select - Options

    Dear experts,
    i use three select options and they work fine.
    In the node of the view i declared the attributes i need and bound a search help (F4 help) to them.
    here is the problem.
    One attribute has the help visible when i start the application, the other two not.
    Can you give me a hint how to solve this ?
    Thanks and best regards
    René

    Hi Rene,
    I had the similar question earlier, later what i have found is like this:
    1. I have a WDC with three Select options to it.
    2. First Select options relates to the first attribute in my context node which takes the Data element as the Data type. For Ex: take BUKRS as the DE. This has pre-defined search help to the DE C_T001.
    3. Second select options relates to the second attribute in my context node which takes the string as the data type. I manually assigned the Search help to that attribute 'C_T001'.
    4. Thirs Select options relate to the third attribute inmy context node which takes the string as the data type. I manually assigned a Search help to it 'H_T002'.
    5. In the WDDOINIT of my view, I have written the code as follows in the bottom of the post.
    6. The observation is the search help assigned to the first attribute will be opened with out any problem or additional code to it.
    7. The search help assigned to the second one at the context level wont be picked in the select-options.
    8. The search help assigned to the third one will be picked if and only if there is manual assignment of the search help at the time of creating a selection field.
    Conclusion: So, the search help assignment assigned to the attribute at context level is ignored. It will be considered only if the DE has that search help in the case of select-options.
    Hope it is clear and appreciate your feebback.
    Regards,
    Shashikanth. D
    First Select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage TYPE REF TO if_wd_component_usage.
      lo_cmp_usage =   wd_this->wd_cpuse_select_options( ).
      IF lo_cmp_usage->has_active_component( ) IS INITIAL.
        lo_cmp_usage->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options = wd_this->wd_cpifc_select_options( ).
    init the select screen
      wd_this->m_handler = wd_this->m_wd_select_options->init_selection_screen( ).
      wd_this->m_handler->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler->create_range_table( i_typename = 'BUKRS' ).
    add a new field to the selection
      wd_this->m_handler->add_selection_field( i_id = 'BUKRS'
      it_result = lt_range_table i_read_only = read_only ).
    Second select option.
    Instantiating the Used component WDR_SELECT_OPTIONS
      DATA lo_cmp_usage1 TYPE REF TO if_wd_component_usage.
      lo_cmp_usage1 =   wd_this->wd_cpuse_use_select1( ).
      IF lo_cmp_usage1->has_active_component( ) IS INITIAL.
        lo_cmp_usage1->create_component( ).
      ENDIF.
      wd_this->m_wd_select_options1 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler1 = wd_this->m_wd_select_options1->init_selection_screen(  ).
      wd_this->m_handler1->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler1->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
      wd_this->m_handler1->add_selection_field( i_id = 'IF1'
      it_result = lt_range_table i_read_only = read_only ).
    Third Select options:
    Instantiating the Used component WDR_SELECT_OPTIONS
    DATA lo_cmp_usage2 TYPE REF TO if_wd_component_usage.
    lo_cmp_usage2 =   wd_this->wd_cpuse_use_select2( ).
    IF lo_cmp_usage2->has_active_component( ) IS INITIAL.
      lo_cmp_usage2->create_component( ).
    ENDIF.
    wd_this->m_wd_select_options2 = wd_this->wd_cpifc_use_select1( ).
    init the select screen
      wd_this->m_handler2 = wd_this->m_wd_select_options2->init_selection_screen(  ).
      wd_this->m_handler2->set_global_options(
                                  i_display_btn_cancel  = abap_false
                                  i_display_btn_check   = abap_false
                                  i_display_btn_reset   = abap_false
                                  i_display_btn_execute = abap_false ).
    create a range table that consists of this new data element
      lt_range_table = wd_this->m_handler2->create_range_table( i_typename = 'STRING' ).
    add a new field to the selection
    CALL METHOD wd_this->m_handler2->add_selection_field
      EXPORTING
        i_id                         = 'IF2'
        it_result                    = lt_range_table
        i_value_help_type            = IF_WD_VALUE_HELP_HANDLER=>CO_PREFIX_SEARCHHELP
        i_value_help_id              = 'H_T002'.

  • F4 Help for select-options.

    Hi  Experts,
    I need to use F4 help for a select - options field from a particular table.I have written the below code and it worked well.
    FORM sub_show_help.
      SELECT bukrs
       FROM zfica_accurate
        INTO TABLE gt_accurate.
        delete ADJACENT DUPLICATES FROM gt_accurate.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BUKRS'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_CMCODE'
          window_title    = 'COMPANY CODE'
          value_org       = 'S'
          multiple_choice = 'X'
        TABLES
          value_tab       = gt_accurate
          return_tab      = gt_return.
      s_cmcode-sign    = 'I'.
      s_cmcode-option  = 'EQ'.
      LOOP AT gt_return INTO gw_return .
        s_cmcode-low = gw_return-fieldval.
        APPEND s_cmcode.
      ENDLOOP.
      READ TABLE s_cmcode INDEX 1.
      IF sy-subrc = 0.
        gw_dynpread-fieldname  = text-018.
        gw_dynpread-fieldvalue = s_cmcode-low.
        APPEND gw_dynpread TO gt_dynpread.
    UPDATE THE SCREEN FIELD VALUES
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname               = sy-repid
            dynumb               = sy-dynnr
          TABLES
            dynpfields           = gt_dynpread
          EXCEPTIONS
            invalid_abapworkarea = 1
            invalid_dynprofield  = 2
            invalid_dynproname   = 3
            invalid_dynpronummer = 4
            invalid_request      = 5
            no_fielddescription  = 6
            undefind_error       = 7
            OTHERS               = 8.
      ENDIF.
      IF sy-subrc <> 0.
        MESSAGE i003.
      ENDIF.
    The problem is , I need to create a new type for s_cmcode(select-option ) field with the same structure as the select-option and the code is as below. I have created an internal table gt_sfield similar to s_cmcode . I have replaced s_cmcode with gt_sfield but the below code is not working. Its the same as the above program but its not showing up the values in the field.Could anyone please help me.
    fORM SUB_SHOW_HELP.
      SELECT BUKRS
       FROM ZFICA_ACCURATE
        INTO TABLE GT_ACCURATE.
    gt_sfield[] = s_cmcode[].
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD        = 'BUKRS'
          DYNPPROG        = SY-REPID
          DYNPNR          = SY-DYNNR
          WINDOW_TITLE    = 'COMPANY CODE'
          VALUE_ORG       = 'S'
          MULTIPLE_CHOICE = 'X'
        TABLES
          VALUE_TAB       = GT_ACCURATE
          RETURN_TAB      = GT_RETURN.
      LOOP AT GT_RETURN INTO gw_return.
          gw_sfield-SIGN    = 'I'.
          gw_sfield-OPTION  = 'EQ'.
        MOve gw_return-fieldval to gw_sfield-low.
        APPEND gw_sfield to gt_sfield.
    ENDLOOP.
      READ TABLE gt_sfield INDEX 1 INTO gw_sfield .
      IF SY-SUBRC = 0.
        gw_dynpread-fieldname = 'S_CMCODE'.
        move  gw_sfield-low to gw_dynpread-fieldvalue.
        APPEND GW_DYNPREAD TO GT_DYNPREAD.
    UPDATE THE SCREEN FIELD VALUES
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            DYNAME               = SY-REPID
            DYNUMB               = SY-DYNNR
          TABLES
            DYNPFIELDS           = GT_DYNPREAD
          EXCEPTIONS
            INVALID_ABAPWORKAREA = 1
            INVALID_DYNPROFIELD  = 2
            INVALID_DYNPRONAME   = 3
            INVALID_DYNPRONUMMER = 4
            INVALID_REQUEST      = 5
            NO_FIELDDESCRIPTION  = 6
            UNDEFIND_ERROR       = 7
            OTHERS               = 8.
      ENDIF.
      IF SY-SUBRC <> 0.
        MESSAGE I003.
      ENDIF.
    ENDFORM.

    Hi,
    The fucntion module 'DYNP_VALUES_UPDATE' should be used only for updating the screen field values. In your case you are updating the internal table using this function module.
    Thanks
    Pavan

Maybe you are looking for

  • Problem using mDP-DVI-D adapter.

    Hi! This is my first post on this forum since I just bought my very first mac! Everything has been painless until today. Since I had a DVI-D - HDMI cable from before (which I used with my old PC to connect to my TV) I figured I'd go and buy myself th

  • Selected Items: Full Color Icon, Not Just Highlight?

    I've taken the Total Training for Encore CS4, and I get the concept of a highlight when a menu item is selected. I'm trying to make a full-color icon appear beside the button which is selected, instead of a one-color icon with the color from the Enco

  • Upgrade from Solaris 8 to Solaris 10

    What are the points to take care of when migrating the system from Sun Solaris v 8 to Sun Solaris v 10? Any help would be greatly appreciated.

  • Using MIDI files

    I found some MIDI files on the web. It's background music to play/practice over. I'd like to import them into GB somehow, so I can play guitar over them and record the it. Is there any way to do this? I looked at Quicktime Pro as far as coverting goe

  • Need help with control system that reduces a flat output signal every time a certain input exceeds given value

    I'm having difficulty setting up a closed loop control system that reduces one of my voltage outputs (connected to a high voltage system) by 30% every time a measured voltage exceeds a certain threshold value.  I'm using a USB 6229 DAQ.  I've been tr