Finding a field in select options

I am using select options WD component in my WD component. I have added some fields in the select options component using add_selection_field method.
Is there any method using which I can check if i give an id of a particular field, the method should return if the field with that id already exists or not.
Thanks,
Reena

Hi Reena,
just go thru this thread, you may goet some useful infm regarding your query. I m noty sure but just go thru it once
WD ABAP - Search help using Selection-options
thnks

Similar Messages

  • Innput field with Select option on custom screen

    Hi,
    I need to create an Input field with Select Option(No interval) button on Custom dialog screen .
    Is there any idea how can I create it on screen ?
    Thanks
    Sachin

    create a normal inputfield and place an icon next to it. then in the pai on click of that button use the following code.
    data: wf_tab_field like rstabfield occurs 0 with header line ,
          wf_exl_opt like rsoptions .
    refresh: wf_tab_field  .
        move: 'KOSTL' to wf_tab_field-fieldname ,
              'CSKS' to wf_tab_field-tablename .
        append wf_tab_field .
        clear wf_tab_field .
        move: 'X' to wf_exl_opt-bt ,
              'X' to wf_exl_opt-cp ,
              'X' to wf_exl_opt-ge ,
              'X' to wf_exl_opt-gt ,
              'X' to wf_exl_opt-le ,
              'X' to wf_exl_opt-lt ,
              'X' to wf_exl_opt-nb ,
              'X' to wf_exl_opt-np .
    call function 'COMPLEX_SELECTIONS_DIALOG'
         exporting
           title                   = 'Select Cost Centers'
           text                    = 'Cost Center'
    *         SIGNED                  = 'X'
    *         LOWER_CASE              = ' '
    *         NO_INTERVAL_CHECK       = ' '
    *         JUST_DISPLAY            = ' '
    *         JUST_INCL               = ' '
            excluded_options        = wf_exl_opt
    *         DESCRIPTION             =
            help_field              = 'CSKS-KOSTL'
    *          SEARCH_HELP             = 'KOST'
            tab_and_field           = wf_tab_field
          tables
            range                   = r_kostl
         exceptions
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           others                  = 5
        if sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        endif.
        if not r_kostl[] is initial .
          read table r_kostl index 1 .
          if sy-subrc eq 0 .
            move: r_kostl-low to wf_t_kostl .
          endif .
        endif .
    wf_t_kostl  is the screen field name.
    Raja

  • "WHERE field IN select-options" alternative

    I currently have a report that uses
    SELECT-OPTIONS so_num FOR qmih-qmnum.
    SELECT * FROM qmih INTO TABLE t_qmih
       WHERE qmnum IN so_num.
    Now, this works fine unless the user selects a large number of individual items in the select options, e.g. 7,000 individual qmnums, in which case I get an ABAP error.
    The dump contains the following helpful information:
    How to correct the error                                                                               
    The SAP Open SQL statement must be divided into several smaller units.
    If the problem occurred due to the use of an excessively large table  
    in an IN itab construct, you can use the addition FOR ALL ENTRIES     
    instead.                                                              
    When you use this addition, the statement is split into smaller units 
    according to the restrictions of the database system used.                                                                               
    You may able to find an interim solution to the problem               
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:                                    
    Could anyone give me an idea of how I could fix this?

    Hi Chandrasekhar,
    very interesting statement but not necessarily correct.
    Select-options declares a range-type internal table with header line. The number of table rows is limited by the system memory storage available.
    Oracle database has a fixed limit of 32KB for the length of the select statement. The open SQL database interface will resolve the range table resulting in the right number of comparison expressions.
    If the user puts too many values into select-options, he will probably copy single values which are represented by SIGN = 'I' and OPTION = 'EQ'.
    Try this (example):
    select-options:
      s_matnr for mara-matnr.
    data:
      lt_value like hashed table of s_matnr-low with unique key table_line. "avoid duplicates
    fiels-symbols:
      <any> type any,
      <value> type any.
    loop at s_matnr assigning <any>
      where sign = 'I' and option = 'EQ'.
      assign component 'LOW' of structure <any> to <field>.
      insert <field> into table t_value.
      delete s_matnr.
    endloop.
    select ...
      into table ...
      from ...
      for all entries in lt_value
      where matnr = lt_value-table_line.
    if lines( s_matnr ) > 0.
    select ...
      appending table ...
      from ...
      where matnr in s_matnr.
    endif.
    Now you've got them all.
    Regards,
    Clemens

  • Search help for A field in select option which doesnt have search help in c

    u have table in QM which is QMFE in whihc field FECOD which doesnt have search help , but my requirement is that in select option in report to have users to see its search help, anyone there to help me

    Hi sridhar loganathan,
    For this goto SE11 and create a ZFECOD Search help for that field. In Defination Tab enter table name
    QMFE and Enter Z_F4_FECOD_EXIT in Search help Exit.
    Then create a FM in SE37 as Z_F4_FECOD_EXIT under a FG. And then write code as follows for example: 
    FUNCTION Z_F4_REG_EXIT.
    ""Local Interface:
    *"  TABLES
    *"      SHLP_TAB TYPE  SHLP_DESCR_TAB_T
    *"      RECORD_TAB STRUCTURE  SEAHLPRES
    *"  CHANGING
    *"     VALUE(SHLP) TYPE  SHLP_DESCR_T
    *"     VALUE(CALLCONTROL) LIKE  DDSHF4CTRL STRUCTURE  DDSHF4CTRL
      TYPES: begin of ty_code,
              dam_code type  QMFE-FECOD ,
            end of ty_code.
      DATA : tw_code type ty_code,
             ta_code type table of ty_code.
       IF  "callcontrol-step <> 'SELONE' AND
            callcontrol-step <> 'SELECT' AND
            callcontrol-step <> 'DISP'.
          EXIT.
        ENDIF.
       IF callcontrol-step = 'SELECT'.
          CALL FUNCTION 'F4UT_PARAMETER_ALLOCATE'
            EXPORTING
                 PARAMETER         = 'FECOD'
            TABLES
                 SHLP_TAB          = shlp_tab
                 RECORD_TAB        = record_tab
            CHANGING
                 SHLP              = shlp
                 CALLCONTROL       = callcontrol
            EXCEPTIONS
                 OTHERS            = 3.
       ENDIF.
       IF callcontrol-step = 'DISP'.
    Get the Region
          CALL FUNCTION 'F4UT_PARAMETER_VALUE_GET'
             EXPORTING
                  PARAMETER         = 'FECOD'
                  FIELDNAME         = 'FECOD'
             TABLES
                  SHLP_TAB          = shlp_tab
                  RECORD_TAB        = record_tab
                  RESULTS_TAB       = ta_code
             CHANGING
                  SHLP              = shlp
                  CALLCONTROL       = callcontrol
             EXCEPTIONS
                  PARAMETER_UNKNOWN = 1
                  OTHERS            = 2.
           IF SY-SUBRC = 0.
              SORT TA_CODE BY DAM_CODE.
    Deleting duplicate damage codes in Internal Table ta_code
              DELETE ADJACENT DUPLICATES FROM TA_CODE COMPARING DAM_CODE.
    Passing changed Internal table to FM
              CALL FUNCTION 'F4UT_PARAMETER_RESULTS_PUT'
              EXPORTING
                 PARAMETER         = 'REGION'
                 FIELDNAME         = 'REGION'
              TABLES
                 SHLP_TAB          = shlp_tab
                 RECORD_TAB        = record_tab
                 SOURCE_TAB        = ta_code
              CHANGING
                 SHLP              = shlp
                 CALLCONTROL       = callcontrol
              EXCEPTIONS
                 PARAMETER_UNKNOWN = 1
                 OTHERS            = 2.
           ENDIF.
       ENDIF.
    ENDFUNCTION.
    Revert me for any clarifications.
    Regards,
    Suneel G.

  • F4 help for PO number field with SELECT OPTIONS

    Hi all,
    I have a field (PO no) using SELECT OPTIONS on my selection screen.I need F4 help for this field.How shud i declare it?
    I have declared it as follows:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    select-options sel_po for ZPO_LOI-zobject_id obligatory .
    SELECTION-SCREEN END OF BLOCK b1.
    ZPO_LOI is a table view with a z data element ZOBJECT_ID to which i have attached a search help which displays the required values for the PO field in the selection screen.But now the problem is i cant see the F4 icon for the field on the sel screen.
    Please help.

    Hi I have a sapmle code for this.
    *&                AT SELECTION SCREEN ON VALUE REQUEST
    *-- F4 help for IDOC numbers
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-low.
      PERFORM value_request_status USING 'S_DOCNUM-LOW'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_docnum-high.
      PERFORM value_request_status USING 'S_DOCNUM-HIGH'.
    *&      Form  value_request_status
          text
         -->fp_field  dynpro field that gets the return value
    FORM value_request_status  USING fp_field TYPE dynfnam.
      STATICS tl_values TYPE STANDARD TABLE OF tp_value.
      IF tl_values IS INITIAL.
         SELECT docnum FROM edidc UP TO 500 ROWS INTO TABLE tl_values
              WHERE credat   IN  s_credat
              AND   cretim   IN  s_cretim.
         IF sy-subrc eq 0.
            CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
              retfield        = 'DOCNUM'
              dynpprog        = syst-repid
              dynpnr          = syst-dynnr
              dynprofield     = fp_field
              value_org       = 'S'
             TABLES
              value_tab       = tl_values
             EXCEPTIONS
              parameter_error = 1
              no_values_found = 2
             OTHERS          = 3.
             IF sy-subrc IS NOT INITIAL.
               MESSAGE i999(zz) WITH 'No values found'(004).
             ENDIF.
          ENDIF.
        ENDIF.
    ENDFORM.                    " value_request_status
    Regards,
    Amit.

  • Controlling the space between label and Input field in SELECT-OPTION

    Hi ,
    I am using WDR_SELECT_OPTIONS as a used component in order to dynamically generate the Select option in my WD Component.
    Can any one tell me if there is a way to control the spacing between Label and Input field?  This is because rest of the UI elements are in one particular order but for this dynamically generated UI.
    Please help me.
    Thanks,
    Kavitha

    Hi Kavitha,
    The label is required for accessibility reasons. It's not possible to remove it and to use your own label from outside the component to point to it. Labels cannot point to targets across views (and hence acress component) boundaries.
    Best regards,
    Thomas

  • Making to-field in select-option mandatory

    hi experts
    I defined an OBLIGATORY select-option with no-extension option. but the user wants not only the "from" field is OBLIGATORY but also the "to" filed.
    I know I can do it if I define 2 parameters in the same line. but is there any other option if using select-option
    many thanks
    Edited by: Thomas Zloch on Nov 4, 2010 9:54 AM - subject changed

    Use the FM [SELECT_OPTIONS_RESTRICT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=select_options_restrict#sdn_content_category_value_wiki] in  the initialization of the report, and only allow "I/BT" records types.
    FORM restrict_select.
    * Local data
      DATA: restrict TYPE sscr_restrict,
            opt_list TYPE sscr_opt_list,
            *** TYPE sscr_***.
    * Create Options
    * - Option ALL : any selection allowed
      CLEAR opt_list.
      MOVE 'ALL' TO opt_list-name.
      MOVE 'X' TO: opt_list-options-bt,
                   opt_list-options-cp,
                   opt_list-options-eq,
                   opt_list-options-ge,
                   opt_list-options-gt,
                   opt_list-options-le,
                   opt_list-options-lt,
                   opt_list-options-nb,
                   opt_list-options-ne,
                   opt_list-options-np.
      APPEND opt_list TO restrict-opt_list_tab.
    * - Option RNG only ranges of values
      CLEAR opt_list.
      MOVE 'RNG' TO opt_list-name.
      MOVE 'X' TO: opt_list-options-bt.
      APPEND opt_list TO restrict-opt_list_tab.
    * Affect Options to actual select-options
    * - ALL by default
      CLEAR ***.
      MOVE: 'A'          TO ***-kind,
            '*'          TO ***-sg_main,
            'ALL'        TO ***-op_main.
      APPEND *** TO restrict-***_tab.
    * RNG to a single select-option
      CLEAR ***.
      MOVE: 'S'          TO ***-kind,
            'SO_FIELD'   TO ***-name,
            'I'          TO ***-sg_main,
            'RNG'        TO ***-op_main.
      APPEND *** TO restrict-***_tab.
    * Execute
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
           EXPORTING
                restriction = restrict
           EXCEPTIONS
                OTHERS      = 0.
    ENDFORM.                    " restrict_select
    Regards,
    Raymond

  • Hide Selection Field in Select-Option

    Hi,
    Is there any way to hide a selection field (not to delete and not to set as read only) in select-option component?
    Aviad

    Hi,
    I have several fields on the select-option view.
    One of those fields has a search help attached to it.
    The search-help needs additional data in order to filter unwanted results.
    If I add two more fields to the select-option view and bind them using the search-help structure (in all three fields) I can see only the desired results.
    The user, on the other hand, dos not need to see the additional fields, so I wish to hide them.
    Aviad

  • Include a field in selection options

    Hi,
    In my selection screen i want an output like this...
    a   _______ to ________
    b   _______ to ________
    c   ____________
    a and b will have a low and high but c needs to be just an input box.
    how to define this ??
    selection-screen begin of screen 0100 as subscreen.
    selection-screen begin of block b4.
    select-options: a for MARA-MATNR
    how to define c ???
    selection-screen end of block b4.

    Actually the syntax would be like so.  You can also add the NO- EXTENSION to the end to get rid of the "Multiple Selection" box.
    select-options: c for sy-datum no intervals no-EXTENSION.
    Regards,
    Rich Heilman

  • Comparing field with select-option

    HI
    i have one slect option
    s_bukrs for coas-bukrs.
    and
    loop..
    if w_bukrs eq s_bukrs"here is the problem,w_bukrs is
       "holding single value and s_bukrs a range,so in such
       "case how i can do comaprison
    endif.
    endloop

    Hi Sanju,
    Just use IN as said..
      if w_bukrs <b>IN</b> s_bukrs
    in case you want to compare a single value use..
    if w_bukrs <b>EQ</b> s_bukrs-low or
    if w_bukrs <b>EQ</b> s_bukrs-high
    regards
    satesh

  • Select-options for input field

    hi,
    Is it possible to use 'Select-options' in web dynpro for the input field like we use in abap?
    Ex. material is the input field. i want to select range also for this input field using 'Select-options'
    I have tried only with ovs(f4 help) for the input field. can u pls tel me how to use if it is possible ?
    Thanks,
    Aishwarya.

    DATA: LT_RANGE_TABLE TYPE REF TO DATA,
            RT_RANGE_TABLE TYPE REF TO DATA,
            READ_ONLY TYPE ABAP_BOOL,
            TYPENAME TYPE STRING.  DATA: LR_COMPONENTCONTROLLER TYPE REF
    TO IG_COMPONENTCONTROLLER,
            L_REF_CMP_USAGE TYPE REF TO IF_WD_COMPONENT_USAGE.
    create the  used component
      L_REF_CMP_USAGE = WD_THIS->WD_CPUSE_SELECT_OPTIONS( ).
      IF L_REF_CMP_USAGE->HAS_ACTIVE_COMPONENT( ) IS INITIAL.
        L_REF_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 = 'matnr' ).
    add a new field to the selection
      WD_THIS->M_HANDLER->ADD_SELECTION_FIELD(
      I_ID = 'matnr'
      IT_RESULT = LT_RANGE_TABLE
      I_READ_ONLY = READ_ONLY ).
    This is my code followed by saptechnical. but when i exec, am getting err like the type matnr is invalid.

  • Select -options (fields as mandatory) and alv

    Hi all,
    i have 5 fields in select options and alv table , based on selection criteria values will display in alv table. now i want to make 2 fields as mandatory in select-options. without entering values in those two fields it should not allow the values to display iin alv table , it should rise a message..
    (i have not created node for select-options ,i have directly used data type in wddoinit for select-options and for alv table i have created node)
    thanks all

    Hi,
    In wddoinit while creating select options by ADD_SELECTION_FIELD method ,it has a parameter called I_OBLIGATORY. Set it as X and thus the field becomes mandatory.
    Regards
    Karthiheyan M

  • Providing input  in one field should activate the req select -options field

    in mpool-pgming ,say i have 10 selct options in the selction screen of an application
    but first only one input field(one select-option) should be active i.e should be displayed
    and all should be inactive(invisible),on providing input inthat the remaining select options
    should get displayed,for this how to write code and in which event? is it PBO or PAI?
    please provide me the coding ,am in desperate need.

    Hi Kudala,
    You have to give a loop
      loop at screen.
        if screen-group2 eq value1
          screen-active    = 1.
         screen-invisible = 0.
        elseif screen-group2 eq value2.
          screen-active    = 0.
          screen-invisible = 1.
        endif.
        modify screen.
      endloop.
    where value1 and value2 are the ids you have defined for the text field in the layout editor.
    reward points if it helps

  • Time field in selection screen

    Hi All,
    I have one requirement like we need to create the selection screen with date and time fields to hold the values of shift times. Please find below example.
    In selection screen I am using select-option for creating selection screen withr date and time fields.
    Select-option :    Date :-  From Date to To-Date     (Ex :  07-08-2009 to 07-09-2009
                               Shift 1:u2013 From-Time  to To-Time (Ex : Values 6:00:00 to 14:00:00)
                               Shift 2 :u2013 From-Time  to To-Time (Ex : Values 14:00:00 to 22:00:00)
                               Shift 3 :u2013 From-Time  to To-Time (Ex : Values 22:00:00 to 6:00:00)
    When I try to press enter is giving message like u201CLower Limit is Greater than higher limitu201D for shift 3 selection field.
    Please let me know how  can we design the selection screen for this type of scenario.
    Thanks in Advanceu2026u2026
    Amjad.

    Hi,
    I have added two time fields in a line using PARAMETERS. Hope this code might be helpful to add any number of time fields as you need:
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(10) TEXT-R01 FOR FIELD p_par1.
    PARAMETERS p_par1 like sy-uzeit.
    SELECTION-SCREEN POSITION 30.
    SELECTION-SCREEN COMMENT 45(10) TEXT-R02 FOR FIELD p_par2.
    PARAMETERS p_par2 like sy-uzeit.
    SELECTION-SCREEN END OF LINE.
    Thanks,
    Sathya.

  • Select-option at Input

    Dear Experts,
    I have been trying to find to input the range of values,like we do in ABAP as select options,though i am able to use inputField but i want to select the range of values for a particular field...
    Pls help me out...
    Thanks,
    Saurabh

    Hi,
    Please refer this blog.
    /people/sap.user72/blog/2006/12/20/bsp-value-help-input-field-and-select-options-ranges
    Thanks.

Maybe you are looking for

  • Error while writing a rotuine!! Help me

    Hi Guys, Bleow is the code : "DATA: L_S_DATAPAK_LINE TYPE TRANSFER_STRUCTURE. LOOP AT DATAPAK INTO L_S_DATAPAK_LINE. IF L_S_DATAPAK_LINE-ITM_SC_H_OBJ_ID = '0010092184'.    L_S_DATAPAK_LINE-ITM_DESCRIPTION  = 'PT/UIOPLANTRONICS U1OP'.    modify DATAPA

  • I only want certain stuff to sync between iPhone and iPad

    I have an iPad and am going to be getting an iPhone, but I don't want my messages and FaceTime to show up on my iPad. How do I accomplish such?

  • Safari painfully slow on new Mac Mini

    I know there have been a number of threads on this topic and I have tried all of the tricks listed but Safari is still painfully slow to load web pages. I have tested my internet connection and it is fine. The real interesting thing here is that when

  • Getting Xml  tag values  based on procedure in  parameter

    Hi, I have an XML file like bellow <college> <studenthistory> <sno>100</sno> <sname>jeff</sname> <sdept>comp</sdept> </studenthistory> <studenthistory> <sno>200</sno> <sname>kelly</sname> <sdept>physics</sdept> </studenthistory> </college> i am writi

  • KT4V crc errors

    hi there! i have crc errors in my system,i read that a bios update will fix the problem my system usually reboots when i ripping a dvd or moving files or i watch a dvd movie! suddenly the screen becomes blue and the system rebooting... i would like t