Help with Select Option

Hi
I have this select option in the user screen
SELECT-OPTIONS: ID FOR PA0094-FPNCD.            " Emp Id
But when the user tries to look up the code by clicking on to the square box beside the input box it gives the user all the entries from the Field FPNCD.
My question is there anyway i could limit it to only show certain codes when they click on the box. (In this case codes for USA only).
Thanks in advance...

Hi anwarul,
May be in this way.
First pop up the internal table by selecting the required data...
in your case you want the data of only USA.
Make select query according to ur requirement..
and then use the FM  <b>F4IF_INT_TABLE_VALUE_REQUEST</b>
Go through the below example.
tables kna1.
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
select-options s_begru for kna1-begru.
at selection-screen on value-request for s_begru-low.
clear t_values.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
<b>call function 'F4IF_INT_TABLE_VALUE_REQUEST'</b>
exporting
retfield = 's_begru'
value_org = 'S'
tables
value_tab = t_values
return_tab = t_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
read table t_return index 1.
s_begru-low = t_return-FIELDVAL.
Hope it will be helpful to you.
<b>Reward Points if it is helpful.</b>
Thanks & Regards
ilesh 24x7

Similar Messages

  • 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

  • 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

  • How to declare and work with select-option in screen painter?

    hello there,
    can anybody plz suggest me ,how to declare and work with select-option in screen painter?
    neon

    Hi Blue,
    Please check these threads which will help you a lot..
    module pool programming " to add selection-option on screen"
    Re: Select option in Dialog program screen
    Re: SELECT-OPTIONS in Screen
    Good luck
    Narin

  • F4 help in select option

    Hi All,
    We have created a select option for a field of our database table. This field has a value range in its domain. For Example
    Fix Val    Short Description
    01           INR
    02           US
    03           EUR
    When i press the f4 help of select option, am able to see both the number and the description in the F4 help. But when i select a value, it is only displaying the fixed value (01) in the select option field.
    But i want the Short Description to be displayed instead of the fixed value.
    Please tell me how to proceed.
    Thanks in advance.

    Hi,
    When there are any values in the domain range it considers only the fixed values (keys)
    to get the description what you can do is:
    1.create a your own f4 help with  the  field description.
    2.in the  select options you can give the name of F4 help when you are populating the selection field.
    wd_this->m_handle->add_selection_field(
                            i_description = 'Candidate Profit Center'
                            i_id = '/MRSS/T_RMOR_PROF_CENTER'
                             *i_value_help_type = if_wd_value_help_handler=>co_prefix_searchhelp*
                            *i_value_help_id = '/MRSS/SH_RM_PC_GROUP'*    
                               it_result = lt_range_table
                            i_read_only = read_only ).
    Priya

  • 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.

  • How to created Freely Programmed F4 help in Select Options

    hi,all
       I have a probelm about how to created a Freely Programmed F4 help in Select Options,and put help value into select options field
      Thanks and Best Regards

    Hi Haung,
    You need to use FREE_HELP not the component name.
    Modify you code as below:
       LT_RANGE_TABLE_V = wd_this->m_handler_V->create_range_table( 'ZCYPHDATE' ).
      wd_this->M_HANDLER_V->add_selection_field(
          i_id                         = 'ZCYPHDATE'
          it_result                    = LT_RANGE_TABLE_V
          i_value_help_type            = if_wd_value_help_handler=>CO_PREFIX_APPLDEV
          i_value_help_id              = 'FREE_HELP'
          i_no_intervals               = abap_false ).
    Hope this helps you.
    Regards,
    Rama

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • 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.

  • Mulitple selection with select option on subscreen

    Hi colleagues,
       I've the following issue:
    I'm programming a dynpro this dynpro contains two subscreens. The lower subscreen will contain another dynpro defined as subscreen with an ALV to display results.
    The top subscreen (0150) area will be filled with a generated subscreen with the command
      SELECTION-SCREEN BEGIN OF SCREEN 0150 AS SUBSCREEN.
    with select options I define my selection area like:
    SELECT-OPTIONS: sa_6 FOR gs_rp_attrib_sel-sonr.
       If I call my transaction starting up the dynpro containing the two subscreens the result looks quit how I expect it. BUT then I try to start up the multiply selection Pop-UP for the selection field by pressing the button just right behind the HIGH input field, nothing happens. The multiply selection pop-up basicly does not show up.
       Any clues what I need to add that it will show up?
       Does the mulitply selection not work with
    SELECTION-SCREEN BEGIN OF SCREEN 0150 <b>AS SUBSCREEN</b>???
    (If I do a simple test program with a selection screen not being a subscreen, the multiply select popup comes up.)

    Hi,
    A subscreen cannot call another screen.
    I guess this is the reason why u are facing this problem.
    Thanks,
    Rashmi.

  • 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

  • Issue with Select Options

    Dear Experts,
    I used component wdr_select_options to achieve select options functionality, But it displaying only one field as per my requirement user expecting both low & high fields.
    Can you guide for 5 select options whether i have use t times the component at my component level.
    And also could please guide me how to use select options at code level.
    Thanks & Regards,
    Siva Mandapudi.
    Edited by: SIVAMANDAPUDI on Jul 18, 2011 6:39 PM

    Hi Saravan,
    Please find below details.
    The exception is:
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
    caught in
    procedure "ONACTIONSEARCH_SUPPLIER" "(METHOD)", nor was it propagated by a
    RAISING clause.
    code:
    DATA FOR WORKING WITH SELECT OPTIONS
      data: rt_SUPPLIERNO type ref to data.
      data: rt_SUPPLIERNAME type ref to data.
    field-symbols: <fs_SUPPLIERNO> type table,
                    <fs_SUPPLIERNAME> type table.
      TYPES: BEGIN OF T_SUPPLIERNO,
             SIGN(1),
             OPTION(2),
             LOW TYPE /SAPAPO/LOC,
             HIGH TYPE /SAPAPO/LOC,
            END OF T_SUPPLIERNO.
      TYPES: BEGIN OF T_SUPPLIERNAME,
             SIGN(1),
             OPTION(2),
             LOW TYPE /SAPAPO/LOC_DESCR40,
             HIGH TYPE /SAPAPO/LOC_DESCR40,
            END OF T_SUPPLIERNAME.
      DATA: WA_SUPPLIERNO TYPE T_SUPPLIERNO, IT_SUPPLIERNO TYPE TABLE OF T_SUPPLIERNO,
            WA_SUPPLIERNAME TYPE T_SUPPLIERNAME, IT_SUPPLIERNAME TYPE TABLE OF T_SUPPLIERNAME.
    Retrieve the data from the select option
      rt_SUPPLIERNO = wd_this->m_handler->get_range_table_of_sel_field(
                               i_id = 'ID_SNO' ).
    dump raising when get_range_table_of_sel_field is called.
    Thanks a lot.
    Regards
    Siva Mandapudi.

  • 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 ?

  • Help with SELECT - selecting range of numbers

    Hi,
    I need a help with SELECT statement. I want to select Dates starting from today and ending 30 days back. So the result would be like:
    TRUNC(SYSDATE)
    TRUNC(SYSDATE) - 1
    TRUNC(SYSDATE) - 2
    TRUNC(SYSDATE) - 3
    TRUNC(SYSDATE) - 30I was thinking to simply select truncated SYSDATE in first column, and in second column numbers 0, 1, 2, ... 30. Then I would simply do a difference first column - second column. But how to select such sequence of numbers? I don't want to select each number (date) in separate select statement and then unioning them.
    Does anybody have an idea?
    Thanks for help, Dan

    SQL> select trunc(sysdate) - level + 1 as dt
      2  from dual
      3  connect by level <= 31
      4  ;
    DT
    07/01/2013
    06/01/2013
    05/01/2013
    04/01/2013
    03/01/2013
    02/01/2013
    01/01/2013
    31/12/2012
    30/12/2012
    29/12/2012
    28/12/2012
    27/12/2012
    26/12/2012
    25/12/2012
    24/12/2012
    23/12/2012
    22/12/2012
    21/12/2012
    20/12/2012
    19/12/2012
    DT
    18/12/2012
    17/12/2012
    16/12/2012
    15/12/2012
    14/12/2012
    13/12/2012
    12/12/2012
    11/12/2012
    10/12/2012
    09/12/2012
    08/12/2012
    31 rows selected

  • Multiple records with select option

    i have to use select option in selection screen, which wl take the multiple values but that select option wont act as a range, the select option is a session name  from sm35, the table from where data is retrieved is APQI, i have used  a parameter before using select option ,like:
    selection-screen begin of line.
    parameters: P_grpid like apqi-groupid.
    select-options: s_grpid like apqi-groupid.
    selection-screen end of line.
    AT-SELECTION SCREEN ON VALUE REQUEST FOR p-GRPID. " previous situation
    {the code starts
    FM F4 selection is called}
    AT-SELECTION SCREEN ON VALUE REQUEST FOR S_GRPID-low. " CURRENT situation
    FM F4 selection is called}
    now when i give data in slection screen for s_grpid-low then it works as a parametr, but it doesnt take multiple values at s_grpid when i have alos mentioned the same for s_grpid-high.
    Please tell me how to achive multiple records with select option, or u can also send a sample code if you have..
    Thanks
    Swarnali

    Hello Swarnali,
    You need to fill internal table of select-option once you got into the event AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    so sudo code will be:
    AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    Select data from table.
       so_carr-LOW = value
       append so_carr.
    You can also use NO INTERVAL to suppress the so_carr-HIGH value on selection screen.
    Thanks,
    Augustin.

Maybe you are looking for

  • Can anyone explain Diff between except and Not in.?

    Hi experts, Sometimes "not in" function is not working.Can anyone tell me the reason.please Query 1:- Select POL from table_1 where pol not in (select pol from table_2) Query 2:- select pol from table_1 except select pol from table_2 Getting output f

  • Speed up iWeb

    I have made a couple of websites with iWeb and I am caught in the Catch-22. The nicer looking the website, the slower it loads. I have found two applications, Web Crusher and Web Site Maestro, that promise to speed up iWeb-created websites. Anybody r

  • Boot Camp Update Does Not Install Completely

    I posted a question with this title back in April. Lots of others were having the same problem (trying to go from 2.1 to 2.2). Finally found a solution, but could not post it on the original question because the topic had been archived. I will post i

  • Video not loading in both opera and ie

    i am having trouble with flash videos not loading from certain websites specifically http://video.au.msn.com/ youtube videos work fine as well as a number of other websites using windows 7 sp1 x64 opera 11 ie8 flash version WIN 10,2,152,32

  • Apple needs to put a security key on the icloud.

    I think that apple should have a securitypassword when changing options on the icloud. Because if i were to steal and iphone all i have to do is go to the settings, go to icloud, and a simple swipe of the find my iphone and there is nothing they can