Problem in select-options value request

Hi All,
I have one select-option s_opt for vendor description. I want to have value request for both s_opt-low and s_opt-high. For that i have to write the functonal module
at selection-screen on value-request for s_opt-low. and at selection-screen on value-request for s_opt-high. for both or any other procedure.
In s_opt using drop down menu user can enter vendor description up to 10 Char, lower or upper case acceptable, & Wild card .
Can any one help with code for the above two problems.
Assured points.
With thanks in advance.
Ashok

Hi , check the code .
Just populate the itab entries either with a select on lfa1 .
here im populating with sy-index values .
REPORT zforum12.
tables : lfa1.
select-options : so_lifnr FOR lfa1-lifnr.
data: begin of itab_LIFNR occurs 0,
lifnr like lfa1-lifnr,
end of itab_LIFnr.
DATA: ITAB_SELECTED_lifnr TYPE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
initialization.
do 20 times.
move sy-index to itab_lifnr.
append itab_lifnr.
enddo.
at selection-screen on value-request for SO_LIFNR-LOW.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SO_LIFNR-LOW'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab_LIFNR
return_tab = ITAB_SELECTED_LIFNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC eq 0.
READ TABLE ITAB_SELECTED_LIFNR INDEX 1.
MOVE ITAB_SELECTED_LIFNR-FIELDVAL TO SO_LIFNR-LOW.
ELSE.
* MESSAGE ....
ENDIF.
at selection-screen on value-request for SO_LIFNR-HIGH.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
RETFIELD = 'SO_LIFNR-HIGH'
VALUE_ORG = 'S'
TABLES
VALUE_TAB = itab_LIFNR
return_tab = ITAB_SELECTED_LIFNR
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC eq 0.
READ TABLE ITAB_SELECTED_LIFNR INDEX 1.
MOVE ITAB_SELECTED_LIFNR-FIELDVAL TO SO_LIFNR-HIGH.
ELSE.
* MESSAGE ....
ENDIF.
start-of-selection.
write:/ SO_LIFnr-LOW, SO_LIFNR-HIGH.
regards,
vijay

Similar Messages

  • Select option value request depends on another field

    Hi,
    Sorry Wrong forum.
    Thanks,
    Eyal
    Message was edited by: Eyal Alsheikh

    Hi,
    Sorry Wrong forum.
    Thanks,
    Eyal
    Message was edited by: Eyal Alsheikh

  • I have a problem in select-options

    hi frns,
             i am facing a big problem in select-options
    the requirement is such that
    i have 2 select-options
    one for matnr and the other for maktx
    so wen the clent select matnr with f4
    in the maktx the similar description should come by using f4
    pls help me out

    hi,
    TYPES DECLARATION
    types: begin of tp_marc,
            matnr type marc-matnr,
            werks type marc-werks,
          end of tp_marc.
    INTERNAL TABLE AND WORK AREA DECLARATION
    data: t_marc type standard table of tp_marc,
          wa_marc type tp_marc.
    data : dd like table of dselc with header line. "*--- IMPORTANT
    data : ft like table of dfies with header line.
    data : t_makt like table of makt with header line.
    parameters : matnr like makt-matnr .
    parameters : maktx like makt-maktx.
    at selection-screen output.
      loop at screen.
        if screen-name = 'MAKTX'.
          screen-input = 0.
          modify screen.
        endif.
      endloop.
    at selection-screen on value-request for matnr.
    SELECT matnr maktx  FROM makt INTO TABLE makt up to 500 rows.
      select *
       from makt
        up to 500 rows
      into table t_makt
      where spras = syst-langu.
      if sy-subrc <> 0.
        message 'INVALID MATERIAL NUMBER' type 'E'.
      endif.
    IMPORTANT
      refresh dd.
    dd-fldname = 'MATNR'.
    dd-dyfldname = 'MATNR'.
    append dd.
      dd-fldname = 'MAKTX'.
      dd-dyfldname = 'MAKTX'.
      append dd.
    *------- IMPORTANT
      refresh ft.
      ft-tabname = 'MAKT'.
      ft-fieldname = 'MATNR'.
      append ft.
      ft-tabname = 'MAKT'.
      ft-fieldname = 'MAKTX'.
      append ft.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
      exporting
    ddic_structure = 'T001' "*----- IMPORTANT IF STANDARD STRUCT
      retfield = 'MATNR'
      dynpprog = sy-repid
      dynpnr = sy-dynnr
      dynprofield = 'MATNR'
      value_org = 'S'
      tables
      field_tab = ft "*---- IMPORTANT
      value_tab = t_makt
      dynpfld_mapping = dd "* IMPORTANT
      exceptions
      parameter_error = 1
      no_values_found = 2
      others = 3.
      start-of-selection.
      select matnr
             werks
             from marc
             into table t_marc
             where matnr = matnr.
      if sy-subrc <> 0.
        message :'no results IN MARC' type 'E'.
      endif.
      write: at 1(36) sy-uline.
      format intensified on color = 7.
      new-line.
      write :sy-vline,at 10 'MATERIAL NUMBER',at 29 sy-vline, at 30 'PLANT',sy-vline.
      new-line.
      write: at 1(36) sy-uline.
      format intensified off color = 4.
      loop at t_marc into wa_marc.
        new-line.
        write :sy-vline,at 10 wa_marc-matnr ,sy-vline, at 30 wa_marc-werks, at 36 sy-vline.
      endloop.
      new-line.
      write: at 1(36) sy-uline.
    reward points if useful.
    regards,
    Vinod Samuel.

  • Select-option value is not getting captured in at selection-screen on value

    In Selection screen , we have Select-option and  a parameter.
    Based on the values given in Select-option, the values of Parameter should get populate.
    To achieve this functionality,
    I  used  At selection u2013screen  on value request  for <parameter>  EVENT and 'F4IF_INT_TABLE_VALUE_REQUEST' Function Module.
    But the Select-option values are not getting captured in this event,unless u press Enter key.
    Is there any other way to achieve this functionality.
    Please Guide me.

    When you call function 'F4IF_INT_TABLE_VALUE_REQUEST'. make sure you send it the name of the screen variable - the F4IF_INT_TABLE_VALUE_REQUEST function calls DYNP_VALUES_READ itself if you tell it the name of your report, screen number, and the variable name... snippet below.
    Jonathan
      data:
        l_repid             type syrepid.
      l_repid = sy-repid.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          dynpprog         = l_repid
          dynpnr           = '1000'
          dynprofield      = 'S_FIELD-LOW'  "Select options - low value
    * etc

  • Passing SELECT-OPTIONS value to Function Module

    Hi,
    I need to pass select-options value to a function module.
    Code is like the following:
    SELECT-OPTIONS seltab FOR object-type.
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    I have found a similar problem in the SDN forum: How to pass select-options parameter to FM?
    However, that could not help me much in solving my problem.
    So far I have tried to created a structure in DDIC with the following components for the select-options:
    SIGN - BAPISIGN
    OPTION - BAPIOPTION
    LOW - ZBWOBJECTTYPE (my type)
    HIGH - ZBWOBJECTTYPE (my type)
    and subsequently a table type for this structure which is specified in the "Import" tab of my function module.
    Unfortunately, when I ran the program a runtime exception occured (CALL_FUNCTION_CONFLICT_TYPE).
    Could anyone please help me on this issue?
    Thanks in advance.
    Regards,
    Joon Meng

    Hello Joon,
    CALL FUNCTION 'Z_MY_FM'
          EXPORTING
            sel_tab         = seltab
         IMPORTING
            result_tab     = it_result
    You have defined SELTAB as a SELECT-OPTION.
    So when you pass only SELTAB, the header line is transferred to the FM. When you pass SELTAB[] the whole table(range) is passed.
    It is similar to the concept of an internal table with header line.
    Hope i am clear.
    Anyways how have you defined result_tab and sel_tab ?
    BR,
    Suhas

  • Displaying Selection option values in header using alv-factory

    Hi all,
    I am using alv factory class 'CL_SALV_TABLE'.
    I want to display selection-option values on my header.
    I have creted grid using class 'CL_SALV_FORM_LAYOUT_GRID' and am displaying other values.
    But am facing problem in displaying selection option values.
    Any pointer on this will be GR8.
    Thanks & Regards.
    Yats.

    Hi,
    Use this sample code.
    form top_of_the_list_main  changing lv_grids type ref to cl_salv_table.
    *Creating instances of the clases
      data :     lv_grid   type ref to  cl_salv_table,
                 lv_header type ref to  cl_salv_form_element,
                 lv_layout type ref to  cl_salv_form_layout_grid.
      move lv_grids to lv_grid.
    *Creating the layout object
      create object lv_layout.
    *Setting the Header Text
      lv_layout->create_label(
                             row     = 1
                             column  = 1
                             text    = text-008 ).
      lv_header = lv_layout.
      lv_grid->set_top_of_list( lv_header ).
    endform.                    " TOP_OF_THE_LIST_MAIN
    Loop it and keep changing the row and colom..Pass the selection option to the text field.
    Regards
    Ansair

  • How can we pass the select-option value to modulepool program?

    hi,
      how can we pass the select-option value to modulepool program ?
      Because if i declared select-options in executable program and i used SSCRFIELDS to define push buttons in selection screen.
               My requirement if enter the values to select-options and press UPDATE pussbotton then i want call screen which contains tablecontrol.
               How i get select-option values to PAI of call screen for getting the data from database table to my internal table?

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • Filtering internal table using select-option values

    Hi,
    I got an internal table with select-option values. for eg.  it_perno with the values  I  BT    000160    000170.
    Now i got another second internal table which is have the person number. Now i need to filter this second internal table based on the values from the select option table. my question is
    i can collect all the values from 160 to 170 in a separate table by looping over the select option table. and then based on the values filter the second internal table person number.
    But what would be the case if the select option contains both intervals and multiple options. For eg.
    I BT 000160      000170.
    I EQ 000185.
    So can you suggest any good solution, that based on this select option table i need to filter the second internal table Person number.
    Thanks in advance.
    Regards,
    anbu.

    Hi,
    Can you not use the select-options in the Select query while populating the internal table.
    SELECT pernr FROM pa0000 INTO it_tab WHERE pernr IN s_pernr.
    If you cannot do this and you do not want to delete the unwanted entries, then you can use the WHERE clause in the LOOP statement to process the specific entries required:
    LOOP AT it_tab INTO wa_tab WHERE pernr IN s_pernr.
    Regards,
    Aparna Alashe.

  • Select options values pass to function module

    Hi all,
            I want to pass the values entered in the select options to the function module. How should my function module interface be declared for passing the select options
    I tried declaring like
    t_range type data in the tables tab.  But this throws error. 
    Please let me know how to pass select option values back to function modules.
    Thanks,

    Hi,
    Check this code.
    data: node_flights type ref to if_wd_context_node.
    data: rt_carrid type ref to data.
    data: rt_connid type ref to data.
    data: isflight type table of sflight.
    data: wsflight type sflight.
    field-symbols: <fs_carrid> type table,
    <fs_connid> type table.
    Retrieve the data from the select option
    rt_carrid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CARR_ID' ).
    if rs_carrid is not initial.   Here you can check that if rs_carrid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_carrid->* to <fs_carrid>.
    endif.
    Retrieve the data from the select option
    rt_connid = wd_this->m_handler->get_range_table_of_sel_field(
    i_id = 'S_CONN_ID' ).
    if rt_connid is not initial. Here you can check that if  rt_connid is no initial then assign value of field symbol
    Assign it to a field symbol
    assign rt_connid->* to <fs_connid>.
    endif.
    if  <fs_connid> is not initial and <fs_carrid> is not initial.
    Retrieve that data from the database. Normally it is suggested to
    encapsulate the data retrieval in a separate class.
    For simplicity, the SELECT statement has been implemented here.
    clear isflight. refresh isflight.
    select * into corresponding fields of table isflight from sflight
    where carrid in <fs_carrid>
    and connid in <fs_connid>.
    endif.
    Bind the data to the context
    node_flights = wd_context->get_child_node( name = `FLIGHTS` ).
    node_flights->bind_elements( isflight ).
    Hopes this will helps you.
    Regard
    Manoj Kumar
    Edited by: Manoj Kumar on Mar 16, 2009 10:41 AM

  • Adding select-option value in selection screen of FBL5N tcode.

    Hi Experts,
    I have one requirement that to add a Header Text Field(BKPF-BKTXT) in section screen of standard program RFITEMAR(tcode : FBL5N), i tried to add that field but it was not displayed where i required, i mentioned below  where i required.
    Customer account                     
    Company code   
    i required under company code select option value in same selection screen block.
    Please do the needful.
    thanks in advance.
    gsreddy.

    Hi,
    If you get the access key it is possible to edit the standard program,
    How u tried to add the field???
    regards,
    Mullai

  • How to pass select option value to function module while using service call

    Hi,
    I have select-option in my WD application. To collect data based on user input im using service call. How to pass this select option values to my RFC.
    rgds
    sudhanshu

    Hi,
    Thank s for your reply. In fact im doing similar with following variation:
    i) collected range values using get_range* method.
    ii) separate low and high values as: 
    read table <field2> index 1 into wa_range.
    vert2_low = wa_range-low.
    vert2_high = wa_range-high.
    (Please note that in RFC I have taken two importing parameter as s_vert_lo and s_vert_hi)
    iii) Now setting these RFC attribute as:
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_LO`
          value = vert2_low ).
    and
    lo_el_importing->set_attribute(
        EXPORTING
          name =  `S_VERT_HI`
          value = vert2_high ).
    iv) In RFC im having my query as :
    select <fld list> from BUT000 into table itab where vertical in r_vert.
    Here, r_vert is a range defined as:
    ranges r_vert for <fld refrence>
    r_vert-sign = 'I'.
    r_vert-option = 'BT'.
    r_vert-low = S_VERT_LO.
    r_vert-high = S_VERT_HI.
    append r_vert.
    Issue here is with ranges. if im passing both low and high values it is fine but if only low value being passed it is not giving me any record.
    Please suggest.
    Rgds
    Sudhanshu

  • Passing select-options values using call transaction method

    Hi Experts,
    I have a scenario in which i have three fields BUKRS,WERKS and MATKL in an internal table i_tab and I have MATNR as a selection-option.
    After this I have to use call transaction <tcode> for all the line items in the internal table and the MATNR select-option values I have to pass directly for each line of i_tab using call transaction method.
    TYPES:  BEGIN OF t_tab,
              bukrs TYPE bukrs,
              werks TYPE werks_d,
              matkl TYPE matkl,
            END OF t_tab.
    DATA:  w_tab TYPE t_tab,
                i_tab      TYPE STANDARD TABLE OF t_tab.
    SELECT-OPTIONS: s_matnr FOR marc-matnr.
    Now I am putting a loop at i_tab and have to use CALL TRANSACTION <TCODE> for each line with the SELECT-OPTIONS for MATNR.
    Please tell me whether we can pass multiple ranges for MATNR using call transcation method.
    for example there can be multiple single values/multiple ranges/excluded ranges for MATNR. so please suggest me how tho achieve this sceanrio using CALL transaction method of BDC.
    Thanks a lot.
    Regards,
    Krishan

    Hi Krishan,
    For the Call transaction TCODE there is extension ....OPTIONS from OPT. Just Check it out. I think it is possible like this.
    ... OPTIONS FROM opt
    *Effect*
    This addition gives you control using the values of the components of the structure opt, which must be of the Dictionary type CTU_PARAMS. The components have the following meaning:
    DISMODE
    Processing mode (comparable with the MODE addition)
    UPDMODE
    Update mode (comparable with the UPDATE addition)
    CATTMODE
    CATT mode (controlling a CATT procedure)
    The CATT mode can have the following values:
    ' ' No CATT procedure active
    'N' CATT procedure without single screen control
    'A' CATT procedure with single screen control
    DEFSIZE
    Use standard window size
    RACOMMIT
    COMMIT WORK does not end CATT procedure
    NOBINPT
    No batch input mode, that s SY-BINPT = SPACE.
    NOBIEND
    No batch input mode after BDC data has been read
    The components DEFSIZE , RACOMMIT, NOBINPT, NOBIEND always take the following values:
    'X' Yes
    ' ' No
    If the OPTIONS addition is omitted, the following settings are valid for the control parameters:
    DISMODE from the MODE addition
    UPDMODE
    from the UPDATE addition
    CATTMODE
    No CATT procedure active
    DEFSIZE
    Do not use standard window size
    RACOMMIT
    COMMIT WORK ends procedure successfully
    NOBINPT
    Batch input mode, that is SY-BINPT =X.
    NOBIEND
    Batch input mode also active after BDC data has been read
    Regards,
    Swapna.

  • Passing select-options value in method

    How to pass select-options value in method ?
    Example:
    Select-options: carrid for spfli-carrid.
    class cl_myclass implementation.
    select  carrid connid from
    spfli where carrid in carrid.
    endclass.
    Thanks

    Hello Anee
    The coding of this functionality is quite simple:
    REPORT zmy_report.
    DATA:  go_myclass   TYPE REF TO zcl_myclass,
               gd_repid         TYPE syst-repid.
    PARAMETERS:
      p_bukrs   ...
    SELECT-OPTIONS:
      o_kunnr  ...
    START-OF-SELECTION.
      gd_repid = syst-repid.
      CREATE OBJECT go_myclass
        EXPORTING
          id_calling_program = gd_repid.
    And that's how your CONSTRUCTOR method should look like:
    METHOD constructor.  " IMPORTING parameter id_calling_program
    CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
      EXPORTING
        CURR_REPORT = id_calling_report
      TABLES
        SELECTION_TABLE = me->mt_selopts.
    " NOTE: define mt_selopts as instance attribute of table type RSPARAMS_TT
    ENDMETHOD.
    Finally you have to extract the parameter and select-options from MT_SELOPTS.
    Regards
      Uwe

  • How to assign select-option values to internal table

    hi all,
    how to assign select-option values to internal table
    thanks in advance.

    Hi,
    You just need to loop at your select-option field and take the values from low and high fields.
    for. e.g
    loop at s_werks .
    move:s_werks-low to <your itab>
    if not s_werks-high is initial .
    move: s_werks-high to <youritab>
    endif .
    append <your itab>
    endloop .
    OR use select statement.
    regards,
    Omkar.
    Message was edited by:
            Omkaram Yanamala
    Message was edited by:
            Omkaram Yanamala

  • Problem using select-options?

    Hi all,
    I am using select-options, in this 3 are selectoptions and 1 is normal.
    i am getting select-option value using..
    *cust code
      rt_KUNNR = wd_this->m_sel_opt->get_range_table_of_sel_field(
                                 i_id = 'KUNNR' ).
    but which method i ahve to use to get normal which is not of select-options.
    i am doing like this...
    *cust code
      rt_YEAR = wd_this->m_sel_opt->get_range_table_of_sel_field(
                                 i_id = 'GJAHR'
                                  ).  // I think this method is wrong place i used.
      assign rt_YEAR->* to <fs_GJAHR>.
      move <fs_GJAHR> to F_YEAR.
    *cust code
      rt_KUNNR = wd_this->m_sel_opt->get_range_table_of_sel_field(
                                 i_id = 'KUNNR' ).
      assign rt_KUNNR->* to <fs_kunnr>.
      clear S_KUNNR.
      loop at <fs_kunnr> into S_KUNNR.
        wa_kunnr-sign   = S_KUNNR-sign.
        wa_kunnr-option = S_KUNNR-option.
        wa_kunnr-low    = S_KUNNR-low.
        wa_kunnr-high   = S_KUNNR-high.
        append wa_kunnr to it_kunnr.
      endloop.
    But it is giving dump.. Field symbol has not yet been assigned.  at kunnr. but kunnar is select-option.
    Any helps...
    Thanks
    venkat.

    Hi Lekha
    thanks for your reply,
    i tried this...
    data : rt_YEAR TYPE REF TO data,
             <fs_gjahr> TYPE table,
             fs_year TYPE TABLE OF FYAC. // Fiscal year only year(4).
    call method wd_this->m_sel_opt->GET_SELECTION_FIELD(
                                 EXPORTING
                                 i_id = 'GJAHR'
                                 IMPORTING
                                 ET_RESULT =  rt_YEAR ).
      assign rt_YEAR->* to <fs_gjahr>.
      move <fs_gjahr> to fs_year.
    rt_year is still initial, and getting dum field symbol is not assigned. any helps???
    Thanks,
    Venkat.

Maybe you are looking for

  • Mysql Variable issue

    I am passing a what will soon be my search variable into php from flash. The issue is when I need to search for something that needs to find a string value in quotes it fails. Below is the like field variable declared in flash LikeField = "Model_Prof

  • Kernel panic on battery only

    I have had several kernel panics in a couple of days, only when working on battery. Is this a hardware problem? Here's an excerpt of the log file: Thu Jun 28 21:48:08 2007 panic(cpu 0 caller 0x001A4A55): Unresolved kernel trap (CPU 0, Type 14=page fa

  • Installing apex on oracle se 10.2.0.1

    I am moving an application which was developed under oracle XE to Oracle SE 10.2.0.1. The application uses apex, which is bundled with XE, but not with 10.2.0.1. Where I would like to get to is to have apex 3.1.2 running on top of an Oracle 10.2.0.1.

  • Adobe Acrobat 8 Standard Full Install

    Upgrading a laptop... need the full install of Adobe Acrobat 8 Standard... I have the license #

  • MySQL and J2EE 1.4 AppServer

    Hi I was wondering if anyone has gotten MySQL to work with CMP EJB's on the J2EE 1.4 AppServer? This is my story so far. Using the admin console I created a new Connection Pool named MySQL, it uses the com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoo