Changing LOV VO Query programmatically

Hi All,
I have a requirement where I need to change the LOV query programmatically based on another component on the page. The issue is demonstrated below where I need to change the 'Owner'
LOV query based on 'Owner Type' .
Owner Type : EMP/GRP
Owner : Based on value in 'Owner Type' which is EMP/GRP , two different queries are fired , based on which the LOV should be populated.
Query for Owner incase EMP is selected in 'Owner Type'(EmpLovVO) :
select emp_number, emp_name from emp;
Query for Owner incase GRP is selected in 'Owner Type'(GrpLovVO1) :
select grp_number, grp_name from grp;
I have created two VO EmpLovVO , GrpLovVO and added to the OwnerLovAM . I have written the below code to change the Lov VO in CO(processRequest).
if(OwnerTypeVar.equals("GRP"))
     ((OAListOfValuesBean)webBean).setViewUsageName("GrpLovVO1");     
Can you please let me know what items are to be added to OwnerLovRN and from which VO. Please note the column names are diffent in two VO's and i am using LOV component as messageLovInput. Also let me know if i am missing any step.

Eventhough the column names are different, while creating VOs for for the LOV use alias names and make sure that both VOs have same attributes.
Then in your controller, based on the owner set the VO instance. In your CO code make sure you also handles both EMP and GRP ower types.
Regards,
Peddi.

Similar Messages

  • Can i change table in query as per user given data

    hi master
    sir,
    can i change table in query as per user given data
    see
    select * from @variable
    i need use in lov
    please give me idea
    thankingyou
    Aamir

    You cant directly use in sql instead you can write an anonymous block and frame the query as per the input table name and then use execute immediate to execute the query.
    Something like this
    declare
    qry_table varchar2(30);
    qry_stmt varchar2(1000);
    type typ_sample is table of VARCHAR2(100) index by binary_integer;
    tab_sample typ_sample ;
    begin
    qry_table := &Table_name
    qry_stmt := 'select a from '||qry_table;
    execute immediate qry_stmt bulk collect into tab_sample ;
    end;
    Message was edited by:
    Shasi

  • How to track changes in Adhoc query?

    Hi all,
    We have requirement for retrofitting  the changes done in one Server to other, in the process the Changes in New server should not be overwritten.Currently for Adhoc queries - we're downloading from one server-  loading to the New server.
    Is there any way to track the changes in Adhoc query to avoid overwriting the changes.
    Thanks  in advance.
    Harika.

    Hi,
    You can download the Employee wise Bank Details of IT0009 or using Adhoc query
    You have employee wise WT reporter
    Now do a Vlookup with the Employee Wt report  and the Adhoc query.
    If you have problems in vlookup
    pls send both the files to me on hemant.mahale capgemini com
    Regards
    Hemant V. Mahale

  • Infotype 0120 - changes in adhoc query program

    Hi All,
    I have to make some code changes for the std infotype 0102 - Grievances NA in the adhoc query. My requirement is :-
    1) A range from 000-999 should be available for each Employee for the Grievance Number field. P0102-GRNUM.
    2) If a record already exists for the employee for a particular Grievance Number -GRNUM(e.g - 467) and Stage- GRSTG(e.g.- Stage1), the system should not allow to enter another record with the same Grievance Number and Stage for the same employee.i.e. No duplication should be allowed. i.e only 3 records for 1 Grievance Number as there are only 3 stages.
    Please advice me how to proceed for the same.
    Thanks & Regards,
    Preeti

    hi
    Its not getting clear that u want the changes for ADhoc query or in pa30.
    if u want validations in adhoc query as u have mentioned in the question
    u need not to go to a user exit.
    In adoc query itself u can incorporate these changes
    u can go to infoset of this query and write a abap code which checks the Infotype 102 for the grievance no.
    If u want the validation on while creating the record then u have to use user exit ZXPAUD01 or can use BADI's also .
    Regards
    Manish
    Award reward paoints If Useful

  • How do I change the underlying query for the task board (and backlog board) on TFS Preview

    All,
    We work with multi-area projects, each area representing a significant component within the project with its own release/iteration cycle. i.e. Several areas may be active at once, each with different iterations.
    When we look at the task board these take no account of the area being worked on. What I need to do is to be able to change the query behind these boards to point to a particular release/iteration for a particular area.
    Unfortunately there is no drop down selection on these pages to see this automatically so I need to be able to change the underlying query that populates these boards to get the the area and release/iteration that I need.... but I can't find where these
    are.
    Using multiple areas is actually highly frustrating with TFS Preview as it doesn't seem geared up at all to make it easy to switch between them... are we doing something wrong?
    I think I can do this by changing the current iteration - but I can't work out how to do this either once an iteration for a particular area has started.
    Can anybody help?
    Thanks

    It is not possible to modify the query behind the task board. If I understand you correctly, you would like to filter the task board by area path.
    In TFS 2012 we have repurposed the area path field to be the field that determines the team you are working on. We are continuously improving our product and being able to filter your task is one of the improvements that we are thinking of.
    Sorry I can't help you better than this for the moment.
    Please remember to mark the replies as answers if they help.
    Hi Ewald,
    We have a similar problem, see the thread "Best approach for multi-team/multi-projects." on this forum. I'm hopping you can help, since so far the different answers doesn't help.
    Best Regards,
    SYSOTI

  • Change logs for query...........

    Hi,
    How to check the logs for query changes. Means which user has done what change.In properties we get the last user only.
    Is there any way to check the full history of changes?
    Can we change that in some transport request?
    Bye,
    Jeetu

    Hi,
    There is no such facilities available to find, which user has done what changes in the query. you can only get the last changed 's user name of query. in transport request also you cannot change the query.
    To add, check out this:
    Tcode SQ01>select 'Environement' from the menu>Directories>All Queries
    in the popup window, select a query and click on 'Display' button. you would get some useful information about that query
    Bye

  • Use Of LOV In Query Panel

    Hi All,
    I would like to have LOV in query panel one which is created using view critiria.
    Kindly let me know the best way to implement this one...............
    Regards
    Anandkumar S.M.

    Check this:
    http://blogs.oracle.com/shay/2009/12/adf_query_with_parameters_and_1.html
    Thanks,
    Navaneeth

  • How to pass parameters to a Lov's Query?

    Hi friends,
    [Apps R12]
    I'm trying to extend the a ProjectLOVVO (for OTL, in example) and the extension would consist on modifying the Lov Query adding in the where clause a comparison with certain fields of the page....
    How can I retrieve a value in the page , a field/item, form_value, or similar and put it in the Lov's query? Is there any direct way to reference it..? Is it necessary to do any special mapping? What about those "bind variables", .. I don't know exactly how to use them.. and if this could be a purpose for their use..
    Thanks for any comment.

    Hi Prasanna,
    thanks for he coment, but.. I think It really doesn't exists the LOV Region Item you mention...
    I mean, the "real" case is:
    In OTL, inside Create timecard page (+/oracle/apps/hxc/selfservice/timecard/webui/TcActivitiesPG+) I want to restrict the Project LOV query (ProjectLOVVO) to add the project manager in the LOV (well, it can be done adding to the from & where clauses the per_all_people_f and pa_project_players) but, for this, is necessary to check the dates.... so It's necessary to add in the where clause a check for the "period", that is a data in a poplist on the screen... [I wasn't be able to locate where is that period stored]
    Also, as a Time card is for a person.. I need too to retrieve the person_id for that person (this person could not be the one who has connected... because you can create a timecard for another user) so.. I see this information on screen at the top, where it appears the "Time Entry:" label... but.. how to locate it into page? and.. are you sure it can be mapped to include it in the LOV query? (It would be necessary to use it as I've seen in others lov's queries.. where it seems to appear parameters/variables/mapping named as :1 ,:2 ... :number... , I don't know how to add it)
    Any detail step would be very appreciated.
    Thanks a lot.!!

  • How to Enable the LOV to query for partial user entries in af:query in an ADF search form

    Hi guys,
    I have faced one issue in creating a search form in ADF, in that I have used af:query and table region. and I have attached an lov vo to the base vo for the list of values and given UI hint as Input values with List of values. Now the issue is that I have given auto submit property as true so when I give some value suppose "Jan-14" and tab out it gives me all the correct results. but if I give like "Jan%" and then tab out then it does not give me any value. Could you kindly help me with some solution. I am using Jdev 11.1.1.6.0.
    Thanks,
    Tanmoy

    To enable the LOV to query for partial user entries, we can trap the 'LaunchPopupListener' event and add custom code there. Within the af:query component, just wondering how can we set property the 'LaunchPopupListener' for the search criteria ?

  • How to supply values for searchCriteria items in af:query programmatically

    Hi,
    Is it possible to supply the default values for search criteria items in af:query programmatically? I didn't find any of the method to set the values for the search criteria items inside the oracle.adf.view.rich.model.Criterion and oracle.adf.view.rich.model.AttributeCriterion classes.
    Please let me know how can I supply DATE values by default for the search criteria items inside the view criteria.
    Thanks

    Jdev I am using is 1.5.
    I've search page where I've a date field (like TransactionDate). The transactionDate is a transient variable in my VO. Created a view criteria using this transient date filed and kept the operator as 'Between'. When I load the page, I want to keep the values for Between operator as 'CurrentDate' and 'CurrentDate - 365 days' (LastYearDate as of today).
    I can't use bind variables to set the currentDate and lastYearDate to the values of the 'Between' operator. If I use so, I will get an error 'Attempt to set a parameter that doesn't occur in the sql.....'.
    So I thought of overriding the QueryEvent inside the bean. But I didn't find a way to set the values for the TransactionDate programmatically.
    I tried below code in the queryEvent method, but in this case the response time is very hign ( I didn't see the result till 30mn).
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    ViewCriteria vc =
    JUSearchBindingCustomizer.getViewCriteria((DCBindingContainer)bc.findExecutableBinding("SupplierSearchCriteriaQuery"),"__ImplicitViewCriteria__");
    Date curretYearDate = null, lastYearDate = null;
    Calendar calendar = Calendar.getInstance();
    curretYearDate = calendar.getTime();
    calendar.add(Calendar.DAY_OF_YEAR, -365);
    lastYearDate =calendar.getTime();
    Object o = new Date();
    ViewCriteriaRow vcr = (ViewCriteriaRow)vc.get(0);
    for(int i=0;i<vcr.getAttributeNames().length;i++) {
    if(vcr.getAttributeNames() == "LastTransactionDate") {
    System.out.println("====================== opeartor ================== " + vcr.getOperator("LastTransactionDate"));
    if( ("%".equals(vcr.getAttributeValues()[i]) || vcr.getAttributeValues()[i]==null)) {
    List nameList = new ArrayList();
    nameList.add("LastTransactionDate");
    List valueList = new ArrayList();
    valueList.add(lastYearDate);
    valueList.add(curretYearDate);
    vcr.setAttributeValues(nameList, valueList);
    vc.addRow(vcr);
    JUSearchBindingCustomizer.applyAndExecuteViewCriteria(bc, vc);
    Thanks,
    Lakshman

  • Bind option in report. How to change setting in Query Designer?

    Hello,
    Is there any way of changing the 'Bind display of textx/attributes in data provider result and in value help' in the portal. We can change this option from the report by right clicking on the characteristic -> Properties -> Characteristic -> Selecting the 'Advanced' tab. But we want to make a permanent change to this option from the query designer so that the users would not have to change it every time they run the report. Can anyone point to where I can make that change in the query designer or anywhere else if that works?
    There is a characteristic say 'XYZ'. It has a attribute 'ATTR'. We want to display the attribute alone in the column of the query. We are able to do so by bringing the characteristic 'XYZ' and dragging and dropping the attribute 'ATTR' under it. We then change the display options to make the characteristic as 'No dispaly'. But this affects not just the characteristic in the columns, but also in the Navigational blocks. So the users are not able to see any values while filtering. One way to fix this is to uncheck the 'Bind display of textx/attributes in data provider result and in value help' option after the report is executed which is an end user task. But we want to find out a way of changing this from the query designer, so that the users won't need to carry out his activity every time they run the report.
    Any help is appreciated.
    Thanks

    <p>There are a few ways that you can achieve this. If your SQL Queries have their filters modified (ie. WHERE clause) then this can be easily solved by adding report parameters to the Report filter. Search the in-product help for "Record Filter" and you should get a number of helpful resources returned.</p><p>Additionally, you can pass in java.sql.ResultSet objects with a populated recordset of the data you want to show in the report. We don&#39;t currently provide any tools to assist the creation of the code stubs for thick-client applications (like we do for JSP pages) however you can download a collection of thick-client sample code from here:</p><p><a href="http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_desktop_samples.zip">http://support.businessobjects.com/communityCS/FilesAndUpdates/crxi_r2_jrc_desktop_samples.zip</a> </p><p>As I mentioned, this sample contains a collection of code snippets. The one in particular you will be interested in is titled "JRCResultsetDatasource". Hopefully, this will provide you with a few options. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

  • Local Changes to a Query in a Workbook

    Hi guys.....
    In 7.0... Theres a way to change locally a query assigned to a workbook?
    Like in version 3.5 wher you can change locally the query definition......
    I need to know if its possible or we need to create another query...??
    Regards

    Hi Oscar,
    Did you wanted to reassign a different query to the same workbook ?
    Try :
    BI 7.0
    Run the workbook
    Switch on Design Mode ( Letter A )
    RClick on table - Properties
    Click on Pencil Icon
    Assign Query - Select the new one

  • Problems changing a iview name programmatically

    hi people
    im trying to change a iview name programmatically but the application give a exception: java.lang.NoClassDefFoundError: com/sapportals/portal/pcd/pl/PlLocaleTextPair
    This class is just the class that i need for get the name and for change the name, i have this class in the jar com.sap.portal.pcmbuilderservice_api.jar located in my classpath...
    my actual test code is the next:
                   PlLocaleTextPair newName=(PlLocaleTextPair)name.get(0);
                   PlLocaleTextPair newNameEn=(PlLocaleTextPair)name.get(1);          
                   PlLocaleTextPair newNameEs=(PlLocaleTextPair)name.get(2);               
                   newName.setText("newName");
                   newNameEs.setText("newNameEs");
                   newNameEn.setText("newNameEn");
                   name.set(0,newName);
                   name.set(1,newNameEn);
                   name.set(2,newNameEs);
    someone can help me??
    thank you

    Hi Ismael,
    Can you try using a PCD Inspector to do the same.
    The name of the iview is stored using the property com.sap.portal.pcm.Title. You need to change the name in this property. Remember to update the name with the right locale i.e. the locale which is set for the Portal.
    http://help.sap.com/saphelp_nw70/helpdata/EN/47/a4a442dc030e31e10000000a1550b0/content.htm
    I am not too sure about the coding part.
    Thanks,
    Nikhil

  • Change area of query and infoset.

    Hello experts ,
    I have query and infoset that it save in client specific , if i want to transfer them into the Q.A system
    Which i must to save them to global area ? if yes , how can i to change area of query and infoset from client specific to global area without  create them from the beginning ?
    Thanks for your help.
    Avi.

    No relationships of any sort can exist between objects from different query areas
    You have to create the same query from beginning in Global area and then transport it as follows :
    1. By using the standard program u2018RSAQR3TRu2019
    2. By using the transport option available on the application bar in Transactions SQ02 or SQ03.
    Note : Order of transport should be :
                     User Group transport
                     Infoset transport
                     Queries transport
    Edited by: harsh bhalla on Mar 26, 2009 11:42 AM

  • Last changed date of query showing old date

    Hi All,
    We have made a change to a query (description change) and saved.  When we open the Analyzer we still see the old description and also the last changed date shows an old date.  Not the latest date the query was last changed on.  We tried generating the query in RSRT, but no luck.
    Can someone let us know what we can do?
    Thanks!

    Hi Kams,
    We are using the Analyzer, log out back in, etc...
    As mentioned we did a regenerate by RSRT 'generate'
    any other ideas?

Maybe you are looking for

  • G4Ti4200-VTD64 voltage incompatibility with MSI K7N2 Delta-ILSR??

    Hello,     I have the MSI G4Ti4200-VTD64 (4X) video card..  I want to upgrade my motherboard to K7N2 Delta-ILSR. Is there any voltage incompatibility?? I heard that new mother boards will support only AGP 1.5V. Is the AGP voltage of K7N2 Delta-ILSR 1

  • Windows 8.1 Group Policy to Force Domain Logon as Default?

    I recently purchased a new Windows 8.1 computer for use in our organization.  The default logon option for the device is for a Microsoft Account (the default username field prompt is for an e-mail address, rather than for a username.)  However, I wou

  • IPod won't sync my new tv episode

    The 10th tv episode of a show I purchased has been added to my iTunes account. I want to sync my iPod with my iTunes in order to add the 10th episode (the other 9 are already on the iPod and there is still room for the 10th). Wifi is off on the iPod.

  • Ora-01031: Insufficient Privileges during 10g install on Suse 9.1

    I have tried installing Oracle 10g on Suse 9.1 Professional several times. Although I have tried to carefully follow the instructions in the installation guide, I get the following error. When the Database Configuration Assistant start during the ini

  • Ipad doesn't axcept my password to open my ipad

    My Ipad won't accept my Ipad password ! Please help me, I reset the Ipad with my computer because I cannot open Icloud in my Ipad. When I typed in the correct password still indicate wrong password! How do I get into my Ipad? Thanks, AS