Restrict the list of values retrieved by a model driven LOV
hi all
i'm try to restrict the list of values retrieved by a model driven LOV just like the article in this link
http://www.oracle.com/technology/products/jdev/tips/fnimphius/restrictlovlist/restrictlov.html
and i'm using the jdev11.2 but i always get this error
java.sql.SQLException: parameter IN or OUT is missing at index 1
my code is :
public void SetSchoolLovVar(LaunchPopupEvent launchPopupEvent)
String var_val=getOt7().getValue().toString();
System.out.println("++++++++++++++++++++++++++++++++"+var_val);
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DeptCode");
System.out.print("LOVE "+lov);
System.out.println("+_+_+_+_+__+_+_+__+_+_+_+_+_+_+_+_+_+_________+++++_+_+_"+lov.getName());
lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("Rejon_For_Prj_Dept",var_val);
Rejon_For_Prj_Dept is the bind variable of the Lov Query.
any good idea
Hi,
The error might be due to making the bind variable as required but not using it in the vo query. Edit the bind variable and make it as optional by unchecking the required checkbox.
Sireesha
Similar Messages
-
How to update bind variable and restrict values in a Model Driven LOV?
Hi Guys,
Using JDev 11.1.1.2.0
I've recreated an excellent Frank Nimphius article about restricting values derived from a model driven LOV (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/44-restrict-lov-169186.pdf)
But my bind variable isn't updating. Deleting the bind variable gets me the entire LOV. Activate the code below and insert a bind variable into the where clause like Frank says and I get nothing back. Bind variable is blank. Any ideas? Code wasn't supplied with the article. It seems simple enough but the bind variable isn't updating in the SQL, even though the updated value shows up here...
public void onLovLaunch(LaunchPopupEvent launchPopupEvent)
BindingContext bctx = BindingContext.getCurrent();
BindingContainer bindings = bctx.getCurrentBindingsEntry();
FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)bindings.get("DepartmentId");
lov.getListIterBinding().getViewObject().setNamedWhereClauseParam("deptId","60");
System.out.println("lov name: " + lov.getName().toString());
System.out.println("lov Param Attrs: " + lov.getListIterBinding().getViewObject().getNamedWhereClauseParams().getAttribute("deptId").toString());
System.out.println("lov View Object: " + lov.getListIterBinding().getViewObject().getName().toString());
System.out.println("lov IterBinding: " + lov.getListIterBinding().getName().toString());
}Gets me ...
lov name: DepartmentId
lov Param Attrs: 60
lov View Object: _LOCAL_VIEW_USAGE_lov_model_queries_EmployeesView_DepartmentsView
lov IterBinding: DepartmentIdList_2That's a good idea, but it's still not working. Here is how I implemented it. It might be different from your suggestion as I'm still pretty new to this.
I have a recursive tree table. You select a node. You then click a button which calls the listener below. "findParents" is a method call to the AppModuleImpl class and it finds all parent nodes of your selection. "restrictPartBomLOV", also of the AppModuleImpl class, then modifies the model driven lists' View Object (partBomLOV) to exclude those parent node values.
The resulting model driven LOV on the popup should be updated, yeah? But it still isn't udpating. If I manually type in the updated Where clause in PartBomLOV.xml query tab, it works, but it doesn't programmatically.
public void insertPopupFetchListener(PopupFetchEvent popupFetchEvent)
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("findParents");
parents = (List)operationBinding.execute();
operationBinding = bindings.getOperationBinding("restrictPartBomLOV");
operationBinding.execute();
public void restrictPartBomLOV(List parents)
ViewObjectImpl vo = getPartBomLOV();
String wcl = "";
Object[] p = parents.toArray();
for(int i = 0; i < p.length; i++)
if (i == 0)
wcl = wcl + "PNUM <> '" + p.toString() + "'";
else
wcl = wcl + "AND PNUM <> '" + p[i].toString() + "'";
vo.setWhereClause(wcl);
System.out.println(vo.getWhereClause().toString());
vo.executeQuery();
Edited by: LovettWB on Nov 11, 2010 11:23 PM -
How can i restrict the Expenditure Type values at a specific OU ?
Dear Guys,
I would like to ask about the Expenditure Types,
I have implemented two projects for different Operating Units ,
when navigating to any Projects responsibilty,and navigating the Expenditure Type field
the values exist are all the values implemented across the OU not the values entered at this OU
How can i restrict the Expenditure Type values at a specific OU
Regards
Amr HussienHello
When you set up a project there is an option called Transaction Control.
This option allow you to list the allowed or restricted elements of costs for the project.
You may enter the transaction control on a project template and that will be copied to any new project.
The cost elements may be expenditure types, expenditures categories, suppliers, employees, etc.
In your case, I suggest to set up specific project templates for each operating units. On each template enter the list of allowed expenditures types for that OU.
Doing so, the system restricts users from entering any expenditure item, supplier invoice, purchase cost etc, against an expenditure type, which is not allowed.
Dina -
How to get the list of values for a dynamic parameter using Web Services SDK?
<p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>
<p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>
-
Master details form: in the details form the List of values is not working
The master details have an upper form and a lower form OK
So, the List of values of values in the upper is working fine,
the lower form or the details form the list of values not working on it and the code is right, and mean not working like when you press on it its not showing any thing
also is work on a regular form like a tabular form .
so please help !!!
Edited by: user8925579 on May 12, 2011 2:28 PM
Edited by: user8925579 on May 12, 2011 2:37 PM
Edited by: user8925579 on May 12, 2011 2:37 PMSOLVED
CMC -> Connections
- Right click connection name, Click u201CTools > Check Relationshipu201D
- In u201CQuery Resultsu201D, Right click Connections, Click u201CUser Securityu201D
- Assign Security for u201CEveryoneu201D
- UNTICK both Inherit from Parent Folder and Inherit from Parent Group
- Assign u201CView on Demandu201D
CMC -> Universes
- Right click u201CUniversesu201D folder, click u201CPropertiesu201D
- Under u201CUser Securityu201D, click Everyone and assign security
- UNTICK both Inherit from Parent Folder and Inherit from Parent Group
- Assign u201CView on Demandu201D -
Sorting the list of value like in BEX but out of crystal report
All,
I have created a crystal report base on a BEX query where I have a variable for which i am filtering base on a field period.fiscalyear.
for the list of values that prompt you for this variable ...
l in BEX we can do the sort by either alphabetical ascending order or descending alphabetical order such as:
here is for ascending
001.2008
001.2009
or by clicking on it we can do the following: (descending)
012.2009
012.2009
however in crystal when refreshing the report in infoview it sorts the list of value base on the month
something like this :
JAN 2008 [0FISCPER].[K42008001]
FEB 2008 [0FISCPER].[K42008002]
We would like to have in crystal the same behaviour than in BEX, so in crystal we would like to be able to get the list of values sorted in either ascending order to descending order. is there a way to do so ?
notes also that we would like to avoid to create the variable in crystal
PhilippeHi,
in Crystal Reports you have per InfoObject - depending on the definition - the key value, the description and the member unique name. In BW these objects are defined as NUMC in most cases - which means it is a character / string.
In your example the value is 001.2008 and 001.2009. What you can do in Crystal Reports is to split up the values into year and month and then sort based on the actual numbers.
Ingo -
Problem in using the List of Values(LOV)
We created a folder 'Testing FCG' in the Business View Manager.
1) In this we created a new connection of TCD371 Database ( conn) ,
2) We created a new Data Foundation(DF) using the existing connection and we added table 'cdhpmember' in the DF
3) We created a new business element(BE) using DF and we added the column like Firstname,Groupkey and Gendercode
4) We created a Business View (BV) using DE and we added DE to the BV
5) We created a LOV(Memkey) using BV and we selected memberkey field
6) We tried to implement the memberkey field into crystal report as a dynamic parameter
7) When we try to run the report we got the error like this
Promting failed with the following error message: 'List of Values failure: failed to get values. [Cause of error:CSELOVDataSource::setReportInstanceCUID The List of Values did not schedule sucessfully and must be re-scheduled.]'.
Error source : prompt.dll Error code: 0x8004380D
Could any of you give your input on this error?Either store it in the session scope, or pass it as a (hidden?) parameter along the request.
-
Need to know the list of values (default one) for PAYMENT_STATUS
we need to know the list of values for PAYMENT_STATUS in IBY_PAYMENTS_ALL
(R12)
presently the payment_status shows as follows.
SELECT DISTINCT PAYMENT_STATUS FROM
iby_payments_all
PAYMENT_STATUS
FORMATTED
INSTRUCTION_CREATED
REMOVED_INSTRUCTION_TERMINATED
REMOVED_PAYMENT_STOPPED
REMOVED_REQUEST_TERMINATED
simillerly,
Need to know the list of values for PAYMENT_INSTRUCTION_STATUS in IBY_PAY_INSTRUCTIONS_ALL
(R12)
PAYMENT_INSTRUCTION_STATUS
CREATED
CREATED_READY_FOR_PRINTING
FORMATTED
FORMATTED_ELECTRONIC
PRINTED
TERMINATEDThere is nothing called "service packs" for an Oracle database. That is an MS thing.
I guess you mean patchsets which are available in Metalink as mentioned. -
Cannot generate XML for the List of Values (UX 00072)
Hi,
I had issues with a .LOV file associated with an object.
Cannot generate XML for the List of Values (UX 00072)
[LOV Name] This LOV contains data that does not originate from Corporate Data.
The object maps to data in a table of the DB that will be populated in the future. The LOV file is "empty", but I have to pass the universe into production waiting for the data.
This error doesn't permit me to go from Development to Prod.
Regards,
RiccardoYou need to set the display-property="<<Your name property>>" in item-descriptor tag.
e.g. <item-descriptor name="myItem" display-property="name" />
Cheers
R -
Input field - entry is not in the list of values
Hi
I have a very strange thing going on in my aPP.
I use an input field to which I attach an on Enter event.
When user presses 'Enter', a pop up window appears with the list of countries.
Selecting a country automatically puts this country into the input field. So far so good.
The problem, however, I am experiencing is in a situation where the user enters a valid value into the input field
without pressing 'Enter' and then continues pressing other buttons in the app. What happens is that the web dynpro framework immediately throws an exception saying the value is not in the set of accepted values.
I do not understand why the system throws such an exception if no set of values has yet been attached to the input field (by ImodifiableValueSet for example).
Any idea?
Thank you
yuval peeryHi
1. In comp controller in wdDoInit I get the list of countries and write them to a local node.
2. This node is mapped to a view in a different window.
3. When I press enter, a pop up window is created. The values mapped from the comp controller to this view are presented to
the user in a nice table.
4. When the user selects a line in the table, the method writes back the value to my input field.
Quite straight forward.
The problem is that when the user enters a valid name into the input field before even pressing "Enter" the framework
returns "entry is not in the set of values".
Frustrating.
regards
yuval -
How to restrict the function if values are not correct.
Hi,
In my requirement i am reading the actual data, for example my full week data is $70(for 7 days).
above week values i am distributing to 7 days by equally for example D1 is $10 d2 is $10...d7 is $10 and i am giving flexibility to my user he can change the data on those days but always total equals to $70.
if plan total is not equal to actual total i have to pass the error message, how can i check the plan total and actual total are equal or not?, and if the total is not equal i am passing the error message and i have to restrict the user don't save the data into TR cube,how can i restrict the save button.???
i don't want to allow the not equals data into my cube.how can i do it???
If you have sample code please can you share with me if don't have code can you give idea...
Thanks in advance..
Happy weekend.Hi ,
Thanks for your reply..
here i am creating planning function which contains parea and key figure name.
but in actual layout having month days like 28 or 29....
i have to read the all the actual values of month and i have to read all the plan values from another layout after user done the modifications on plan values.
here why i am reading the all days data is full value is not available but in layout i created full value it is total value of Column one c(1).
once user done the modification & refresh then i have to read the plan values.
how can i read and compare if you have any sample code welcome.here i am using version zero for plan and actual.
it is very urgent can you help me..
thanks... -
Restrict the no of values to 10 for select-options
hi gurus,
i have the require that the user can put only 10 distinct values for a select-option for selection screen....now to disable range selection and other signs than eq to i have used function module select_options_restrict..
The only thing which i could'nt do is restricting the values to 10. That is I want to disable (grey out ) the rows after 10 so that the user if wants also cannot put more than 10 values....i dont want to go by the convention method of displaying an error message that only 10 values are permitted...instead i will keep the provision of disabling after 10 values...
i guess that when we press the extension button the screen that comes for multiple selection is a module pool screen....so do we need to modify that screen or may be there is some other method...
please help.....im not aware of restricting the user form entry itself instead.
let the user enter the values..
select-options:so_dat for sy-datum.
at selection-screen on so_dat.
describe table so_dat lines wk_lines.
if wk_lines > 10.
throw message
endif. -
Need help for report Variable to restrict the key figure value...
Hai gurus,
Now i have data in the cube as follows...
Reuisition HR INTW date LM INTW DATE TEL INTW DATE HR Count LM Count TEL Count
a1 01.01.2010 02.01.2010 01.04.2010 1 1 1
a2 02.02.2010 03.02.2010 02.02.2010 1 1 1
a3 03.03.2010 04.03.2010 03.03.2010 1 1 1
when i execute the report it shd ask the prompts with Date interval as in the below...
HR INTW date
LM INTW DATE
TEL INTW DATE
if i dont give any interval in the variable prompt it should display all the recors as follows
Reuisition HR Count LM Count TEL Count
a1 1 1 1
a2 1 1 1
a3 1 1 1
If i give LM INTW DATE interval as 01.01.2010 to 31.02.2010
then it should display all the other counts as in the output_1 , but for LM count for a3 it should show 0.
Reuisition HR Count LM Count TEL Count
a1 1 1 1
a2 1 1 1
a3 1 0 1
that means wherever i restrict the data depending on the variable that only that interval key figure value shd be in the report..
for this scenario, which variable i need to use... and how i need to restict the KFig value in the report...
Right now i am getting like this but it is restricting the records,,, where it should not restrict the records...in the report..
Please guide me for the same...
If any concerns about the scenario please let me know...
Regards,
VJhi chowdary ,
could you tell me the var. creation in detail and with which reference object i need to create ...
whether i need to take LM_DATE / 0DATE while creating variable...
and i kept this variables it in filter section, based on the LM_DATE Object.
i have tried both.. y'day when i take 0DATE it giving me some results...
But at the same time it is restricting the records..
i think it could be a problem with var.. properties?
need more inputs pls.
Regards,
VJ -
Difficulty in updating the list object values
I have created a list with Objects(MyVertex). I am trying to update the list based on the condition . Instead it adds duplicate values. The simple logic is (if the object is already in the list )only update the values or add to the list (Object) Please help me how can I correct my code.
public static void updateResult(MyVertex c)
Iterator it2=result.iterator();
while(it2.hasNext())
//System.out.println( "Result to be added : "+c.getName());
j=(MyVertex)it2.next();
if(j.getName().equals(c.getName()))
j.setWeight(c.getWeight());
break;
//System.out.println( "Result item name : "+j.getName());
result.add(c);
}Thanks a lot .Thank you all for your immediate reply. It has solved half of my problem.Now It is not adding all "c" ,but it still not updating the value if the matching found.
public static void updateResult(MyVertex c)
Iterator it2=result.iterator();
while(it2.hasNext())
//System.out.println( "Result to be added : "+c.getName());
j=(MyVertex)it2.next();
if(j.getName().equals(c.getName()))
j.setWeight(c.getWeight());
flag=true;
return;
//System.out.println( "Result item name : "+j.getName());
if(!flag)
{result.add(c);}
} -
Triggers that call the list of value
How can I create the triggers that when I press the button call the Display List of my item??
Regards
Basilisco GiorgioYou have to set LOVBUT generator preference to Y ("Generating list of values indicator buttons" topic in the on-line help) and forms generator will do all what is necessary. Of course there must be an associated list of values on an item.
Helena
Maybe you are looking for
-
History: Started with stucking. No sesponse to any attempt than force quit. When i checked the disc, replied: nod fail, repair with installation cd. Sth like that. I borrowed the installation disc of a macbook pro (i have macbook). I run the utilitie
-
Separate Tomcat http and https access
Hi I got tomcat running both http and https. However, http://localhost:8080 and https://localhost:8433 are accessing the same page. I need to separate them, to prevent from entering data using http://localhost:8080 by mistake. Please help. Cheer T
-
how to set query timeout in code so that if connection breaks then it can restart immediately help me out
-
Download 9i personal installer..
Hi, Can I get Oracle 9i Personal database installer link. If can , Pls. give me the link and the procedure to install. my OS is XP Professional. Thanx in advance. RP
-
Problems with inlinegraphics in richeditabletext in flash player 10.1
Hi, I've remarked a strange behaviour with fp 10.1 and TLF. If I create a TLF Textflow programmatically with an embedded inlinegraphicselement and set the richeditabletext so that i can select text (to copy it via a context menu), the image will disa