Auto Populate of Results Table in Query Region

I have create Custom Page with Query Region. Region has Table For Results and Simple Search Panel. I want the Results pre populated when I Launch Page, with Option to Repopulate When User Enters Search Criteria If Needed.
How Can I have this achieved?
Thanks

You can do like kumar specified. For more information on the search page implementation, refer Exercise: Search on the developer guide.
Thanks
PK

Similar Messages

  • Auto populate values in the the database table

    Hi All,
    I have a requirement where user enter values in one of the ZTransaction. This will update a Ztable. So the new requirement is to add two new columns in the fields, which is completed. Now this two new fields are supposed to auto populate values based upon the key field .
    The transaction code is defined with Transaction as SM30 and Default values as
    Name of the screen field     value
    Update                               X
    VIEWNAME                      "table name which the values are updated".
    Please let me know how to do this.
    Thank you!!

    Hi Swetha,
    I am unsure of what you are trying to accomplish so I will make a few assumption and perhaps you can find some benefit in it.
    I suppose you are trying to add new fields to a custom (Z) database table.
    If so then use SE11 to add the two new columns.
    After this is complete then rebuild the table maintenance by using the following path: SE11-> Utilities->Table Maintenance Generator.  (Remember to double check the Recording Routine Radio button.)
    If the user needs fields automatically populated then check the following link.  It describes how to use table maintenance events.  I suppose you need to use Event 01 and Event 05.
    http://help.sap.com/saphelp_nw04/helpdata/en/91/ca9f0ea9d111d1a5690000e82deaaa/frameset.htm
    Good luck and reward points if helpful,
    AK
    Moderator message -  Asking for points is against the Forum's RoE
    Message was edited by: Suhas Saha

  • How to use dynamic query for Result table

    Hello Experts,
    I want to use dynamic query and then display the result in the assignment block.
    Using dynamic query BTQAct and BTQRAct and base on some search criteria i want tofilter and then append the result in the result table of that custom context node, and then it should display the result in the view in UI.
    SO can you please provide me the samplle code on how to use the dynamic query and append in the result table.
    Regards.

    Hi,
    Please find below sample code:
    data:  query         TYPE REF TO cl_crm_bol_dquery_service,
               result        TYPE REF TO if_bol_bo_col.
    DATA: lt_params       TYPE crmt_name_value_pair_tab,        
               lwa_params      TYPE crmt_name_value_pair.             
    query = cl_crm_bol_dquery_service=>get_instance( 'BTQAct' ). " Get instance of dynamic query
    Set general query parameter for maximum number of hits
          lwa_params-name = 'MAX_HITS' .
          lwa_params-value = '50'.
          APPEND lwa_params TO lt_params.
          query->set_query_parameters( it_parameters = lt_params ).
          query->add_selection_param( iv_attr_name = 'OBJECT_ID'
                                                    iv_sign      = 'I'
                                                    iv_option    = 'EQ'
                                                    iv_low       = <lv_objectid>
                                                    iv_high      = '' ). " Set your search criteria. Repeat this code if you have multiple parameters
    "You can find possible search options for a query object in  GENIL_BOL_BROWSER
    result ?= query->get_query_result(  ).   " Get result from your search query
    me->typed_context-> <your result context node>->set_collection( result ). 
    Here you will have to create a context node in your view which would refer to query result object like for BTQAct its BTQRAct                      
    Hope this helps.
    e Regards,
    Bhushan

  • Problem in displaying update page when multiple results table regions.....

    Hi,
    In Search page, I have 4 Search result table regions.(1.PropertyResultsTable,2.HouseDetailResultsTable,3.WaterDetailsResultsTable,4.ElectricityResultsTable)
    In PropertyResultsTable Search result table region when I click the update Icon its showing the Last table region's(i.e ElectricityResultsTable) update page.
    Same thing happening for 2.HouseDetailResultsTable,3.WaterDetailsResultsTable also.
    If my search page contain only one result table region I can able to update the record successfully.
    How to get the correct update page if there is more than one results table and each table has the update icon to update the respective record.
    Please suggest.
    Thanks & Regards,
    Sagarika

    Hi,
    Thanks for your response.
    Each search result table has its own controller and I have one RootController for handling 'Go' button click.
    Here is the code,
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    //Transaction
    if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,
    "waterDetailCreateTxn",
    false)) {
    am.invokeMethod("rollbackServiceInfo");
    TransactionUnitHelper.endTransactionUnit(pageContext,
    "waterDetailCreateTxn");
    else if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,
    "waterDetailUpdateTxn",
    false)) {
    am.invokeMethod("rollbackServiceInfo");
    TransactionUnitHelper.endTransactionUnit(pageContext,
    "waterDetailUpdateTxn");
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if ("update".equals(pageContext.getParameter(EVENT_PARAM))) {
    // The user has clicked an "Update" icon so we want to navigate
    // to the first step of the multistep "Update Employee" flow.
    // Retain AM
    // Do not display breadcrumbs
    pageContext.setForwardURL("OA.jsp?page=/uttara/oracle/apps/uttaraimc/createCitizen/webui/WaterDetailUpdatePG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null, null, true,
    OAWebBeanConstants.ADD_BREAD_CRUMB_NO,
    OAWebBeanConstants.IGNORE_MESSAGES);
    Thanks & Regards,
    Sagarika

  • How to implement 'Quick Select' column in a query result table?

    Hi,
    I have a requirement in OAF to design a search page with 'Quick select' column.
    One of the column in the query result table should be a quick select.
    Once user clicks on the quick select column, we have to navigate back to the previous page with the row value selected.
    Can anyone help me in this.
    Thanks.

    Also refer the search exercise in the toolbox tutorials.
    you can implement the quick search in the same way as update and delete buttons.
    --Prasanna                                                                                                                                                                                                                                                                                                                                   

  • New Z-table to auto-populate description based on the key field entered

    Hi Gurus,
    I have to created a z-table, there are several fields however I am interested in only two
    1) VSTEL and 2) PADEST for shipping point and the printer name. Also there are two other fields I have added to the table that are the descriptions for VSTEL and PADEST. Now the requirement is that when the user enteres a value in table maintenance ( sm30)
    for say VSTEL, then its description should auto populate or propose the right values. Same should happen for the PADEST and its description field.
    Thanks.

    Goto the Table maintenance generator of the Table.
    On this screen.
    Environment -
    > Modification -
    > Events
    Create New entry in the table with T = 05 and Z <any name>
    Save it.
    An editor button appears next to the from name.
    Click on it and create an include.
    Write your code in this include...
    select vstel
           padest
           from table XXXX into table I_XXXX
           where vstel = (Z_VSTEL)User enterd VSTEL in module pool.
    If sy-subrc = 0.
          loop at I_XX into wa_xxx.      
              if wa_xxx-vstel = Z_vstel.
                z_padest(Desc field in Tab maint) = wa_XXX-PADEST.  
              endif.
          endloop.
    endif.
    The same logic can be used to get the desc for VSTEL and PDEST.
    You can change this in many ways based on performance.
    The above code is just to give an idea...
    Regards,
    Kittu

  • Could query form and result table display at seperate pages

    we are new at html db, there are a few of questions we need to clear before we make decision to use HTML DB to develop our next version of application: (I seperate them at differenct topics).
    * Could query form and query result table display at differenct pages?
    Thanks
    Lei

    yeah, this is surely possible...and quite easy. you'd just set your form page up as you'd like. put a button on that page with a branch to your report page. then have your report query refer to the items you defined on the form page. so if your form page had an item called P1_JOB and P1_DEPTNO you could have your report use those items with a query like...
    select ename, job, sal, empno, deptno
    from emp
    where :P1_JOB = job
    and :P1_DEPTNO = deptno
    ...hope this helps,
    raj

  • Table with some columns with result of a query

    Hi:
    I would like to show the result of a query in some colums. For example, if I have a table of cities and I get 6 cities in my query, show them in two rows of 3 columns.
    I had thought use a forEach component of ADF, but I have no get nothing.... ;(
    Any ideas???
    Thanks
    Message was edited by:
    ALF

    Hi again:
    My idea is, for example show 3 columns of a query. Let´s suposse that we have 9 rows in the result of a query. I know how to show them in the same colum but... How to separate them in diferent colums?
    Result of the query = 1,2,3,4,5,6,7,8,9
    I would like to show the results so that:
    Col1 Col2 Col3
    1--------2--------3
    4--------5--------6
    7--------8--------9
    Thanks
    Message was edited by:
    ALF

  • OA Query Region shows previous search results when moving between pages

    Hello All,
    I have a custom OA Page which has a query region based on a LOV for searching device names. The problem I am facing is once device name is searched and I go to another page through the quick links and come back to same Search Device page, it shows the previous searched results. I am not retaining AM for any page navigation.
    Things I have already tried :
    1 . I have tried refreshing VO by using clearcache and reset methods on VO.
    2. Get the Go button from the query region in ProcessFormRequest and on Go button click I use forwardImmediatelyToCurrentPage. And in Process Request method I am querying the results manually when Go button is clicked. Otherwise I am manually making the where clause condition 1=2 and ensuring that the VO does not return any rows.
    But still I am not able to get rid of the issue.
    The code used is pasted below for your reference. It is urgent. Can you please provide any pointers.
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    try
    VpaAdminAMImpl am = (VpaAdminAMImpl)pageContext.getApplicationModule(webBean);
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1();
    deviceAll.clearCache();
    deviceAll.reset();
    deviceAll.setWhereClause("1=2");
    deviceAll.setWhereClauseParams(null);
    String query = deviceAll.getQuery();
    System.out.println("getSearchResult query :="+query);
    deviceAll.executeQuery();
    OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("region1");
    String goAction = queryBean.getGoButtonName();
    if(pageContext.getParameter(goAction) != null)
    getSearchResult(am, pageContext, webBean);
    catch(Exception ex)
    throwException("SearchDeviceCO.processRequest",ex);
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String action = pageContext.getParameter(EVENT_PARAM);
    OAQueryBean queryBean = (OAQueryBean)webBean.findChildRecursive("region1");
    String Go = queryBean.getGoButtonName();
    System.out.println(pageContext.getParameter(Go));
    if(pageContext.getParameter(Go) != null)
    pageContext.forwardImmediatelyToCurrentPage(null,false,"N");
    public void getSearchResult(VpaAdminAMImpl am, OAPageContext pageContext, OAWebBean webBean)
    try
    String device = pageContext.getParameter("deviceSearch");
    StringBuffer sb = new StringBuffer();
    if(device != null && device != "")
    sb.append(" DEVICE_NAME = '");
    sb.append(device);
    sb.append("'");
    String sql = sb.toString();
    TkvpaDeviceSearchVOImpl deviceAll = am.getTkvpaDeviceSearchVO1();
    deviceAll.setWhereClause(sql);
    deviceAll.setWhereClauseParams(null);
    String query = deviceAll.getQuery();
    System.out.println("getSearchResult query :="+query);
    deviceAll.executeQuery();
    }catch(Exception e)
    e.printStackTrace();
    Thanks in Advance,
    Abhishek Mishra

    Hi Anand,
    The getSearchResult method also does the same thing. I have also tried to remove the dependency on getSearchResult and wrote the same code in ProcessRequest() but still it does not solve the problem.
    In fact, I have ensured that the VO does not contain any records and have checked these by using SOPs and debug in JDEV. The interesting point is the VO does not have any records but still the previous search data and search criteria is shown when we navigate to the page. Printed the query just before performing execute query and that query does not return any records. Also tried printing something if there are any records in the VO by using vo.hasNext().
    Data gets stored somewhere and it is shown when the page is navigated from other page. FYI, this page is accessed from quick links and there are other pages also in the quick links and when we navigate between these pages we get to see the previous search results. Tried methods clearCache(), reset() on VOs but still unsuccessful.
    Not even that I thought that the VO may be corrupted in some sense so I created a new VO instance in the AM and then used newly created VO instance in the query region. But still no luck.
    Any pointers will be appreciated.
    Thanks in Advance,
    Abhishek

  • Af:query search page i have, in my result table on command is there ,i.e ID

    af:query search page i have, in my result table on command is there ,i.e ID
    when i am clickeing on a ID ,regarding id related details EDIT page i want display.
    i need code and process of this USECASE.
    Please replay ASAP

    User,  without a jdev version and an understandable user case we can't help.
    Timo

  • Results table difference when running query from Alert compared to Query Manager

    Hello,
    I have following query - Aim is to create alert to tell employee which customers to make visit to in next 4 weeks
    SELECT DISTINCT T1.CardName, T1.U_VisitDue, T1.U_VisitReason, T1.U_Priority, T1.U_Region as 'Area', T1.U_VNotes
    FROM dbo.OCRD T1
    WHERE DateDiff(d,T1.U_VisitDue, GETDATE()) <29
    Group BY T1.CardName, T1.U_VNotes, T1.U_VisitDue, T1.U_VisitReason, T1.U_Priority, T1.U_Region
    FOR BROWSE
    My problem is that when I run query through alert the field U_VNotes is displayed differently.
    Running the query from Query Manager the contents of this field appear in one field of the result table.
    Running the query via Alery the content of this field is split into several fields in results table according to 'new line' in field entry.
    This makes the results table from the Query less 'user-friendly' because if you want to sort the table by 'Date' column for example it makes a mess of the table because of the extra rows.
    I want results table to look like top version in picture below ... but i want to run from alert.
    Is this possible?
    How can I achieve it?
    Thanks for any assistance
    Regards, Karen

    Hi
    check this support note:1774628 The SQL SELECT DISTINCT Statement does not work in ALERTS
    Kind regards
    Agustín Marcos Cividanes

  • Query Panel reset is clearing attribute level validations in the results table.

    Hi,
    I'm using JDeveloper 11.1.2.3.0.
    I have a query panel with editable table in a jsf page.
    In the EmployeesEO i have an attribute validation for Salary. that is Salary should not  be a negative value.
    I ran the Jsf page, click on Query panel Search, results are displayed.
    I changed the salary to -100 from 50000 and tabout, error message is shown properly at attribute level.
    I clicked on Query panel's Reset button, now Salary is showing as 50000 in the results table. But when i click on Commit button to save the changes, then -100 is showing and throwing the validation message.
    Can you please let me know if there is any way to not clear the values in the Results Table?
    Thanks,
    Vinod

    Once you submit the values the reset button can't undo these changes. To reset the changes you either need to call rollback or you have set a save point before the changes and then reset to the save point.
    What I don't understand is why the click on the reset does show you the old value.
    Timo

  • Issue with Query Region with Table

    All,
    I have a Self Service Page , which has got a Query Region and an underlying Table.
    For the table/ Table Actions Region , I am setting the View Instance and View Attribute Programatically
    OATableBean myRequirementsBean =
    (OATableBean)webBean.findChildRecursive("MyReqTable");
    myRequirementsBean.setViewUsageName(voName);
    OAExportBean exportButtonBean =
    (OAExportBean)webBean.findChildRecursive("ExportButton");
    exportButtonBean.setViewUsageName(voName);
    OAWebBean ssWebBean = webBean.findIndexedChildRecursive("RadioSelect") ;
    ((OASingleSelectionBean)ssWebBean).setViewUsageName(voName);
    ((OASingleSelectionBean)ssWebBean).setViewAttributeName("RadioFlag");
    Followed by prepareForRendering call on Table Bean.
    myRequirementsBean.prepareForRendering(pageContext);
    When I render the Page , I can not see the Table Selection and see the Rows in Table alone.But if I navigate to Personalize View Page and come back to parent Page , I can see the Table Action.
    What could be the reason for this behavior? Please advise.
    Thanks
    Joseph George

    what item does RadioSelect refer to ? is it a child of the table bean ?
    Thanks
    Tapash

  • Filter in query result table not populated by criteria previously selected.

    Hi Experts,
    I'm currently working on the the Upgrade of our BW production line from
    release 3.0b to 7.0:
    Configuration of target system
    BW system : Release 7.0
    BEx Analyser : Release 2004s, Support Package9, Patch 1, Revision 321
    Sap Gui 6.4
    We're especially trying to check the non-regression of the non-converted queries in the new system (release 7.0).
    And we get the following issue: After having selected the selection criteria in the selection window, the reminder of selected criteria is not done in the filter part of the target query result. Is it a normal behavior or not ?
    Indeed, in the previous system configuration (BW 3.0b), the user is accustomed to seeing just above his result table the selection criteria that he had previously filled in in the selection window.
    Please find herewith an example describing the problem.
    Thanks in advance for your help.

    In order to be more clear, hereunder an example:
    - I have a field untitled "Business Division"in the selection window.*
    - I fill in this field with the value "OND"
    - I execute the query with this value for this field.
    - The query result correclty appears.
    - I click on the "Filter" button to display the Filter table with the columns "Navigation pane" and "Filter criteria".
    - In the "Navigation pane", there is the field "Business Division".
    - For me, the corresponding "Filter criteria" should be the value "OND", but nothing is displayed...
    Thanks in advance foryour help.
    Regards,
    Steph

  • Extracting the result of a query into a internal table

    Hi,
    Does anyone knows or have an idea how to extract the result of a query into a internal table, is there a function module or BAPI?
    Thanks in advance,
    CK

    So then normally I would use a statment like:
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_SALESORDER_GETLIST</b>");
    to call a particluar function, but I tried using
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>BAPI_MDDATAPROVIDERBW_GETCATALOGS</b>");
    and it did not seem to work. I also tried -
    IFunctionTemplate ftemplate = repository.getFunctionTemplate("<b>MDDataProviderBW.GetCatalogs</b>");
    How do I format the function?
    Thanks
    Paul

Maybe you are looking for

  • Issue with MB51 - Value in Amount in LC column- Reg

    Dear ALL, I have an issue from Materia Ledger  - while executing the report MB51  to view the material document with relevant to MIGO process (GRN with movement type 101), it has been noticed  that  some items it is picking up the value in amount in

  • Problem in Using a Text file

    Hello, I want to read my text from a text file and it�s not a predetermined text, what i want to do is read the records in the form of text and i want to use "," as the delimiter between each Column in my Output file. I was trying to do this but some

  • Why can't safari display pdf files?

    I recently updated Safari to 5.1 and Adobe Reader to 10.1.1. on OS X10.6.8. Now Safari just shows me a flat gray screen when I browse to a location that's a pdf file. Can't say which of the two updates actually broke the function. Used to work, altho

  • Debugging a non-working login hook

    I'm setting up labs in a school, some have 2008 iMacs, 2007 iMacs, 2007 Macbooks and powerbook g4's. I have a new 2008 iMac as my master image and I've set-up a LoginHook in com.apple.loginwindow.plist that runs a script that works just great. It doe

  • Look and feel master detail form

    Hello i have difficulties at the time of trying to decorate a master detail form i have 2 blocks one is the master and the other is the detail the question is can i change the text item of the master which are in the same tab canvas that the detail t