Check Value of Selected Item

I select an item from table, what syntax do i have to use to know if the last digit of the value i selected is equal to 6 to 9?and how can i append value from that selected item

Hi,
u can use like this....
SELECT *
             FROM <dbtab>
             INTO TABLE itab
             WHERE <fldname> LIKE '%6'
             OR <fldname> LIKE '%7'
             OR <fldname> LIKE '%8'
             OR <fldname> LIKE '%9'
and for the Appending part..
SELECT *
             FROM <dbtab>
             APPENDING TABLE itab
             WHERE <fldname> LIKE '%6'
             OR <fldname> LIKE '%7'
             OR <fldname> LIKE '%8'
             OR <fldname> LIKE '%9'
Edited by: Sukriti Saha on Oct 24, 2008 9:25 AM

Similar Messages

  • Previous Values of Selected Items in a Datagrid

    I have a datagrid which the dataprovider is bound to an ArrayCollection of Value Objects from a web service.
    One other thing which is important to point out.   The Value Objects are created automatically for the Data/Service and so if I change the files, they will just be overwritten the next time I make a change to the service.
    The grid displays Inventory Items.    Lets say that Item 1 has a qty of 20.   Item 5 has a Qty of 10.
    The list in this grid is based upon the selection of a Location tree.   So it lists the inventory items for a certain location.
    I also have a second tree and grid for the to location inventory items.
    Between the two grids, there is a button which when clicked it iterates thru the selected items and creates a new item in the to list with qty 1 and saves it.  then decreases the current qty in the from list by one.
    So lets say I selected items 1 and 5 and then clicked the button.   A new copy of Items 1 and 5 are created in the to list with a qty of 1 and then saved.   Then the qty in the from list is decreased by 1 and saved and so the vales for 1 is now 19 and for 5 is 9.
    I would like to be able to change the qty in the from list to the qty I want to move.   So when the button is clicked the new item in the to list reflects the new qty and is saved.   Then the previous value of the current qty is decreased by the qty which is displayed in the grid
    So lets say I changed item 1 to 2 and Item 5 to 3 and then selected items 1 and 5 and then clicked the button.   A new copy of Items 1 and 5 are created in the to list with a qty of 2 for item 1 and 3 for item 5 and then saved.   Then the qty in the from list is decreased for Item 1 by 2 and item 5 by 3 and so now Item 1s qty is now 18 and items 5 qty is now 7.
    My first thought was if I had the previous values stored then no big deal.  But I put a break point at the point where the SelectedItems list is being iterated through and the previous values are not stored anywhere. 
    Any suggestions for this?

    ...in the mean time, this should be enough
    win.pnl.list1.onChange = function() {
         alert(this.selection.index); // for this to work set, multiselect:false
    I guess you already tried and the result is "undefined", the reason is you have this property
    multiselect:true
    in that case, selection returns an array,
    this.selection[0].index;
    would give you the first selected item, even if you only have one item selected, to get all selected items loop thru all items in the selection array.
    not sure if Peter's wonderful guide explains this (it is explained in the Tools Guide), but you should read it too, it has tons of great info.

  • Using value of selected item list

    I'm working on existing code. I want to use the value of a selected item in a list to use it in a query. So, the corresponding records should be displayed in a subform when an item of the list is selected. This is the code i'm using:
    This is the code i use to populate the list
    DECLARE
    locatienaam varchar(100);
    locid number;
    recordcount number;
    i number;
    correct NUMBER;
    hList ITEM := Find_Item('LIST_LOCATIE');
    iRC PLS_INTEGER := 0;
    currValue VARCHAR2(60); /* increase if required*/
    BEGIN
    --vraag het bijhorende ID op van de geselecteerde locatie.
    currValue := Name_In('LIST_LOCATIE');
    FOR i IN 1..Get_List_Element_Count(hList) LOOP
    IF currValue = Get_List_Element_Value(hList,i) THEN
    iRC := i;
    break;
    END IF;
    END LOOP;
    locid := GET_LIST_ELEMENT_VALUE('LIST_LOCATIE', iRC);
    locatienaam := GET_LIST_ELEMENT_LABEL('LIST_LOCATIE', iRC);
    Below the code i use to make the query
    SET_BLOCK_PROPERTY('V_KALENDER',DEFAULT_WHERE,'(BEGINDATUM BETWEEN '||''''||:V_KALENDER.TIJDSTIP1 ||'''AND '||''''||:V_KALENDER.TIJDSTIP2||''') AND (NAAM=:locatienaam)');
    GO_BLOCK('V_KALENDER');
    Execute_Query;
    I get the message: "unable to resolve reference to locatienaam"
    The subform is populated with all the records between the two dates of all the locations, not only by the selected location.

    Hi,
    Welcome to the forum!
    If locatienaam is a local variable, don't use a colon (:) to reference it.
    You didn't say
    IF :currValue = Get_List_Element_Value(:hList,:i) THEN so why should you say
    :locatienaam?

  • Check value in select-options

    Hello,
    how can i check, if a certain value is in a select-option range,
    f.e. check if value '1000' is in s_matnr (s_matnr for mara-matnr)
    Thanks,
    TomSd

    Hi Thomas Strehle ,
    Do the checking in AT SELECTION SCREEN.
    S_MATNR will have two fields LOW and HIGH.
    HIGH value wont accept if the low value is empty.
    So Check with the low value.
    select single * from mara where matnr in s_matnr
    this will take the range if both the low and high value is given
    else if only low is given "=" is taken
    else if no value is given it will fetch all the values
    Or
    select single * from mara where matnr = s_matnr-low
    this will fetch only if the value in low is present.
    for all other option it wont fetch.
    choose any according to your requirement.
    validation has to be done in  AT SELECTION SCREEN.
    if you do it in other events and had to display a error message.
    It wont allow the user to correct the entry and rerun the program.

  • Retrieving value of selected item in sap.m.list

    var data = {
                    details :   [{             
                 Name : "MuthuKannan",  Age : "22",Location :"Bangalore" },
              {  Name : "Sachin Tendulkar",  Age : "35", Location :"Mumbai"  },
    var model = new sap.ui.model.json.JSONModel();
    model.setData(data);
    var model1 = new sap.ui.model.json.JSONModel(); 
    model1.setData({ 
             col1 : "Name ", 
             col2 : "Age", 
             col3  : "Location "
    sap.ui.getCore().setModel(model1, "mkModel1");
    list = new sap.m.List("", { 
                  threshold: 2,
                  inset : false, 
                  select :  function(){
             a = list.getSelectedItems();
                 alert(a[0].getBindingContext());
    How can I get the name of selected item? I tried the highlighted text but I am unable to proceed ,I even tried toString() function still I am not getting the output.All I am getting(alert box)  is either "null" or "undefined". Kindly help me on this.
    Thanks and Regards,
    Muthu Kannan S

    Try this
    list = new sap.m.List("", {
                  threshold: 2,
                  inset : false,
                  select :  function(oEvent){
                     // oEvent is the key to access everything
                     oEvent.getSource().getSelectedItem() ;

  • How to get the display value of selected item in list box?

    I have a page with an HtmlSelectOneListbox that is filled with an ArrayList of SelectItem objects.
    The SelectItem objects contain a Key and Value. The Value is displayed in the ListBox.
    The value parameter of the listbox is bound to a bean property which is called selectedListItem.
    The bean property selectedListItem contains the Key of the SelectItem that is selected.
    How do I obtain the Value of the selectedListItem?
    I need to be able to get the Value field that is displayed, not just the Key to the item that is displayed.
    Edited by: burferd on Nov 3, 2007 10:03 PM

    How are you filling in the value of the menu? Obtain it back by the same way. Or pass it along the key in a object.
    This article may give useful insights: http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html

  • FM to check values in select option

    Hi Experts ,
    I want to compare values entered in select option with certain constant values. Is there any FM which will do this?
    Thanks & Regards ,
    Jigar Thakkar

    I believe that there is no such FM. You need to build a range for your constant values and then compare your select option with the range build for constants.
    Eg.
    select-options: s_werks for t001w-werks.
    ranges r_werks for t001-werks.
    r_werks-sign = 'I'.
    r_werks-option = 'EQ'.
    r_werks-low = '2101'.   "Pass the constant value.
    append r_werks.         "Range built for one entry 2101. Similarly append further constant values.
    *Check if select option contains any of the constant values.
    if s_werks in r_werks.
    * Select-options contains value as defined in range
    else.
    * No matching value found.
    endif.

  • How to acquire display value of selected item on select list? Or...

    I have a select list generated from a SQL query that I need to get the display value from.
    Ideally, the display value and the submitted value of the select list would have been the same, but I can't seem to get APEX to allow populating a select list's display value and submitted value fields with the same database column.
    If you have any idea how to do either of the above, I'd love to hear from you here!
    Cheers,
    Ben

    you forgot the extra quotes I guess:
    declare
    l_sql VARCHAR2(4000);
    begin
    l_sql := 'SELECT product_name,project_name,information_access_system,dataset_name FROM v_dms_product WHERE product_name = ''' || :P24_CHOOSEPRODUCT || ''' GROUP BY product_name,project_name,information_access_system,dataset_name';
    return l_sql;
    end;

  • How to Captured Value into Select-Options Range Table Without "Enter"

    Hi,
    I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
    However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
    Any solution for this issue? Please help.

    Hi Kris,
    My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
    I am using this logic to capture the value for selection item:
      wd_this->m_helper->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Values From Selection Screen
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PERNR`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
          WHEN `BUKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
          WHEN `STAT2`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
          WHEN `WERKS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
          WHEN `BTRTL`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
          WHEN `PERSG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
          WHEN `PERSK`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
          WHEN `ABKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
          WHEN `BEGDA`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
        ENDCASE.
      ENDLOOP.
    E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
    Edited by: Girish Nabar on Apr 21, 2011 8:55 AM

  • "Always Use Selected Format" check box in line items report

    Hi Experts,
    I have an issue in ECC 6.0.
    From the transaction code FBL1N (Vendor Line Items) I am trying to export the report to spreadsheet by selecting the option  List> Export>Spreadsheet  then I have selected "Always Use Selected Format" check box.  But if I execute the same report again I am not getting this option "Always Use Selected Format". Please let me how can we retrieve that option. Is there any possibility to get that option again either functionally or technically. I would like to know all the possible ways to get this option again.
    Please do the needful.

    Hello,
    In one my thread Mr. Frank has replied as follows. I believe he has solved this.
    Hope this may be really helpful.
    The problem with the spreadsheet download is at one point, users have selected their default file type.
    That said, SAPGUI is working as it should. (gui710)
    Question though is how do we reset the values so they get the ?Select Spreadsheet Format? popup again.
    The following steps should be performed :
    - Call transaction SE38, enter program SALV_BS_ADMIN_MAINTAIN, and press F8.
    - Follow the parameters below :
    - Select ?DELETE? on the Actions Group
    - Select ?DETAILED SELECTION? on the General Data :
    - On Client - your number
    - User : <user name>
    -Hit EXECUTE.
    -Press ENTER on the POPUP
    - If there is an entry in the report that will need to be deleted. Also, make sure that the entry you will delete (for the user) has a value of GUI_ALV_XML_VER on field ?Parameter? .
    - Select the line and hit the DELETE icon .
    - Press ?Y? to continue delete. Press ENTER on the popup.
    - Then EXIT all the way out of the program.
    NOTE : When you run program SALV_BS_ADMIN_MAINTAIN, make sure they are out of any program that they are using for download.
    Re: "Always Use Selected Format" check box in line items report
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on May 15, 2009 2:31 PM

  • ADF Tree with Boolean Check Box: How to find selected items

    Hi Experts,
    ADF: 11.1.1.5.0
    WLS: 10.3.6
    I am using an ADF Tree which contains elements at two levels (say Departments and Employees). My requirement is to give provision for user to select Departments and Employees using the check boxes. User should be able to select what ever Departments he/she likes and what ever employees he/she likes. There should not be a provision to select Employee with out selecting the corresponding Department (root node in the tree).
    I am facing the below issues while trying to implement this use case:
    1. Always, only the first master record will be expanded by default (I am using "Display Row" property value as "default" and "ExpandAllEnabled" as "true"). My need is to expand all the master records by default. So that user need not explicitly expand each master record node and then select the associated child records.
    2. Currently, I am using value change listener associated to af:selectBooleanCheckBox to identify the Departments and Employee records that have been selected. Since not all departments (masters) are expanded by default, if user selects the check box of department (master) and then expands the department node, automatically all the employees of that department are selected. But, this event is not triggering the value change listener for the employee records. Because of this, after a department node is selected and then expanded, all the child elements' check boxes are selected but the events are not generated. Hence, I am not able to capture the selection of employee records.
    To summarize,
    1. Please let me know how to expand all master nodes in af:Tree by default.
    2. Please let me know the best approach to identify the selected items (both master and detail items) in the af:Tree component using af:selectBooleanCheckBox.
    Thanks in advance,
    Rathnam

    Hi,
                Can you please elaborate the solution? I have a similar problem in
    https://forums.oracle.com/thread/2579664

  • How to refresh page after selecting value from LOV item , in a tabular form

    Hi ,
    I have a tabular form, which contains 2 items(columns), of type "Select List - named LoV".
    Now, couple of issues here.
    1.
    2nd item(column) in tabular form, that LoV should get populated based user's selection value in first item LoV. So how do i refer to the value, that user selected in first item's LoV? I will have to use this reference in LoV query of my 2nd item ( on this tabular form)
    2.
    How can we refresh the page, when user selectes value in first item ( from LoV). As this is a tabular form, here item type is Select List, we dont have an option to pick item type as Select List with Submit. So problem is that when user selects value for item 1, refresh does not happen and item 2 LoV does not get populated as per user's selection in item 1.
    Please help here. Would be really appreciated.
    Thanks and Regards,
    Rave.

    Thanks Ben and Dan for your responses.
    Ben, your solution helped me with refresh of page, as page got submitted.
    This answers to my 2nd question. However, I still need to know first question, which basically is, how do i refer to the value, that user selected in first item LoV.
    Issue is, I selected the value in first item LoV, it got submitted and page fot refreshed. But after page refresh, first item LoV loses its value that I had selected last time. It does not retain the selected value after refresh.
    I have an unconditional process, that on every submit(refresh) of page, I set my items with their corresponding values. But problem is what do i mention there to refer to this item.
    I looked in view source of my page, this item is referred as f03.
    So i used "apex_application.g_f03", to set this item to its value, in my uncoditional submit process. But it did not work. I tried to refer this item as "f03" in this unconditional submit process. But still it did not help, the selected item loses its value after page refresh(submit).
    Any help here would be really appreciated. Please suggest how do we refer to this item's selected value.
    Thanks and Regards,
    Ravi.

  • Could not find selected item matching value "null" in CoreSelectOneRadio

    Hello,
    I get the following error with my selectOneChoice components:
    WARNING Could not find selected item matching value "null" in CoreSelectOneRadio[UIXEditableFacesBeanImpl, id=dyna_2709976_11]
    It seem that the component looks for a selectItem object qith its value set to null, so I tried to add one with a null value to no avail. The error don't cause any problem on the rendered page but it might spam the log when many users will be connected. Anyone every got this error and found a fix to stop it from appearing?
    Regards,
    Simon Lessard

    you said you're using selectOneChoice but the error says radio. Is the information correct?

  • Could not find selected item matching value "New" warning message in ADF

    Hi,
    I have a selectOneChoice1 for a field which has the following fixed values in it. And while creating it, I selected the 'SelctionRequired' option so that this field will always have a value.
    New
    Pending
    Completed.
    While navigating to this page, I am trying to set the value to 'New' (Retrieved from the DB) in the backing bean. But when the page is rendered, the above field is empty with the above options in the list and jdev has the follwing error message in its log.
    WARNING: Could not find selected item matching value "New" in CoreSelectOneChoice[UIXEditableFacesBeanImpl, id=selectOneChoice1]
    Can any one help me with this issue?
    Thanks,
    Priya

    The value of a list binding is the zero-based integer position in the list that is selected, not the actual underlying value.
    The simplest way to set the value of an attribute is to use an attribute binding (which can be bound to the same attribute as the list binding). When you set the value of an attribute binding, it sets the value as you supply it. Otherwise, you'd need to set the list binding's value to the numerical "slot" number of the one you want to change the value to.

  • How to get selected item value and display text in selectOneChoice ?

    Hi
    Thank you for reading my post
    I bind the a selectOneChoice component to my backing bean so i have an object which represent this component in the backing bean.
    now i need to find which item is selected by use , i know that i can use
    getSelect_service().getValue.toString() , but it will return the value of the selected item, how about its display text ?
    I should say that i create an static list for selectOneChoice items.
    thanks

    Using JDeveloper 10.1.3.1, freshly downloaded off OTN. I used the following code to try and identify the problem you are encountering. I attempted to use a valueChangeListener in combination with af:selectOneChoice components that use SelectItems and the singular SelectItem. I could not reproduce the error in either case. Please post more information about your development environment.
              <af:selectOneChoice label="Label 1"
                                  binding="#{backing_test.selectOneChoice1}"
                                  id="selectOneChoice1"
                                  valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <af:selectItem label="1" value="1"
                               binding="#{backing_test.selectItem1}"
                               id="selectItem1"/>
                <af:selectItem label="2" value="2"
                               binding="#{backing_test.selectItem2}"
                               id="selectItem2"/>
                <af:selectItem label="3" value="3"
                               binding="#{backing_test.selectItem3}"
                               id="selectItem3"/>
              </af:selectOneChoice>
              <af:selectOneChoice label="Label 2"
                                  binding="#{backing_test.selectOneChoice2}"
                                  id="selectOneChoice2"                              valueChangeListener="#{backing_test.valueChangeListener}"
                                  autoSubmit="true" immediate="true">
                <f:selectItems value="#{backing_test.items}"
                               binding="#{backing_test.selectItems1}"
                               id="selectItems1"/>
              </af:selectOneChoice>
        public void valueChangeListener(ValueChangeEvent evt){
            // returns a UISelectOneChoice object
            System.out.println(evt.getSource().getClass().getName());
            // returns a string
            System.out.println(evt.getNewValue().getClass().getName());
        public Map getItems(){
            items = new HashMap();
            items.put("11","11");
            items.put("12","12");
            items.put("13","13");
            return items;
        }

Maybe you are looking for