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

Similar Messages

  • How can i pass calculated value to internal table

    Hi
    i have to pass calculated value into internal table
    below field are coming from database view and i' m passing view data into iznew1
    fields of iznew1
                 LIFNR  LIKE EKKO-LIFNR,
                 EBELN  LIKE EKKO-EBELN,
                 VGABE  LIKE EKBE-VGABE,
                 EBELP  LIKE EKBE-EBELP,
                 BELNR  LIKE EKBE-BELNR,
                 MATNR  LIKE EKPO-MATNR,
                 TXZ01  LIKE EKPO-TXZ01,
            PS_PSP_PNR  LIKE EKKN-PS_PSP_PNR,
                 KOSTL  LIKE EKKN-KOSTL,
                 NAME1  LIKE LFA1-NAME1,
                 NAME2  LIKE LFA1-NAME2,
                 WERKS  LIKE EKPO-WERKS,
                 NETWR  LIKE EKPO-NETWR,
                 KNUMV  LIKE EKKO-KNUMV,
                 GJAHR  LIKE EKBE-GJAHR,
    and now i want to pass
    one field ED1  which i has calculated separatly and i want to pass this value into iznew1
    but error is coming that iznew1 is a table with out header line  has no component like ED1.
    so how can i pass calculated value to internal table iznew1,

    When you declare your internal table , make an addtion occurs 0
    eg . data : begin of iznew occurs 0 ,
                    fields ...
       add the field here ed1.
               end of iznew.
    now when you are calculating the value of ed1,
    you can pass the corresponding value of  ed1 and modify table iznew.
    eg
    loop at iznew.
    iznew-ed1 = ed1.
    modify iznew.
    endloop.

  • How to insert select columns from one internal table to another

    Hi,
    How to insert select columns from one internal table to another based on condition as we do from a standart table to internal table.
    regards,
    Sriram

    Hi,
    If your question is for copying data from 1 int table to other ;
    we can use
    APPEND LINES OF it_1 TO it_2.
    or if they have different columns then:
    loop at it_1 into wa_it1.
    move wa_it1-data to wa_it2-d1.
    apped wa_it2 to it_2.
    clear wa_it2.
    endloop.
    thnxz

  • 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

  • How to make select-option for one inner table

    Hi,
    Who can teach me to  make select-option for a inner table, which let select-option display data from this inner table.
    Thanks in advance.

    Is this what you are looking for?
    report zrich_0002.
    data: begin of itab occurs 0,
          matnr type mara-matnr,
          spras type makt-spras,
          maktx type makt-maktx,
          end of itab.
    select-options: s_matnr for itab-matnr.
    select-options: s_spras for itab-spras.
    start-of-selection.
      select mara~matnr makt~spras makt~maktx
               into corresponding fields of table itab
                      from mara
                            inner join makt
                               on mara~matnr = makt~matnr
                                        where mara~matnr in s_matnr
                                          and makt~spras in s_spras.
      check sy-subrc = 0.
    Regards,
    Rich Heilman

  • How to read select-option values

    Hi Experts
    I have a requirement where in I need to provide F4 help for a parameter on selection screen for the entries in a select-option on the same screen.  Here I need to get the value of select-option and based on that I need to provide f4 help.  Please let me know if any one came across such scenario as to how we can read the values on the same screen.
    Venkat

    Here's one I used
      CLEAR d_line.
      IF s_div IS INITIAL.
        d_line-fldname = fldname.
        d_line-sign = 'Include'.
        d_line-low  = 'All'.
        WRITE:/ d_line.
      ELSE.
        LOOP AT s_div.
          PERFORM display_selection_detail
            USING fldname s_div-sign s_div-option
                          s_div-low  s_div-high.
          CLEAR fldname.
        ENDLOOP.
      ENDIF.
    *&      Form  display_selection_detail
    *       text
    *      -->P_FLDNAME  text
    *      -->P_SIGN  text
    *      -->P_OPTION  text
    *      -->P_LOW  text
    *      -->P_HIGH  text
    FORM display_selection_detail USING    p_fldname
                                           p_sign
                                           p_option
                                           p_low
                                           p_high.
      CLEAR d_line.
      d_line-fldname = p_fldname.
      CASE p_sign.
        WHEN 'I'.
          d_line-sign = 'Include'.
        WHEN 'E'.
          d_line-sign = 'Exclude'.
        WHEN OTHERS.
          d_line-sign = p_sign.
      ENDCASE.
      CASE p_option.
        WHEN 'EQ'.
          d_line-option = 'Equal'.
        WHEN 'NE'.
          d_line-option = 'Not Equal'.
        WHEN 'BT'.
          d_line-option = 'Between'.
        WHEN 'GE'.
          d_line-option = 'Great Than or Equal'.
        WHEN 'LE'.
          d_line-option = 'Less Than or Equal'.
        WHEN 'GT'.
          d_line-option = 'Great Than'.
        WHEN 'LT'.
          d_line-option = 'Less Than'.
        WHEN OTHERS.
          d_line-option = p_option.
      ENDCASE.
      d_line-low  = p_low.
      d_line-high  = p_high.
      WRITE:/ d_line.
    ENDFORM.                    " display_selection_detail

  • Retriving the vaue given in select options in an internal table.

    Hi all,
    I have a requirement of using & printing the multiple values of country given in Select -options by the user.
    I have given the select -options statement as :
    s_ctry           FOR v_country obligatory.         (for selection screen)
    SO now i want to work on the values (input by user on screen) given either in the multiple selection tab(the arrow option that will come on screen) or in the range option(that too will come on screeen when i give the above statement)
    I will be putting these screen values in a work area and then will append into an internal table like this:                wa_country-country = s_ctry-low.
                                APPEND wa_country TO it_country
    How to retrive these values (values of s_ctry) so that i can work on them.

    HI,
    Go through this documentation ..
    The basic form of the SELECT-OPTIONS statement is as follows:
    SELECT-OPTIONS <seltab> FOR <f>.
    It declares a selection criterion <seltab> that is linked to a field <f> that has already been declared locally in the program. The names of selection criteria are currently restricted to eight characters. Valid data types of <f> include all elementary ABAP types except data type F. You cannot use data type F, references and aggregate types. If you want to use the selection criterion to restrict database selections, it is a good idea to declare <f> with reference to a column of the corresponding database table. It then inherits all of the attributes of the data type already defined in the ABAP Dictionary. In particular, the field help (F1) and the possible entries help (F4) defined for these fields in the Dictionary are available to the user on the selection screen.
    The selection table, which has the same name as the selection criterion, <seltab>, is usually filled by the user on the selection screen or by calling programs. You can also process the selection table like any other internal table in the program.
    REPORT DEMO.
    DATA WA_CARRID TYPE SPFLI-CARRID.
    SELECT-OPTIONS AIRLINE FOR WA_CARRID.
    LOOP AT AIRLINE.
      WRITE: / 'SIGN:',   AIRLINE-SIGN,
               'OPTION:', AIRLINE-OPTION,
               'LOW:',    AIRLINE-LOW,
               'HIGH:',   AIRLINE-HIGH.
    ENDLOOP.

  • SELECT-OPTIONS sel FOR Internal Table

    Hello,
    I would like to use select-options. Normally you can specify a selection tab (sel) and a row of an table being registered in the ABAP dictionary.
    I would like to use an internal table instead.
    First I read data into the internal table. Next I would refer on one column of that internal using the select-options:
    SELECT * FROM database-tab INTO itab
    WHERE key1 = 'a'.
    SELECT-OPTIONS: sel FOR itab.
    It does not work, although the internal table is filled!!!
    Can I use internal tables with select-options?
    thx, holger

    Hallo Holger,
    i think i get it now - thanks Amit !
    here's an example:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR matnr-low.
      SELECT matnr maktg FROM m_mat1t
      INTO CORRESPONDING FIELDS OF TABLE f4_itab
      WHERE mtart = 'DIEN'.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield     = 'MATNR'
                dynpprog     = sy-repid
                dynpnr       = sy-dynnr
                dynprofield  = 'MATNR'
                window_title = 'select material no.'
                value_org    = 'S'
           TABLES
                value_tab    = f4_itab[].
    Andreas

  • Regarding passing selection screen values into internal table

    Hi,
    I have created one selection screen with fields
    <b>POSNR LIKE VBAP-POSNR</b>
    <b>SELECT-OPTIONS: s_posnr FOR vbap-posnr.</b>
    I had created one internal table as:
    <b>DATA: BEGIN OF i_item OCCURS 0,
            posnr     LIKE vbap-posnr,
          END OF i_item.</b>
    Now what i want is to pass what ever entries available in <b>s_posnr into i_item</b> internal table.
    If user gives 10 in select-screen i_item should have 10,
    If user gives 10 to 30 in select-screen i_item should have 10,20,30 entries.
    If user gives nothing in s_posnr of selection screen
    then i_item should have all the valid item no's[POSNR's]
    from respective sales order.
    Can anybody tell me how can i solve this issue!
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hi Prasad,
    I guess somewhere on your selection screen there is also a parameter for sales order (eg. pa_vbeln)?
    Then:
    SELECT posnr
          FROM vbap
          INTO TABLE i_item
         WHERE vbeln EQ pa_vbeln
           AND posnr IN s_posnr.
    Will get all position numbers in your internal table.
    Regards,
    John.

  • How to get selected row values in a table using check box

    Hi ADF Experts,
    JDEV Version 11.1.1.7.0
    My requirement is getting the selected row valuesof a af:table using a checkbox(multi select).
    Thanks,
    Animesh

    Hi,
    add a transient attribute to the POJO entity and update this through a check box. The ensure you have autosubmit=true set on the check box. In a value change listener set or remove the row's checbox attribute value
    Frank

  • 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

  • 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

  • HOW TO PASS SELECT-OPTIONS AS IMPORT PARAMETER TO A CLASS

    Hi experts,how to pass select options value as a export parameters to a zclass.
    can  give me some idea.
    Thanks
    sai

    As Sachin already said, selection options are stored in an internal table. You can reconstruct the table type without the corresponding input fields using the type addition RANGE OF.
    So - assuming you have the following in your program:
    DATA: wa TYPE sflight.
            SELECT-OPTIONS so_car FOR sflight-carrid.
    you can create a publically-visible type in your class using direct type entry and the code
    TYPES: my_selectoption TYPE RANGE OF sflight-carrid.
    and use this to define the importing parameter of the method.
    The only other thing you have to remember is that select-options generates an internal table with header line. Thereore, to pass the table to the method, you would use (in the above example) so_car[], and not just the name of the select-option.
    Hope this helps.
    Regards
    Jon.

  • 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 select data from an internal table

    material                          norm                    date last modified
    B2-SP HEAT                 50.000               20090420
    BF COKE                                 575.000               20090419
    GROSS COKE                 200.000               20090419
    B2-SP HEAT                 100.000               20090419
    TWT                                 33.000               20090330
    B7-SP HEAT                 2.000               20090310
    B1-SP HEAT                 1.000               20090309
    B7-SP HEAT                 615.000               20090308
    B2-SP HEAT                 585.000               20090308
    B1-SP HEAT                 100.000               20090308
    B3-SP HEAT                 610.000               20090308
    BF COKE                                 68.500               20090308
    GROSS COKE                 72.600               20090308
    B8-SP HEAT                 600.000               20090308
    B9-SP HEAT                 625.000               20090308
    BX-SP HEAT                 615.000               20090308
    B9-SP HEAT                 58.000               20090307
    B1-SP HEAT                 100.000               20090307
    B6-SP HEAT                 350.000               20090306
    B2-SP HEAT                 888.000               20090306
    Like above there r numerous data in a table :
    how will i select data into another internal table where material above is not repeated with latest modified date.please help.

    Hi Sonu,
    The main task is to move the contents of the one internal table to another with some condition.
    First sort and delete the duplicate entries from the First Internal table like below : 
    sort it_tab by material ascending date_modified descending.
    delete adjacent duplicates from it_tab.
    Then move that Internal table contents to another internal table.
    Define another internal table with the same structure as you have first internal table and then
    Second Step :
    it_itab1 = it_itab.
    If you are using seperate Header line and Body then you can do like below :
           it_itab1[] = it_itab[].
    This will fix the issue.
    Please let me know if you need any further explonation.
    Regards,
    Kittu
    Edited by: Kittu on Apr 24, 2009 12:21 PM

Maybe you are looking for

  • IPod Classic will not sync since installed iTunes 11

    iPod Classic will not sync properly since installed new iTunes. Always stops at or around song 2 and just hangs there, even if left all night. Tried restoring the iPod, made no difference. Tried syncing just some songs, sometimes it will do 20 or so

  • Price analysis by material type

    Hi Gurus, is there a tcode that would include a price analysis for materials over time.  It should be able to be sorted by supplier, material type & material group.   The main objective is to follow the price trend over time Thanks Anusha

  • How to get user name of user who uploaded to the Knowledge Directory?

    Greetings, How can I find out who uploaded a document to the Knowledge Directory? My users want to know who uploaded the documents they are viewing in the KD. I hope there is some option other then creating "Related Experts" for each folder. The Coll

  • Slideshow problems on secondary monitor

    When i hook up my laptop up to a larger monitor Lightroom works fine but then when i click slideshow the large monitor just goes black and the slideshow reverts back to the laptop. Does anybody know of a way i can get the slideshow to show on the lar

  • Block recovery why it needs so many archive dlogs

    Subject: Why does block recovery needs so many archived logs My blocks were corrupted on Sept 8 (looking at rman backup log). I am doing recover datafile 19 block 321, 322, 385, 513, 577 restore until time 'sysdate - 15'; I am finding that this comma