How to implement "Date searching criteria"

I have a block contains some textboxes such as project_no, project_name, startdate.
I would like to search by startdate.
For example, I have 2 other text items for searching only. the first item is "DATE1" the second item is "DATE2". I want a user to enter a date into the first text item "DATE1" and enter another date into the second text item "DATE2". then click on execute button to get the result.
The result is supposed to be all StartDates that match the criteria.
How can i implement this in forms6i???
Thank you in advance for your help.

ok, i will explain more in details,
I have a data block contains some text boxes (sno, empno, projectno, startdate), currently, users can click the "Execute" button and return all records or users can go to Enter query mode and insert a value (search criteria) into any of these textboxes, and then they will get the required record after clicking the "Execute" button.
I added 2 non database text boxes(date1,date2) for searching purpose, it will return all startdates located between these 2 dates. I used the following code for that and its working fine but "IT DISABLED THE OTHER SEARCHING CRITERIA (sno, empno...)" which is not good because i want a suer to have a choice.
Declare
where_dt varchar2(150);
Begin
     IF :System.Mode = 'NORMAL' THEN
     set_block_property('blk_name', default_where,'');
     Else
where_dt:='startdate between :blk_name.date1 and :blk_name.date2';
set_block_property('blk_name', default_where,where_dt);
     End if;
Execute_query;
End;
So, i edited the code to include the other criteria, users can search by one criteria only.
Declare
where_dt varchar2(150);
Begin
IF :System.Mode = 'NORMAL' THEN
set_block_property('blk_name', default_where,'');
Else if :System.Mode = 'Query' Then
if :blk_name.Date1 and :blk_name.Date2 is not null then
where_dt:='startdate between :blk_name.date1 and :blk_name.date2';
end if;
if :blk_name.sno is not null then
where_dt:='sno = :blk_name.sno';
end if;
if :blk_name.empno is not null then
where_dt:='empno = :blk_name.empno';
end if;
set_block_property('blk_name', default_where,where_dt);
End if;
Execute_query;
End;
Unfortunately, this code is not working, i am getting error.
It points to the last "END;" and returns error: "Encountered the symbol ";" when expecting one of the following IF "
Any help please??

Similar Messages

  • How to Implement the Search page for Workflow Notifications?

    Hi All,
    I want to implement the new Search page for Workflow Notifications. Search page containing Company, Paygroup, Source, Initiator, Supplier Name, From date & To date fields. These fields(Poplist & Calendar) are getting the values from different tables and these fields are not in WF_NOTIFICATIONS table only Initiator & dates are there. After selecting the values in all fields or one field based upon these values I want to display the all Workflow Notifications ( Those are satisfy the search criteria only not all ) in Advance Worklist Table RN in the Notifications page. Is it possible to create the Search page based upon the above scenario if Yes Let me know how to implement this search page for Workflow. Page was designed but how to get the sortlisted Notifications and how to pass these values to next page?
    Thanks in advance.
    Edited by: user635152 on Nov 13, 2008 10:53 AM

    Hi Guru,
    I crete the Search page having 5 poplists and select the values from dropdown list and click GO button it serch the records and displays that records in ResultsTable in same page.
    My case, Search page is running fine if I select the values and click GO button page is refreshed without errors but I am unable to displays the records in ResultsTable.
    What I am missing?
    My Select Stmt:
    SELECT * FROM      
    (select wn.nid notification_id
    ,ou.name company
              ,I.PAY_GROUP_LOOKUP_CODE paygroup
              ,'AP' source
              ,pf.full_name initiator
              ,pv.vendor_name supplier_name
              ,I.GL_DATE FROM_TO_DATE
    from ap_invoices_all i
    , po_vendors pv
         , hr_operating_units ou
         , per_all_people_f pf     
         , FND_USER FU
    , (SELECT trim(substr(substr(substr(WN.subject,(instr(WN.subject,'Invoice ') + 8),100),1,100),
    1,instr(substr(substr(WN.subject,(instr(WN.subject,'Invoice ') + 8),100),1,100),' for'))) inv_no
    ,notification_id nid
    FROM WF_NOTIFICATIONS WN
    WHERE WN.MESSAGE_TYPE = 'APINV'
    AND WN.STATUS NOT IN ('CANCELED','CLOSED')) wn
    where i.vendor_id = pv.vendor_id
    and i.invoice_num = wn.inv_no
    and i.WFAPPROVAL_STATUS = 'REQUIRED'
    and pv.vendor_name = nvl(:vendor_name,pv.vendor_name)
    and i.org_id = OU.organization_id
    AND OU.name like nvl(:company_name,name)
    and i.pay_group_lookup_code = nvl(:pay_group,i.pay_group_lookup_code)
    and exists (select ad.invoice_id
    from ap_invoice_distributions_all ad
    where ad.invoice_id = i.invoice_id
    and ad.accounting_date between nvl(:from_date,ad.accounting_date)
                                       and nvl(:to_date,ad.accounting_date))
    and 'AP' = nvl(:source,'AP')
         and i.created_by = fu.user_id
         AND fu.EMPLOYEE_ID = pf.person_id
         AND pf.full_name like nvl(:initiator, pf.full_name)
    UNION ALL
              select po_num.nid notification_id
              ,ou.name company
              ,ps.PAY_GROUP_LOOKUP_CODE paygroup
              ,'PO' source
              ,pf.full_name initiator
              ,pv.vendor_name supplier_name
              ,P.CREATION_DATE FROM_TO_DATE
         from po_headers_all p
         ,po_vendors pv
              ,po_vendor_sites_all ps
              ,hr_operating_units ou
              ,per_all_people_f pf
         ,(select trim(substr(wn.subject,24,instr(wn.subject,' for')-24)) po_no, notification_id nid
              FROM WF_NOTIFICATIONS WN
         WHERE WN.MESSAGE_TYPE = 'POAPPRV'
         AND WN.STATUS NOT IN ('CANCELED','CLOSED')
         and wn.subject like 'Standard Purchase Order%') po_num
         where p.SEGMENT1 = po_num.po_no
         and p.vendor_id = pv.vendor_id
         and p.org_id in(select organization_id
         from hr_operating_units
         where name like nvl(:company_name,name))
         and pv.vendor_name = nvl(:vendor_name,pv.vendor_name)
         and p.AUTHORIZATION_STATUS = 'IN PROCESS'
         and p.CANCEL_FLAG = 'N'
         and 'PO' = nvl(:source,'PO')
         and p.agent_id = pf.person_id
         and pf.full_name like nvl(:initiator, pf.full_name)
         and pv.vendor_id = ps.vendor_id
         and ps.org_id = ou.organization_id
         and ou.name like nvl(:company_name,name)
    and ps.PAY_GROUP_LOOKUP_CODE = nvl(:pay_group,ps.PAY_GROUP_LOOKUP_CODE)
         and trunc(p.creation_date) between nvl(:from_date,trunc(p.creation_date)) and nvl(:to_date,trunc(p.creation_date))
    In CO PFR Code:
    if (pageContext.getParameter("Go") != null)
    OAQueryUtils.checkSelectiveSearchCriteria(pageContext, webBean);
         String COMPANY = pageContext.getParameter("COMPANY");
    String PAYGROUP = pageContext.getParameter("PAYGROUP");
    String SOURCE = pageContext.getParameter("SOURCE");
    String INITIATOR = pageContext.getParameter("INITIATOR");
    String SUPPLIER_NAME = pageContext.getParameter("SUPPLIER_NAME");
    Boolean executeQuery = BooleanUtils.getBoolean(false);
    Serializable[] parameters = { COMPANY, PAYGROUP, SOURCE, INITIATOR, SUPPLIER_NAME, executeQuery};
    Class[] paramTypes = { String.class, String.class, String.class, String.class, String.class, Boolean.class };
    am.invokeMethod("initSearch", parameters, paramTypes);
    OAAdvancedTableBean table = (OAAdvancedTableBean)webBean.findChildRecursive("ResultsTable");
    table.queryData(pageContext, false);
    AM invoke Method():
    public void initSearch(String company,
    String paygroup,
    String source,
    String initiator,
    String supplier_name,
    Boolean executeQuery)
    WorklistFindVOImpl vo = getWorklistFindVO1();
    if (vo == null)
    MessageToken[] tokens = { new MessageToken("OBJECT_NAME", "WorklistFindVO1") };
    throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
    vo.initQuery(company, paygroup, source, initiator, supplier_name, executeQuery);
    VO Code:
    public void initQuery(String company,
    String paygroup,
    String source,
    String initiator,
    String supplier_name,
    Boolean executeQuery)
    StringBuffer whereClause = new StringBuffer(500);
    Vector parameters = new Vector(5);
    int clauseCount = 0;
    int bindCount = 0;
    setWhereClauseParams(null); // Always reset
    if ((company != null))
    String companyname = null;
    try
    companyname = new String(company);
    catch(Exception e) {}
    whereClause.append("COMPANY= :COMPANY");
    whereClause.append(++bindCount);
    parameters.addElement(company);
    clauseCount++;
    if ((paygroup != null) && (!("".equals(paygroup))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("PAYGROUP = :PAYGROUP");
    whereClause.append(++bindCount);
    parameters.addElement(paygroup);
    clauseCount++;
    if ((source != null) && (!("".equals(source))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("SOURCE = :SOURCE");
    whereClause.append(++bindCount);
    parameters.addElement(source);
    clauseCount++;
    if ((initiator != null) && (!("".equals(initiator))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("INITIATOR = :INITIATOR");
    whereClause.append(++bindCount);
    parameters.addElement(initiator);
    clauseCount++;
    if ((supplier_name != null) && (!("".equals(supplier_name))))
    if (clauseCount > 0)
    whereClause.append(" AND ");
    whereClause.append("SUPPLIER_NAME = :SUPPLIER_NAME");
    whereClause.append(++bindCount);
    parameters.addElement(supplier_name);
    clauseCount++;
    setWhereClause(whereClause.toString());
    if (bindCount > 0)
    Object[] params = new Object[bindCount];
    parameters.copyInto(params);
    setWhereClauseParams(params);
    if ((executeQuery != null) && (executeQuery.booleanValue()))
    executeQuery();
    } // end initQuery()
    Please let me know what I did mistake in my code?
    I am unable to find it what I missing and there is no errors but no records displayed in Results Table.
    Please it's urgent.
    Thanks
    Nag.
    Edited by: user635152 on Nov 19, 2008 4:43 PM

  • How to implement the search help exit to MM01 for Material by product hiera

    Hi,
    How to implement the search help exit to MM01 T-code for Material by product hierarchy,
    but system default it gives the data from MVKE table, my client wants from MARA table,
    i created the one Function Module, write this code in that FM.
    IF CALLCONTROL-STEP EQ 'DISP'.
    REFRESH RECORD_TAB.
    SELECT * FROM MARA INTO TABLE RECORD_TAB
    WHERE PRDHA = 
    ENDIF.
    I Face the problem what variable i have to pass in WHERE CONDITION, FROM THE MM01 T-code.
    is't require to IMPORT variable from MM01 program, what is that import variable, please give me the solution.
    thanks to all.

    Hi there..
    check my web blog on search help exit...
    [Search help exit code|https://wiki.sdn.sap.com/wiki/x/du0]

  • How to implement google search in portal application

    Hi,
      I am using  "http://api.google.com/GoogleSearch.wsdl" file to implement google search in portal application. but i am not able to get the search result. how to implement google search. is this "http://api.google.com/GoogleSearch.wsdl" is vaild now ?. how to achieve the soultion.
    Regards,
    Shanthakumar.

    Hi Shanthakumar,
    The "GoogleSearch.WSDL" is no longer available as google has replaced it with the new AJAX based searching and they have eventually removed it from public use as well from 7th September 2009. So, I would imagine you would not be able to use the earlier WSDL file for google search. You might have to look in using the new "AJAX Search API". For more information have a look the following links. You can notice "No Longer Available" at the top of the page.
    http://googlecode.blogspot.com/2009/08/well-earned-retirement-for-soap-search.html
    http://code.google.com/apis/soapsearch/api_faq.html#tech15
    I hope this helps you.
    Regards,
    Gopal.

  • How to implement fuzzy search in Query variables

    Dear Experts,
    Fuzzy search is eazy implemented in the abap  , but I do not know how to implement fuzzy search in Query variables
    our company have  a report,with input variable of customer code,   the user want to input 3 bits as fuzzy search. for example,
    the customer code  have 10 bit,  she want to only  input 3 bits before-- EAE *
    and hope the results will  be displayed.  if you have any solution , please advise. 
    ManyTthanks.
    Best Regards.
    Steve

    closed

  • How to implement alphabetic search in combo box

    Hi all,
    how to implement alphabetic search in combo box through coding.
    Thanks for any replies

    Im not sure if I undestand correctly, but example is
    sCFL_ID = oCFLEvento.ChooseFromListUID
                        Dim oCFL As SAPbouiCOM.ChooseFromList
                        oCFL = oFormKontrolaMZ.ChooseFromLists.Item(sCFL_ID)
                        If oCFLEvento.BeforeAction = False Then
                            Dim oDataTable As SAPbouiCOM.DataTable
                            oDataTable = oCFLEvento.SelectedObjects
                                    val = oDataTable.GetValue(1, 0)
    oForm.DataSources.UserDataSources.Item("EditDS").ValueEx  = val
    and then load from datasource to matrix.
    hope it helps
    Petr

  • How to implement data level security

    How to implement data level security in BI Publihser?. I am using Obiee enterprise edition and bi publihser. My requirement is to show data based on User- Region relation ship.
    User A - belongs to Eastern Region
    User B - belongs to Southern Region
    so if user A logged in he should see only Eastern Region report. If user B logged in He should see only Southern region. I am using direct sql to my oralce database as data source.
    i appriciate your help

    I am using a common database username and password for jdbc connection. what i am looking is based the BI Publihser login, is there any way?
    say i have userregion table joined with fact. so that i can write a query to get the data
    select c1,c2,c3
    from userregion, fact
    where fact.region=userregion.region
    and userregion.user = BIPUBLIHSERUSER
    but my question is ithere any variable to tell who is logged in BI Publisher? Any server varaibles?
    Other related question is, In every report i want to show User name who is running the report. How can i get this?

  • How to Dynamically add Search Criteria in Advance Search Region.

    Hi All,
    I want to understand how can we add Search Criteria dynamically in the Advance Search Region.
    The Requirement is to add 4 additional search criteria for an org_id in a multi org structure. For other business those fields should not be visible.
    I did try this with the form personalization but could not Show/hide the additional search criteria programatically for the business as we can only see 4 search criteria at the time of page load and other criteria comes in the drop down list to add which can not be show/hide after page load.
    I thought of a solution to add search criterias dynamically for my org through extending controller.
    I found the OAAdvanceSearchBean (advance search Region in controller) object for my Advance Search but could you tell me how can I add the Criteria Row in that Advance Search (createWebBean function) and then add the item in criteria Row dynamically.
    Also please tell me how we can increase the showed criteria from default 4 to more, setDisplayedCriteriaCount(int) is not allowed and it is not working also.
    Thanks.
    Regards,
    Ashish Bansal

    Hi,
    As Lars said The "Search Option Set" and the "Search Component Set" offer you quite some flexibility.
    You can configure both of these component to customize your search.
    Once you did it, you can create a new basic search iview and set these components.
    On the other hand, you also customize the layout use to show result of search.
    Dont'f forget that you need to configure Trex and create an index.
    For instance, I configured the search criteria, the system only asked me some metadatas (created by us,whose value are dependents). Each time that you upload a document you set these attributes.
    Then when you want to search, appear a screen with these values
    Country :
    City:
    search field:
    Patricio.

  • How to get the search criteria value in model

    Hi,
    I've a search page and one of the search item has BETWEEN operator. How can I get the values for this search criteria item in model project ie., inside the VOImpl.java?
    Thanks

    As you gave no jdev version and no use case all I can tell is to look at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/59-table-filter-by-data-range-176653.pdf which might help.
    What do you want to do with the parameter inside the VO?
    Depending on the use case and jdev version there are other possible solutions.
    Timo

  • Implementing Data Search for Custom Objects

    Can any one have some information on implementing search criteria for custom objects.
    I am looking to modify the drop down values and search criteria based on custom data model.

    Hello Rajesh,
    The following configuration activity might resolve your query.
    Transaction: mdgimg.
    General Settings> UI Modelling> Define Field Properties for UI. Select your custom data model and go to "Hide Field Names."
    For the fields of the entity type, you don't want to come up in the search UI, check on "No selection".
    "No Selection" : These wouldn't come up as search Criteria. "No Results List": These won't come up in final result list.
    Best regards,
    Shephalika.

  • How to Clear QBE Search Criteria?

    We have a taskflow which is invoked as a popup in a jsff page, this popup contains a table where the user can query using QBE. After the popup is closed and reopened, the search criteria in the QBE is retained.
    Any idea how to clear the QBE search criteria?

    You can use the following code to clear the filters:
    ViewCriteria vcDefault = vo.getViewCriteria(ViewCriteriaManager.IMPLICIT_VIEW_CRITERIA_NAME);
    if (vcDefault != null) {
    vcDefault.clear();
    see the following blog:
    http://smconsultants.in/2013/08/clearing-table-filters-when-the-user-comes-back-to-same-page-with-in-a-taskflow.html

  • How to implement a search engine in java ?

    Hi All,
    1. Can anyone explain me with java code how to connect to a excel database residing on a
    different(I know that we do it thro' dsn) machine in my network. I know that we do it with a dsn.
    I created a network map but when I execute the statement
    "Connection conn = (Connection)DriverManager.getConnection("jdbc:odbc:accesscarddsn");"
    then I am getting the error:
    SQLException:[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    2. I am doing a website where some pages of website are jsp, servlets. I want to implement a search functionality in my site so that if the user types a keyword then I need to show him the links to the pages(whether jsp,html) which contain this keyword. How do I do that other than using property files .
    Thanks & Regards,
    Kumar.

    With regard to your first question,you need to supply user name and passwrd in the connection statement.I guess that's problem when it saya..too few parameters. IF there is no user name and passwd, sne dnull strings.
    With regard to the search functionality, there are many ways you can implement it.I am not sure about any readymade products available on the web, however you can code it yourself, it might be time consuming but I feel it is better.You can do it this way:
    1. Parse all the html docs in ur website, ignore all the html tags and maintain a HASH table of all words and the locations you found the word in.You can optioanlly remove all stopwords, i.e. words that occur commonly like 'a', 'an' etc..
    2. The next phase is to take a query through a cgi program and search the hash table for all keywords,make sure you seach for each keyword in the query seperately.Retreieve the docs, display the results on a html page.
    Cheers!

  • How to edit Existing Search Criteria

    Hi Experts,
    In my ADF application already I have Search Criteria, for this existing I have to add two more fields say 'LOB' and 'CustomerName' as a Dropdown.
    The following LOB values should be available in dropdown and these LOB values should be accessed from DB Table.
    Upon selection of LOB value as ‘SNI’ ,customer name dropdown is displayed and the customer names related to that LOB are populated in the dropdown.
    View Object is created on Read only access through SQL_Query.
    please can anyone suggest me for the same??
    thanks
    Santosh
    Edited by: Santosh M E on Jan 4, 2012 10:16 PM

    For this, you need to create LOV for LOB and a dependent LOV for customer names.
    Ex. you create a new VO for LOB - select LOB from ...... and another VO for customers - select cust_name from ..... where lob = :lob (this is fed by the LOB lov)
    Once you do this in the model, your query component will behave as you want.
    You can watch the video of the Shay's cascaded lov building tutorial here - http://www.youtube.com/watch?v=nXwL2_RP7AQ
    Make sure that you set dependency of customer name on LOB in the properties
    Edited by: asatyana on Jan 4, 2012 11:32 PM

  • How to clear last search criteria in ADF form?

    I'm building an ADF form. This form uses JTextField controls. When I switch to Find Mode, I want to clear criteria of the last search that JDev remembered. I've tried to remove ActionListener of FIND button in Navigation Bar, then add a new ActionListener that I created to handle FIND action myself. But the results are not perfect as I expected: JDev still filled the last search criteria.
    For example, I searched with these criteria: Code = 'ABC', the next time enter Find Mode, I want this criteria to be cleared. My code is below:
    JButton btnFind = navApplication.getButton(navApplication.BUTTON_FIND);
    btnFind.removeActionListener(navApplication);
    btnFind.addActionListener(new ActionListener(){
           public void actionPerformed(ActionEvent e)
         navApplication.doAction(navApplication.BUTTON_FIND);
         if (navApplication.getModel().isFindMode())
              txtCode.setText("");
              txtName.setText("");
              txtAddress.setText("");
    });

    Hi,
    Could, some body please answer to my question I raised above.
    Cheers,
    Krishna.

  • Best way to implement dynamic search criteria

    I was recently showing a group of developers some of the Toplink basics. As an example I showed a way to build a Toplink expression for an object search where the search criteria are determined at runtime. Doing this in raw SQL is a bit tricky because you need to place the 'AND' statements between the criteria, but I found a simple method to do this with an expression (or at least I think I did). I simply used and() to add each criteria expression, including the first one. Toplink seemed smart enough to derive the SQL without the additional AND statement.
    My question to the Forum is, is this the best way to build the expression and is it flawed? Here is my code snippet and the generated SQL.
    public Expression createExpression(ExpressionBuilder builder, Object[] parameters) {
    // Build expression for a Dealer Search
    String name = (String)parameters[0];
    String location = (String)parameters[1];
    String email = (String)parameters[2];
    Expression searchExpression = builder;
    // NAME = 'name'
    if (name != null) {
    searchExpression =
    searchExpression.and(builder.get("name").equal(name));
    // LOCATION = 'location'
    if (location != null) {
    searchExpression =
    searchExpression.and(builder.get("location").equal(location));
    // EMAIL = 'email
    if (email != null) {
    searchExpression =
    searchExpression.and(builder.get("contactInfo").get("email").equal(email));
    return searchExpression;
    Toplink generated SQL with location="Mt. Prospect, IL", email=null, and name=null:
    SELECT VERSION, LOCATION, ID, NAME FROM DEALER WHERE (LOCATION = 'Mt. Prospect, IL')
    Thanks.

    All JPA strategies require something (like a table or sequence object) be in the database, with table sequencing being the most portable, though EclipseLink does allow custom sequence stratgies where you could use something else, such as the UUID. Sequencing is described here described here http://wiki.eclipse.org/EclipseLink/Examples/JPA/PrimaryKey with a custom UUID example shown here http://wiki.eclipse.org/EclipseLink/Examples/JPA/CustomSequencing .

Maybe you are looking for

  • Report for MSR Invoice Print is to meet Russian and ukairaine Local Legal

    is there any standard report for Misslenious sales report(MSR)Invoice Print is to meet Russian and ukairaine Local Legal needs.

  • How to change billing date

    My billing date is currently set it to the 7th of every month and it's annoying since everything else comes out on the 1st. How can I change it? I've looked all over the My Account section and can't find anything that'll change my billing date...

  • Cross-company + third party SD-order item result analysis

    Hello, please, advice. SD-Process - third party cross-company 1.Sales organisation belongs to company code A. 2.Plant belongs to company code B. 3.Third party - so there is no delivery, intercompany billing is executed on the header level (IVA invoic

  • PSE 4.0

    Wahrscheinlich habe ich aus Dusseligkeit einen von zwei gleichlautenden Programm-Ordnern gelöscht. Jetzt erscheint bei Programmaufruf die Fehlermeldung "Ihre Angabe für Ihren Adobe Photoshop Elements-Benutzernamen, Ihr Unternehmen oder Ihre Seriennum

  • Is there a 3rd party app to organize photos in camera roll?

    Thanks!