Query-Select Item Code ending in 'NI'

How do I select an Item Code ending in 'NI'?

Hi Daniel,
Please check below query which will give you Item ending with 'NI'
SELECT T0.[ItemCode], T0.[ItemName] FROM OITM T0 WHERE T0.[ItemCode] LIKE '%NI'
Hope this help
Regards::::
Atul Chakraborty

Similar Messages

  • Item Code Problem

    HI Everyone,
    When you try to select item code when invoicing or sales order and when you are in item code selection, it doesn't pop up or load,
    Any idea regarding this problem
    P.S. only one usercode account is affected.
    Thanks

    Hi,
    Whenever only one user is affected, you need to check the user profile.  The easy solution is recreate a new user id, lock the old user.  If anything that makes it unreasonable, you may need to spend more times to investigate every single part of authorization/form setting issues to this user code.
    Thanks,
    Gordon

  • Select item in list box using code

    We use Adobe Workflow v5. I am creating a Check Request application where users type information into various fields and when they click Add, the data is added to a List Box. Also when they click Add, if the current item is >$1,000, a query searches our accounting database to see if the client has outstanding AR older than 90 days. If they do, another list box is displayed with the client name and amount of outstanding AR.
    If that clientnum is already in the second list box, it does not add another one.
    To delete a record from the first list box, the users select the item in the first list box, and then click a Delete button. That deletes the
    record in the first list box.
    I am also trying to delete the record from the second list box but am not sure how to select it using code. As part of the Delete button code, if the currently selected item (the one they want to delete) is >$1,000, I go through each row of the first list box to see if clnum.text (field in the form where the record to be deleted is now displayed) matches the client number in column 4 of any row of the first list box. If it does, I see if the amount of the item in the first list box is >$1000.
    If it is, then I know that there is a corresponding record in the second list box.
    Here is some of the code:
    'go through each row in first list box
    For irow = 1 to lstExp.ListCount
    'set clientnum variable equal to client # in row in first list box
    clientnum = lstExp.RetrieveItem(irow,4)
    'if clientnum variable is equal to client # to be deleted from first list box (selected record - client # in clnum.text now)
    if clientnum = trim(clnum.text) then
    'if amt is >$1,000 in first list box
    if lstExp.RetrieveItem(irow,10) > 1000 then
    'don't delete row because there is another record in first list box
    DeleteOutAR = "N"
    else
    'delete row because there is NOT another record in first list box.
    DeleteOutAR = "Y"
    end if
    end if
    Next
    Here is the code I need help with. I am unsure how to select the record in the second list box so I can delete it.
    if DeleteOutAR = "Y" then
    'go to second list box ?
    form.GoToField(lstOutARUnbilled)
    'start going through second list box looking for clientnum
    For irow2 = 1 to lstOutARUnbilled.ListCount
    if clientnum = lstOutARUnbilled.RetrieveItem(irow2,1) then
    irow2 = lstOutARUnbilled.CurrentSelection
    lstOutARUnbilled.Removeitem (irow2)
    end if
    next
    end if
    So my question is, how can I move to the second list box to actually delete the record?
    Thank you in advance for any help.
    Mary

    Mary-
    The solution could either be quite easy or difficult dependent upon how the data is arranged in the subsequent list box.
    Basically, if there is any sort of corresponding or matching entries, meaning line 1 from list box #1 matches with line 1 of listbox #2, then you would simply execute the following...
    "listbox#2.RemoveItem listbox#1.CurrentSelection"
    Or if you have a column that would contain the same values, say an index, then you could just loop thru the 2nd listbox searching for that index and once found remove the line...
    "listbox#2.RemoveItem nRow"
    , where nRow would be the line that you discovered to have the matching index.

  • Query on Multi-select Item and STRING_TO_TABLE

    Hi everyone - here's the scoop:
    I've got a multi-select item on a US state field that returns one or more state ID selected (eg. '15:26:49'). I want to use that to find rows in a table where the state ID is one of those values. State ID is indexed and I want to ensure that the index can be used, so I don't want to be doing "where instr(...)".
    I read a post on Ask Tom - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:110612348061 - where he parses a string of values into a table that can be used in an IN clause, thus allowing use of the index.
    Here's my question - I'd like to take advantage of APEX_UTIL.STRING_TO_TABLE to do my parsing, but it returns APEX_APPLICATION_GLOBAL.VC_ARR2. I tried a bunch of different casts but couldn't make it work with a query done as per Tom Kyte's post. Ultimately I wrapped STRING_TO_TABLE and just "copy" the VC_ARR2 to a table of numbers, like this:
    create or replace function string_to_numtbl(p_string in varchar2, p_separator in varchar2 default ':')
    return num_table as
    l_data num_table := num_table();
    l_vc_arr2 APEX_APPLICATION_GLOBAL.VC_ARR2;
    begin
    l_vc_arr2 := APEX_UTIL.STRING_TO_TABLE(p_string, p_separator);
    FOR z IN 1..l_vc_arr2.count LOOP
    l_data.extend;
    l_data(l_data.count) := l_vc_arr2(z);
    END LOOP;
    return l_data;
    end;
    So I can use the multi-select to feed an IN clause. I'm still getting familiar with casts, but it seems to me thought that there ought to be a straighter path to allow the return of APEX_UTIL.STRING_TO_TABLE to be used in an IN.
    Any thoughts?

    VC_ARR2 is an index by table and in the Tom's example he is using a nested table which
    has a different structure and allows different operations. To make this short, you will not be
    able to use VC_ARR2 in a SQL statement. Yes, it would be good since ApEx has its own
    function to convert a string to a table and back. I have no problems using Tom's examle.
    Here, you will find some description on differences:
    http://www.unix.org.ua/orelly/oracle/prog2/ch19_09.htm
    and here, you may want to se the utilization of PL/SQL collections on my demo application:
    http://htmldb.oracle.com/pls/otn/f?p=31517:84
    http://htmldb.oracle.com/pls/otn/f?p=31517:87
    Denes Kubicek

  • A/R invoice Report Query selection by Items.

    Dear All,
    I need a A/R invoice  Report Query selection by Items.
    Thanx in advance!!!!!!!!

    Hi,
            Try this......
    Declare @Itemcode nvarchar(50)
    set @Itemcode = (select (T1.iTEMCODE) FROM INV1 T1 WHERE T1.ITEMCODE='[%0]')
    SELECT T0.DocNum, T0.DocStatus, T0.DocDate as 'Posting date',
    T0.TaxDate as 'Document Date', T0.CardCode as 'Customer Code',
    T0.CardName as 'Customer Name', T1.ItemCode, T1.Dscription as 'Item Name',
    T1.Quantity,T1.Price,T1.VatSum AS TAX,T1.LineTotal as Total
    FROM OINV T0
    INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    where T1.ItemCode =@Itemcode 

  • How to query if item is mutistate without selecting it

    Is it possible to query whether a page item is a multistate item without having to select it first?
    Currently I'm having to select it then call:
    InterfacePtr<IFormFieldSuite> formFieldSuite(SelectionUtils::QuerySuite<IFormFieldSuite>());
    bool16 multiState = (formFieldSuite && formFieldSuite->IsFieldSelectionOfType(kMultiStateObjectItemBoss));
    But I sometimes have to do this on several objects at once which leads to a lot of selection changes which I'd like to avoid.
    Thanks
    Liz

    K T,
    I completely missed that section of the forums, sorry
    Neil,
    I had that kind of script set up but it was like this:
    on run {input, parameters}
    tell application "Finder"
    kind of item parameters
    end tell
    end run
    And i just figured out that i had to change the first line to "on run {parameters}" and now it works great.
    Thanks for the help, it got me going in the right direction

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • Query a table using Multi Select Item

    Hi everyone!
    I got a page where I have this multiselect item, and I want to query a table using its values.
    For example: The Multiselect item has this values: 1,2,3,4,5,6,7,8,9 and 10
    And I want to query every person who has ID_CLASS 1,4,7 and 9 by selecting those IDs from the list, and when I click que Consult button the Report displays those persons.
    Whowever I can't accomplish this, I was trying to find a post about this without success.
    Can anybody help me with this?
    Thanks!!

    Hi,
    This is my problem, I select 2 or more options in the multiple select item, then after I click the "Consult" buttom it submits the page, however only 1 option is highlighted. For example I choose the first two options, then I click Consult and the page is submitted. After that only one of the 2 options are selected, but I need to get the 2 options highlighted as selected items.
    If I clear cache I think I'll lost everything. (selected items)
    Thanks again!

  • How to make a listbox selected item highlight color from code the same as if user click on item?

    Hi all,
    I have a listbox that gets filled with data when my program starts. I save the last selectedItem value so I set it when the program start again. But the color that the selected item has is not the same as if the user click on it (pictures below).
    The color when I set the selectedIndex=someItem is black on light grey (background)
    The color when the user clicks on the item is white on blue (background)
    Any way to make them both white on blue (background)?
    Thanks
    This is the user clicking on it:
    This is the code:

    I think the difference is focus.  When you use the mouse to select it also sets focus to the listbox so you would have to set focus to the listbox when you set the selected item.  How are you setting your selected item?  I think that by
    using a property to hold the selected item rather than setting the index that might also fix the problem.
    Lloyd Sheen

  • Sales doc items with the status CLSD ARE being selected for month-end

    We are working to improve month-end processing time for Sales Orders  We use SAPKKA12 to set CLSD status on line items
    SAP Help states: be sure that the status CLSD (closed) is set for all sales document items that you do not want to include in the period-end closing process. The sales document items with the status CLSD are then not selected for processing in the period-end closing process. Use report program SAPKKA12 to set the status.
    This use to work (in 4.0). I have been on other projects and just brought back to this after several years (now in 5.0).  Testing today shows that orders with CLSD status are being selected for month-end process.
    Any ideas why this is so?  System is selceting over 300,000 orders when well over half of them are set to CLSD.  I do get a message that the order is not relevant to processing, but selecting the order and logging the message take time. and the logs are VERY long.
    thanks

    Does any one else have this issue  that Sales documents with status CLSD are selected by RA (KKAK)?
    In just one of our jobs, i get this Basic List
    Perform actual results analysis      31273      
    Not relevant                                                 103894
    Error                                                        2306      
    Objects Selected                                    137,473
    75% of the orders are CLSD.  and the system is still counting them. (we do not out put information messages)
    I do understand that the orders are not analyzed,  but all documentaion states that CLSD status is not selected, and in our 5.0 system, they are selected.  In our 4.0 system, they were not selected.
    Does this truely work for anyone in a 5.0 system?
    Thanks
    Althea

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

  • Select Item Name

    Hi :
    I have a sql report in apex where the report is in page 15 but also there are multiple reports in other pages from page 10 to page 15 but the item is located in page10 as i select the item in page10 all the reports must redirects to it based on the item selected
    item name in page 10 is p10_projects
    plsql query is like this
    declare
         i number:=1;
         q varchar2(32676);
    BEGIN
    q := '
    SELECT pro.project_name
    FROM projects pro ';
    IF :P10_PROJECTS = 'ALL' THEN
    q := q||' AND pro.id = :P10_PROJECTSS ';
    END IF;
    IF :P10_PROJECTSS <> 0 THEN
    q := q||' AND pro.id = :P10_PROJECTS ';
    END IF;
    Return q
    End;
    now whts my requirement is like i also have a another item in page 15 called :p15_projects here in the report there must be a option like even if i select the item in page 15 the report must redirect to that base on this selection also
    please suggest me how to include this condition in the above query
    thanks
    sudhir

    You know this makes little sense, right?
    Ad-hoc reporting should be done at worst via Discoverer or a data warehouse solution, where the irrelevant fields can be hidden, foreign keys can bring code descriptions and everything can have nice names. More properly, it should be submitted to IT and they should determine how to produce the output the business requires. Letting users run queries directly against the database tables is almost always a bad idea. How does the user know if they want XPLV_BTCH_ID or not? They want to know details of sales made in a given period or how many widgets are in stock.That's what an IT department is for.

  • Item Code in Sales A/R

    We have all the Item Code with 6 digit with a leading zero..(e.g.  030351, 030201).  I want to write a query or a formatted search on item code where i can just type put the item code without '0' (e.g. 30351) and it will convert in to original item code (030351)
    i have written code...
    if len(itemcode) = 5 then
    select [RDR1.ITEMCODE] = REPLICATE(ITEMCODE),0,6)
    is this right?  Can you help me with this?

    Hello,
    The correct is:
    declare @ItemCode nvarchar(max)
    set @ItemCode = (select $[$38.1.0])
    select case when Len(@ItemCode) < 6 then
         (select right(replicate('0',6)+@ItemCode,6))
    else
         (select @ItemCode)
    end
    Regards,
    J

  • Display selected item from Listbox

    hi,
    i get <h:selectOneListbox> value from database, now i want to know which item is selected in the listbox
    my JSP code is
    <h:selectOneListbox binding="#{DynamicListBean.std_list_lbx}" id="std_list_lbx" immediate="true"
                                onchange="common_timeoutSubmitForm(this.form, 'std_list_lbx');" required="true" size="5"
                                style="height: 312px; left: 168px; top: 192px; position: absolute; width: 216px" value="#{DynamicListBean.selectedCategory1}" valueChangeListener="#{DynamicListBean.std_list_lbx_processValueChange}">
                                <f:selectItems id="listbox1SelectItems1" value="#{DynamicListBean.items1}"/>
                            </h:selectOneListbox>Java code is public String getSelectedCategory1() {    
            return selectedCategory1;
        public void setSelectedCategory1(String selectedCategory1) {
            this.selectedCategory1 = selectedCategory1;
    public void std_list_lbx_processValueChange(ValueChangeEvent vce) {
            connection();
            int n1 = 0;
            String a = "";
            if (con != null) {
                try {
                    stmt = con.createStatement();
                    String query = "select std_id, std_name from std_detail";
                    rs = stmt.executeQuery(query);
                    String iddata = "";
                    if (rs != null) {
                        while (rs.next()) {
                            iddata = rs.getString("std_id");
                      //      System.out.println(rs.getInt("std_id"));
                            stmt1 = con.createStatement();
                            String query1 = "select chpt_detail from chapter_detail right outer join std_detail on chapter_detail.std_id = std_detail.std_id where chapter_detail.std_id = " + iddata + " ";
                            String data3 = "";
                            rs1 = stmt1.executeQuery(query1);
                            if (rs1 != null) {
                                while (rs1.next()) {
                                    data3 = rs1.getString("chpt_detail");
                                    chpt_lst_lbx.setValue(data3);
                                    dList2.add(data3);
                                stmt1.close();
                                rs1.close();
                                List selectItems = new ArrayList();
                                Iterator it = dList2.listIterator();
                                while (it.hasNext()) {
                                    String label = (String) it.next();
                                    chpt_lst_lbx.setValue(label);
                                    selectItems.add(new SelectItem(label));
                                items2 = (SelectItem[]) selectItems.toArray(new SelectItem[0]);
                        stmt.close();
                        rs.close();
                        con.close();
                } catch (Exception e) {
                    System.out.println("Sorry failed to display values from the database table. " + e.getMessage());
                    System.out.println(e);
        }any idea or suggestion tell me

    You usually use the property behind value="#{DynamicListBean.selectedCategory1}" for that. But in your case you'll need the vce.getNewValue() as the valueChangeListener is been invoked before the property is been set.
    Having said that, your code is terrible. Please read on about the DAO pattern. Further on, did you know that you can also just use List<SelectItem> instead of SelectItem[] as f:selectItems value?
    If you want to populate child menu's, you may find this article useful to avoid future and painful problems: [http://balusc.blogspot.com/2007/10/populate-child-menus.html].

  • How to create a report  based on selected item from Select list?

    Hi,
    I have created a tables_LOV based on:
    select table_name d, table_name r from user_tab_cols
    where column_name like '%_type%'
    Then I created a page item ListOfTables,  Display as select list and pointing to tables_LOV.
    I run the page, and i can select the table i want from the drop down list.
    How to create a report  based on the selected item? (ex: select * from selected_table)
    many thanks in advance
    Salah

    Hi Salah,
    Allright, have a look at this page: http://apex.oracle.com/pls/apex/f?p=vincentdeelen:collection_report
    I think that simulates what you're trying to accomplish. I've set up the simplest method I could think of.
    The report is based on an apex collection. If you are not familiar with that, you should study the documentation: APEX_COLLECTION
    To recreate my example you should:
    1) create an (interactive) report on your collection
    SELECT *
       FROM APEX_collections
    WHERE collection_name = 'MY_COLLECTION'
    2) create a page_item select list for the tables you want to display (in my case this is called "P38_TABLES" )
    3) create a dynamic action that triggers on change of your select list page_item. The dynamic action must be a PL/SQL procedure perfoming the following code:
    declare
      l_query varchar2(4000);
    begin
      l_query := 'select * from '||:P38_TABLES;
      if apex_collection.collection_exists
            ( p_collection_name => 'MY_COLLECTION' )
      then
        apex_collection.delete_collection
          ( p_collection_name => 'MY_COLLECTION' );
      end if;
      apex_collection.create_collection_from_query
        ( p_collection_name => 'MY_COLLECTION'
        , p_query           => l_query
    end;
    Make sure you add your page_item to the "Page Items to Submit" section.
    4) Add an extra true action that does a refresh of the report region.
    Here are two pictures describing the da:
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA1.png
    http://www.vincentdeelen.com/images/otn/OTN_COLLECTION_REPORT_DA2.png
    Good luck and regards,
    Vincent
    http://vincentdeelen.blogspot.com

Maybe you are looking for

  • T-Code to view stock report

    Dear Frndz, What is the T-code to view the system in-stock report. Regards, Srini

  • Please help -- Encore CS3 crashes often on a new PC

    Read below the typical problem report from Vista problem history -- it's French to me. The whole report would not fit here. Have had numerous crashes in Encore, and few times in Bridge, Premiere and After Effects. The programs just "stopped working"

  • Repository Size

    Hi all, Is there any tcode or report to calculate a repository size. In this case its SOFFDB (SAPOffice docs) stored in the database. Regards

  • NBWebRowSet used

    I try to use NBWebRowSet (in Forte) in an applet to display a db rowset, what I understood: . server side : a class building an XML file using NBWebRowSet. . client side : rebuilding a NBWebRowSet by reading the XML file (sending by htpp). questions:

  • Can i restore my mavericks time machine to a snow leopard os?

    I want to downgrade to SL from Mavericks. Can I restore my mavericks time machine files for use on a snow leopard?