ADF BC : "clear search" using executeEmptyRowSet()

hi
Consider a search page, similar to what you can see in this screen cast by Steve Muench:
"Part 3: Search Form Using View Object with Named Bind Parameters"
On such a page I would like to have a button that clears the search criteria and the search result.
I have implemented such a search page and "clear search" button in this example application:
http://www.consideringred.com/files/oracle/ClearSearchStuff-v0.01.zip
To implement the button I also used the executeEmptyRowSet() method in my Application Module on the "EmpWithParamsVOVI" View Object instance.
The "clear search" button uses this code in the backing bean:
public class SearchOnViewObjectParameters
     public String clearSearchCButtonAction()
          executeEmptyRowSetOnEmpWithParamsVOVI();
          ELHelper.set("#{bindings.EmployeeName.inputValue}",
               "#{bindings.EmployeeName.attributeDef.defaultValue}");
          ELHelper.set("#{bindings.LowSal.inputValue}",
               "#{bindings.LowSal.attributeDef.defaultValue}");
          ELHelper.set("#{bindings.HighSal.inputValue}",
               "#{bindings.HighSal.attributeDef.defaultValue}");
          return null;
     public String executeEmptyRowSetOnEmpWithParamsVOVI()
          BindingContainer bindings = getBindings();
          OperationBinding operationBinding =
                     bindings.getOperationBinding("executeEmptyRowSetOnEmpWithParamsVOVI");
          Object result = operationBinding.execute();
          if (!operationBinding.getErrors().isEmpty())
               return null;
          return null;
}The ADF Model binding calls this Application Module method:
public class ScottServiceImpl
     extends ApplicationModuleImpl
     implements ScottService
     public void executeEmptyRowSetOnEmpWithParamsVOVI()
          EmpWithParamsVOImpl vEmpWithParamsVOVI = getEmpWithParamsVOVI();
          vEmpWithParamsVOVI.executeEmptyRowSet();
}But it seems that the executeEmptyRowSet() method has not been documented:
http://download.oracle.com/docs/cd/B25221_04/web.1013/b16005/oracle/jbo/server/ViewObjectImpl.html#executeEmptyRowSet__
questions :
(1) Should I use the executeEmptyRowSet() to implement part of this "clear search" feature, or how exactly does this method behave (some documentation would be nice)?
(2) If not, what alternative should I use?
(using JDeveloper 10.1.3.3.0)
many thanks
Jan Vervecken
edit 20090925 : updated link to ClearSearchStuff-v0.01.zip

Hi,
This is regarding the clear search issue, I am trying to clear the search criteria filed and view object's result by using your code.
==============
public String clearSearchCButtonAction() {
System.out.println ("Entered clearSearchCButtonAction 1");
executeEmptyRowSetOnCustomerViewObj();
System.out.println ("Entered clearSearchCButtonAction 2");
ELHelper.set("#{bindings.CustomerId.inputValue}",
"#{bindings.CustomerId.attributeDef.defaultValue}");
return null;
public String executeEmptyRowSetOnCustomerViewObj()
System.out.println("1");
BindingContainer bindings = getBindings();
System.out.println("2");
OperationBinding operationBinding = bindings.getOperationBinding("executeEmptyRowSetOnCustomerViewObj");
System.out.println("3");
Object result = operationBinding.execute();
System.out.println("4");
if (!operationBinding.getErrors().isEmpty())
System.out.println("5");
return null;
return null;
=============
When I click the Clear button I am getting the following error.
[Starting OC4J using the following ports: HTTP=9012, RMI=23954, JMS=9258.]
C:\Jdeveloper\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config>
C:\Jdeveloper\jdevstudio10133\jdk\bin\javaw.exe -client -classpath C:\Jdeveloper\jdevstudio10133\j2ee\home\oc4j.jar;C:\Jdeveloper\jdevstudio10133\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\Jdeveloper\jdevstudio10133\jdev\system\oracle.j2ee.10.1.3.41.57\embedded-oc4j\config\server.xml
[waiting for the server to complete its initialization...]
May 19, 2008 1:33:39 AM com.evermind.server.jms.JMSMessages log
INFO: JMSServer[]: OC4J JMS server recovering transactions (commit 0) (rollback 0) (prepared 0).
May 19, 2008 1:33:39 AM com.evermind.server.jms.JMSMessages log
INFO: JMSServer[]: OC4J JMS server recovering local transactions Queue[jms/Oc4jJmsExceptionQueue].
Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 12156 ms.
Target URL -- http://192.168.2.3:9012/Testing%20Clear-ViewController-context-root/faces/Clear.jspx
08/05/19 01:33:47 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
May 19, 2008 1:33:49 AM oracle.wireless.its.ra.TelnetResourceAdapter run
INFO: Industrial Telnet Server version: Version 10.1.3.0.0 started-up successfully.
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Short,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Short)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Byte,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Byte)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Integer,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Integer)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Long,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Long)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Float,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Float)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Double,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(null,java.lang.Double)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ValidatorRule end
WARNING: [ValidatorRule]{faces-config/validator} Merge(javax.faces.LongRange)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.DateTime,null)
May 19, 2008 1:33:53 AM com.sun.faces.config.rules.ConverterRule end
WARNING: [ConverterRule]{faces-config/converter} Merge(javax.faces.Number,null)
May 19, 2008 1:33:54 AM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
INFO: oracle.adf.share.config.ADFConfigFactory No META-INF/adf-config.xml found
May 19, 2008 1:33:57 AM oracle.adfinternal.view.faces.application.ViewHandlerImpl _checkTimestamp
INFO: ADF Faces is running with time-stamp checking enabled. This should not be used in a production environment. See the oracle.adf.view.faces.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
08/05/19 01:34:06 Entered clearSearchCButtonAction 1
08/05/19 01:34:06 1
08/05/19 01:34:06 2
May 19, 2008 1:34:06 AM com.sun.faces.lifecycle.InvokeApplicationPhase execute
SEVERE: #{backing_Clear.clearSearchCButtonAction}: javax.faces.el.EvaluationException: java.lang.NullPointerException
javax.faces.FacesException: #{backing_Clear.clearSearchCButtonAction}: javax.faces.el.EvaluationException: java.lang.NullPointerException
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
     at oracle.adf.view.faces.component.UIXCommand.broadcast(UIXCommand.java:211)
     at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
     at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
     at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
     at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
     at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:228)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:197)
     at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:123)
     at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:103)
     at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
     at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:162)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
     at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.el.EvaluationException: java.lang.NullPointerException
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
     at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
     ... 24 more
Caused by: java.lang.NullPointerException
     at tc.view.backing.ClearSearch.executeEmptyRowSetOnCustomerViewObj(ClearSearch.java:57)
     at tc.view.backing.ClearSearch.clearSearchCButtonAction(ClearSearch.java:46)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:585)
     at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
     ... 25 more
===========================================
Would you please help me on this.

Similar Messages

  • How can I fix the disabled -Clear Search History- in the Tools section?

    I have a MacBook Pro and have just noticed that, as of today 2/15/13, the Form & Search History in the Tools, Clear Search History, section is often lightened/blurred over and its tiny box no longer able to be checked. More importantly, the Clear Search History -itself- is completely disabled and not working. I used it yesterday and it appeared to work fine. I've noticed that there are quite a few reports of this problem occurring with other users, but any and all those who have responded to these reports, with suggestions, are of no help whatsoever, to me, as I cannot understand them. Can someone who is able to give the proper effective advice do s in layman's terms so I can comprehend their instructions, please. :-) Thank you.

    The problem recurred and after verifying I have no add-ons or extensions, since I don't even know what they are, much less know how to use them the "Safe Mode" process wouldn't solve the problem. But at least now i know that the "Clear Recent History," in the Tools tab, works intermittently, but just not consistently. And the "Form & Search History" with tiny box next to it is unchecked and inaccessible (blurred over) sometimes, then appears accessible and check marked on other occasions. A very strange phenomenon...
    I have a Mac OS X 10.7.5 system and have no idea where to find the "Profile" to implement the other possible fixes. I am not well enough versed in the technical aspects of this computer to even attempt the frustrating and tricky task of deleting files I haven't a clue where to find unless someone can take me through the process step by step in layman's terms.
    There is either a bug in Firefox 19.0, which is very possible considering there are quite a few people who have reported this problem, or perhaps my last update somehow didn't download properly. Is it necessary to trash my current 19.0 version in order to download Firefox, again, or would another download of the same version override the current one?
    I'd like to see if that works to resolve the problem, but the first time I tried, a file that I couldn't open ended up on my desktop and I had to move it into the trash, not knowing what else to do with it. It didn't even show up in the trash when I did that???!!! Please provide easy to follow instructions on how to perform the downloading of another 19.0 version to replace my current one. Perhaps that will work. Thanks! :-)

  • Any way to clear search history in maps ?

    I'm new to IOS but wondering how can I clear search history in the new IOS maps application. 
    Thanks@

    if you use internet shoping it generally needs 3D cell phone password messages for personal security. But it is saving and storing in map application search box and can not be deleted.

  • Clear search history

    Is there a way to clear search history in ML without clearing your browsing history in Safari?

    I don't think so. It uses your browser history.

  • Error Rounding Difference too high when reset cleared document using FBRA

    My Client has posted cleared document with T_Code F-51. This cleared document has cleared 6040 open items.
    And now, they want to reset and reverse that cleared document.
    We found error "Rounding difference too high" when we are reset cleared document using FBRA.
    Kindly need your advice.
    Many thanks in advance.
    Regards,

    Hello,
    Please let me know the ERROR number.
    Regards,
    Ravi

  • The "Clear Search History" feature in the upper right drop-down menu no longer works in Firefox 4.

    The "Clear Search History" feature in the upper right drop-down menu that shows search terms no longer seems to work in Firefox 4.

    It is possible that there is a problem with the file that stores the "Saved Form" data.<br />
    Rename or delete formhistory.sqlite (plus formhistory.sqlite-journal and formhistory.sqlite.corrupt and formhistory.dat, if they exist) in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case there is a problem with the file that stores the "Saved Form" data.<br />
    This will remove all saved form data, so you may want to rename formhistory.sqlite to formhistory.sqlite.sav or move the file to another folder in case you need to recover some saved data.
    You may also need to delete search.sqlite and search.json in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder]

  • Enterprise Search using Sharepoint Server 2007 + SAP R/3

    Hi experts,
    I want to achieve an enterprise search using SharePoint Server 2007 (MOSS).
    SharePoint includes the BDC (business data catalog) which allows you to communicate with the SAP System.
    I read in the Microsoft whitepapers that thereu2019s a need for a web application server 6.40.
    So here is the problem:
    We have SAP R/3 Enterprise 4.7 with WAS 6.20. We donu2019t want to change or upgrade the SAP system.
    There are ways to connect the WAS to the R/3 system e.g. RFC.
    But does this still work for search in SharePoint?
    Did anybody already deal with this problem?
    Any other ideas connecting SharePoint to SAP in this scenario?
    Best regards
    Philipp Detemple

    > and having requirement to upgrade OS version from B.11 to B.23. Currently server is hosting SAP R/3 Enterprise version.
    So you upgrade HP-UX 11.11 to HP-UX 11.23?
    > I have tried to serach SAP service market place for PAM, but could not find specific information on version upgrade from B.11 to B.23
    Yes - because there is no HP-UX 23.x, only 11.23 and 11.31. For the version overview check
    Note 939891 - HP-UX: End of Support Dates
    Note 1075118 - SAP on HP-UX: FAQ
    > My Questioin is: If we copy system as it is to new host and if we keep the same Kernel Patch 196, will it work fine or give issue?
    It will work.
    > So even if I got for latest patch 304 which is released on 16.11.2009, still the OS version for which it built is B.11, so if we have B.23, will it work? I would not see the possibilities of kernel upgrade at this stage.
    Why no possibility for a kernel upgrade if you install a new server?
    > so with same kernel will it work? What else I need to check for the migration and make sure that everything works fine on new server.
    Check
    Note 831006 - Oracle 9i installation on HP-UX 11.23 and 11.31
    Markus

  • How to clear Documents using XBLNR(Reference field) through Manual BRS-FF67

    I want to clear GL line items in clearing account using Manual BRS(FF67) with reference to "XBLNR" field(Reference). IS there any standard Algorithm which SAP provided for reference field or if we want to develop ne algorithm then how to create.
    Thank in advance.
    Best Regards
    Raj

    Hello Raj,
    It is not possible to clear an open item on a g/l account via the
    reference document number. The automatic clearing with interpretation
    algorithm 021/001 only takes place, if the item, which should be cleared
    is on a customer/vendor account. So it could never find open G/L items.
    The reason is that the reference number is usually not unique
    so it could lead to wrong clearings.
    A workaround therefore would be to use:
    a) another interpretation algorithm depending on the note to payee
       data are available.
    b) the user exit 1 (described in note 494777, point 1) if there are
       no other information available as the reference number.
    c) the report SAPF124/E to clear these items afterwards. Then the bank
       statement should only post FB01 without clearing. The requirements
       are criteria to assign and clear the suitable items.
    Regards,
    Renan

  • Reading (and searching, use of TOC and index) Acrobat files offline

    OK - I have tried several things in effort to read PDFs offline.
    The 'tools' that allow me to access these files PDFReader Pro and GoDocs are incapable of doing searches, use TOC, and index.. It is basically a picture of a PDF. They also present it in the linear form where I need to actually scroll the 343 PAGES to get to the information I want to read mid-way into the document.
    Is there a realistic tool that actually properly presents PDF files offline and allows it to be used as it was intended? OOPS - correction Safari cant display this right either.... never mind ....
    Thanks
    Message was edited by: EmbeddedGeek
    I removed an erroneous statement that safari can properly display PDFs - it can't provide search, index/toc accesses. Bogus!

    On a possibly related note, see http://reviews.cnet.com/8301-13727_7-20004258-263.html?tag=mncol;txt for a way to ADD stuff to the TOC. I'm just passing this along, I haven't tried it.
    Doug

  • How do you perform partial word search using PDF Open Parameters?

    Hello,
    We are using the 'search=' open parameter in the URL string, which open a PDF and automatically searches for a word within the PDF.  It works great for whole word searches. Unfortunately, it does not work for partial word, or phrases. In other words, if I'm searching on '123456' and there is a word in the document that is '1234567', it will not find the partial word, or first 6 characters of the 7 character word. You can perform a partial or phrased search using the advance search feature of Adobe Reader.  So, currently after the PDF opens, and shows no hits on the automatic search for '123456', we are able to manually search again for a partial word search, and then see matches in the document.  Is there any way to specify to use a whole or partial word search when using the 'search=' open parameter, so that we can automatically match on partial and whole words?  Something like 'search=123456*'?

    It never worked that way. Command-F shows the page search bar.

  • Service Ticket: Search using Inbox & My Worklist in IC WebClient

    Dear Gurus,
    When I create a Service Ticket in the IC WebClient in CRM 5.0 and save it, the system generates a Transaction Number which I can then search for by using Interaction History, Inbox and My Worklist.
    When I search using Interaction History, I select the relevant Service Ticket and the system takes me to an Interaction Record, and from there I can navigate to the correct Service Ticket.
    When I search using Inbox, the system takes me to a Service Order, which I do not believe is correct.
    When I search using My Worklist, the system also takes me to a Service Order, which I do not believe is correct.
    Any recommendations?
    Rgs,
    Alan

    Hi
    You can search service ticket from inbox ideally by entering the object ID in the agent inbox or you can also search for service tickets in interaction record which is an activity transaction type if you maintain the copy control for service ticket from interaction record then you can search for service ticket through the interaction record as well.
    refer to best practice link for the service ticket custimiseing settings for icwebelient
    http://help.sap.com/bp_crmv250/CRM_DE/index.htm
    Reward points if helpful
    Regards
    Dinaker vikas

  • UCM Search using firstname and lastname

    Hi,
    One of our requirement is to enable the search using firstname and lastname. We store users, groups, roles, and accounts in Oracle Internet Directory and integrated with UCM. I would like to know the ways to show firstname and lastname fields in the search so that users can search with those properties instead of author metadata .
    Thanks,
    Raj

    If I got the question, first name and last name refer to first and last names of document authors, right? Otherwise, I miss the link between search for documents and people identities in an identity pool.
    Note that search dialogs support "wild-characters" - that is, you can enter "Jiri Mac*" instead of "Jiri Machotka" - alternatively, use "Contains" rather than "Equals To" criteria.
    Furthermore, I'm wondering how you intend to use first and last names in GUI - do you prefer to have two names that you somehow construct together? Do you want to display the names to users? (How many names will be in first names? How many in last names?)

  • BP telephone Search using wildcards (IC Winclient)

    I'm unable to search business partners by telephone number using wildcards (*) because I get the error message "enter a country to do the search using wildcards".
    How can I include a default country and state on the html template of the BP Search?
    I´ve tried this code below (on tcode smw0)but it doesn't work:
    Portugal
    Lisbon
    Any help?
    Thanks

    hey buddy
    yes i would like to enahnce the BP search too
    but right now the things is that the BP search screen the standard one is coming emmpty
    i have assigned the search criteria as BPSearch which is a default profile for search
    but when i assign the BP search workspace ,the screen is coming empty
    i mean  firstly the standard screen should be coming ,then i could enhance it
    please tell me what all are the settings required to use BP search in winclient
    again mentioning the standard screen containing the existing standard criteria for BP search is not coming ,the screen under the BP search tab is empty
    please advise
    help will be appreciated
    best regards
    ashish

  • Product Search Using Oracle Text or By Any Other Methods using PL/SQL

    Hi All,
    I have requirement for product search using the product table which has around 5 million products. I Need to show top 100 disitnct products searched  in the following order
    1. = ProductDescription
    2. ProductDescription_%
    3. %_ProductDescription_%
    4. %_ProductDescription
    5. ProductDescription%
    6. %ProductDescription
    Where '_' is space.  If first two/three/or any criteria itslef gives me 100 records then i need not search for another patterns
    Table Structure Is as follows
    Create Table Tbl_Product_Lookup
        Barcode_number                Varchar2(9),
        Product_Description Varchar2(200),
        Product_Start_Date Date,
        Product_End_Date Date,
        Product_Price Number(12,4)
    Could you please help me implementing this one ? SLA for the search result is 2 seconds
    Thanks,
    Varun

    You could use an Oracle Text context index with a wordlist to speed up substring searches and return all rows that match any of your criteria, combined with a case statement to provide a ranking that can be ordered by within an inner query, then use rownum to limit the rows in an outer query.  You could also use the first_rows(n) hint to speed up the return of limited rows.  Please see the demonstration below.  If you decide to use Oracle Text, you may want to ask further questions in the Oracle Text sub-forum on this forum or space or whatever they call it now.
    SCOTT@orcl_11gR2> -- table:
    SCOTT@orcl_11gR2> Create Table Tbl_Product_Lookup
      2    (
      3       Barcode_number       Varchar2(9),
      4       Product_Description  Varchar2(200),
      5       Product_Start_Date   Date,
      6       Product_End_Date     Date,
      7       Product_Price          Number(12,4)
      8    )
      9  /
    Table created.
    SCOTT@orcl_11gR2> -- sample data:
    SCOTT@orcl_11gR2> insert all
      2  into tbl_product_lookup (product_description) values ('test product')
      3  into tbl_product_lookup (product_description) values ('test product and more')
      4  into tbl_product_lookup (product_description) values ('another test product and more')
      5  into tbl_product_lookup (product_description) values ('another test product')
      6  into tbl_product_lookup (product_description) values ('test products')
      7  into tbl_product_lookup (product_description) values ('selftest product')
      8  select * from dual
      9  /
    6 rows created.
    SCOTT@orcl_11gR2> insert into tbl_product_lookup (product_description) select object_name from all_objects
      2  /
    75046 rows created.
    SCOTT@orcl_11gR2> -- wordlist:
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference('mywordlist', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute('mywordlist','PREFIX_INDEX','TRUE');
      4    ctx_ddl.set_attribute('mywordlist','PREFIX_MIN_LENGTH', '3');
      5    ctx_ddl.set_attribute('mywordlist','PREFIX_MAX_LENGTH', '4');
      6    ctx_ddl.set_attribute('mywordlist','SUBSTRING_INDEX', 'YES');
      7    ctx_ddl.set_attribute('mywordlist', 'wildcard_maxterms', 0) ;
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- context index that uses wordlist:
    SCOTT@orcl_11gR2> create index prod_desc_text_idx
      2  on tbl_product_lookup (product_description)
      3  indextype is ctxsys.context
      4  parameters ('wordlist mywordlist')
      5  /
    Index created.
    SCOTT@orcl_11gR2> -- gather statistics:
    SCOTT@orcl_11gR2> exec dbms_stats.gather_table_stats (user, 'TBL_PRODUCT_LOOKUP')
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- query:
    SCOTT@orcl_11gR2> variable productdescription varchar2(100)
    SCOTT@orcl_11gR2> exec :productdescription := 'test product'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> column product_description format a45
    SCOTT@orcl_11gR2> set autotrace on explain
    SCOTT@orcl_11gR2> set timing on
    SCOTT@orcl_11gR2> select /*+ FIRST_ROWS(100) */ *
      2  from   (select /*+ FIRST_ROWS(100) */ distinct
      3              case when product_description = :productdescription            then 1
      4               when product_description like :productdescription || ' %'       then 2
      5               when product_description like '% ' || :productdescription || ' %' then 3
      6               when product_description like '% ' || :productdescription       then 4
      7               when product_description like :productdescription || '%'       then 5
      8               when product_description like '%' || :productdescription       then 6
      9              end as ranking,
    10              product_description
    11           from   tbl_product_lookup
    12           where  contains (product_description, '%' || :productdescription || '%') > 0
    13           order  by ranking)
    14  where  rownum <= 100
    15  /
       RANKING PRODUCT_DESCRIPTION
             1 test product
             2 test product and more
             3 another test product and more
             4 another test product
             5 test products
             6 selftest product
    6 rows selected.
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 459057338
    | Id  | Operation                      | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT               |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  1 |  COUNT STOPKEY                 |                    |       |       |            |          |
    |   2 |   VIEW                         |                    |    38 |  3990 |    13  (16)| 00:00:01 |
    |*  3 |    SORT UNIQUE STOPKEY         |                    |    38 |   988 |    12   (9)| 00:00:01 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| TBL_PRODUCT_LOOKUP |    38 |   988 |    11   (0)| 00:00:01 |
    |*  5 |      DOMAIN INDEX              | PROD_DESC_TEXT_IDX |       |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=100)
       3 - filter(ROWNUM<=100)
       5 - access("CTXSYS"."CONTAINS"("PRODUCT_DESCRIPTION",'%'||:PRODUCTDESCRIPTION||'%')>0)
    SCOTT@orcl_11gR2>

  • BAPI for clearing documents -Using Transaction F-44

    Hi all,
       Is there any BAPI which can be used for clearing docs using transaction F-44.
    I have already seen threads on SDN for the same but couldn't find any BAPI.
    Regards
    Taranam

    I have the same question as you ,  please tell me if you had known , thanks !
    Edited by: HB WANG on Mar 4, 2008 4:08 PM

Maybe you are looking for