How to use bind parameter in view object
in my view object has parameter as below
where :organization_id IS NULL
:organization_id parameter get value from LOV
I can run the page but it show following error :
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT hou.name organization_name
,hapf.name position_name
,hapf.attribute1 position_fund
,pg.name grade_name
,pbd.budget_detail_id
,hapf.position_id
,pbd.budget_version_id pbd_budget_version_id
,pbv.budget_version_id pbv_budget_version_id
,'Y' VIEW_DETAIL
,'Y' VIEW_DETAIL_OCC
,greatest(hapf.effective_start_date, pbv.date_from) effective_date
FROM pqh_budget_details pbd
,hr_all_positions_f hapf
,hr_all_organization_units hou
,per_grades pg
,pqh_budget_versions pbv
WHERE pbd.budget_version_id = pbv.budget_version_id
AND pbd.position_id = hapf.position_id
AND hapf.effective_end_date = hr_general.end_of_time
AND hou.organization_id = hapf.organization_id
AND pg.grade_id = hapf.entry_grade_id
AND EXISTS (
SELECT 'X'
FROM hr_all_positions_f hapf1
WHERE hapf1.position_id = hapf.position_id
AND hapf1.availability_status_id = 1
AND (pbv.date_from BETWEEN hapf1.effective_Start_date AND hapf1.effective_end_date
OR
hapf1.effective_Start_date BETWEEN pbv.date_from AND pbv.date_to))
and :gl_organization = 10)
## Detail 0 ##
java.sql.SQLException: ORA-01008: not all variables bound
Thank you very much
Is it a seeded view or a custom view? Ideally, in OAF you do parameter binding in the style
organization_id = :1
Also make sure to call setWhereClauseParams(null) on your view object before going for binding.
--Shiv
Similar Messages
-
How to populate bind variable in view objects where clause in ADF faces
I've got a page with 2 input items.
The user manually enters the first value.
On the second input item I have created a LOV for the item which opens in a popup. How do I restrict the data returned in the LOV using the value entered in the first input item. I have created a bind variable and have included it in the where clause for the view object but how do I populated it.Here is an example:
Using the HR schema with the EMPLOYEES and DEPARTMENTS tables.
Example is using ADF BC and created an EMPLOYEES entity with an updateable view object for page,
and created a DEPARTMENTS view as a lookup
(SQL: select department_id, department_name from departments where department_name = :DeptName)
1: add method to the backing bean to filter the LOV
public void getTextValueToFilterLOV(ValueChangeEvent valueChangeEvent) {
Object value_from_form = valueChangeEvent.getNewValue();
FacesContext fctx = FacesContext.getCurrentInstance();
Application fapp = fctx.getApplication();
JUFormBinding formBinding = (JUFormBinding)fapp.createValueBinding("#{bindings}").getValue(fctx);
DCIteratorBinding dcBinding = (DCIteratorBinding)formBinding.get("DeptLOVIterator");
ViewObject vo = dcBinding.getViewObject();
vo.setNamedWhereClauseParam("DeptName",value_from_form);
vo.executeQuery();
2. add valueChangeListener to the inputText on the page with an id and autoSubmit="true"
<af:inputText value="#{bindings.LastName.inputValue}" label="#{bindings.LastName.label}" binding="#{backing_DeptForm.inputText3}"
id="inputText3"
autoSubmit="true"
valueChangeListener="#{backing_DeptForm.getTextValueToFilterLOV}">
</af:inputText>
3. reference the LOV with the id name on the partialTriggers property
<af:selectOneChoice value="#{bindings.EmployeesUpdView1DepartmentId.inputValue}"
label="#{bindings.EmployeesUpdView1DepartmentId.label}" binding="#{backing_DeptForm.selectOneChoice1}"
id="selectOneChoice1"
partialTriggers="inputText3">
<f:selectItems value="#{bindings.EmployeesUpdView1DepartmentId.items}"
binding="#{backing_DeptForm.selectItems1}"
id="selectItems1"/>
</af:selectOneChoice>
Summary:
When you entered a text (LastName), that value is passed into the backing bean method.
The Bean method code will find the LOV Iterator and put the value into the bind variable.
Cheers,
Jim -
How to use SPEL for Dynamic View Objects?
Hi Gurus,
In Benefits Self Service particularly in the Designate Beneficiaries page, we have a requirement to set the row for Self designation as Read Only. What this means for any plan that you're eligible and that requires beneficiary designation, you are not allowed to designate yourself. Unfortunately this is an intended functionality and the only way to achieve our requirement is thru Personalization. I was able to accomplish this successfuly thru the SPEL functionality. However the view object corresponding to each plan that requires beneficiary designation is somewhat dynamic. For example, Plan A corresponds to BeneficiaryPeopleVO1, Plan B corresponds to BeneficiaryPeopleVO2, Plan C corresponds to BeneficiaryPeopleVO3, etc. The Personalization Page only allows me to use the SPEL for only one view object at a time. So if an employee is eligible for 3 plans that require beneficiary designation and my SPEL points to BeneficiaryPeopleVO1, it will only set the Read Only in Plan A. Plan B and Plan C would still allow self designation. Is there a way I could use the SPEL to work for all View Objects?
Thanks,
Ronaldojeanluca wrote:
I've seen things like this in scripting languages, so I was wondering if things like this are possible in java. Here is an not working example:
Is something like this possible ?AFAIK, it is only possible in a very limited way as noted above and is nearly always not recommended and definitely not necessary. The variable name has little importance, but OTOH the object reference has great importance. Instead learn about arrays, Lists, and Maps. -
Dynamically change the Binding of a view object
I want to reuse a panel several times in my application. The VO has one bind parameter (:1). The same panel should be reused several times with different bind variables.
I found a technical note concerning this issue called: How to Dynamically Change the binding of a View Object to a JClient Panel. This works for JDeveloper 9i but not for JDeveloper 19g. Does anybody know how to dynamically change the binding in JDeveloper 10gYou may use bindRowSetIterator() and pass in a custom fetched ViewObject or a RowSetIterator to the iterator binding that is displayed in your panel.
-
How to construct a new complete view object programmatically
HI,
I want to construct a new complete view object programmatically. I have a result set based on the rows returned from this query i need to build the new vo and show it n a form. Please tell me the complete procedure to do this or else provide me any links.
Thanks
SatyaHi,
have a look how dynamic tables are created (using af:forEach to iterate the attribute Defs for generating columns). Your approach is similar except that you not only need to know about attributes but also the rows to fecth
1. create a tree binding for the view object
2. create the binding with one hierarchy
3. ensure all attributes are deleted for the tree binding (you do this manually in the PageDef)
4. when executing the query for a new SQL, call clearForRecreate() on the DCIteratorBinding instance
5. On the page, use af:forEach to create the form fields and labels for each row. Like for dynamic tables, you first need to determine the attributes to render (its a nested loop you are going for
6. Updates of the form fields must be through a managed bean
Frank -
How to use bind variables in the following query
CREATE OR REPLACE PROCEDURE MMDB.test IS
sel_qtn VARCHAR2 (10);
CURSOR PT_QUANTITY IS select * from mmdb.product_tree WHERE QUANTITY_CHECK ='E'
AND run_id = 100
a PT_QUANTITY%ROWTYPE;
BEGIN
FOR i IN PT_QUANTITY
loop
sel_qtn := i.quanttity-1;
While sel_qtn>=1
loop
insert into mmdb.product_tree (BILLING_ACCOUNT_NO ,S_CODE) values (i.BILLING_ACCOUNT_NO ,i.S_CODE||'E');
sel_qtn :=sel_qtn -1;
End loop;
commit;
end;Don't duplicate threads: How to use bind variables in the following query
-
How to use a parameter of a report program from selection screen in a dialog program
how to use a parameter value(entered ) of a report program from a selection screen in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
How to use a parameter of a report program in a dialog program
how to use a parameter of a report program in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
How to use bind variables in this procedure
Hi Experts,
How to use bind variables in this procedure for static queries.
PROCEDURE DELETE_MER_PROC (M_id IN NUMBER)
IS
BEGIN
V_date DATE;
SELECT PD_DATE INTO v_date FROM PD_MAINTAIN;
DELETE FROM MER_CLEAR
WHERE MER_DT < v_date
AND ID = M_ID;
COMMIT;
END;
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
Please help me.
Thanks.976208 wrote:
How to use v_date and m_id as bind variables in this procedure to avoid hard parsing.
You cannot avoid hard parsing - as the 1st time a SQL statement (like the SELECT or DELETE statements in your code) is encountered, it does not reside in the server's Shared Pool, and needs to be added into the pool via a hard parse.
Bind variables does not prevent hard parsing. Hard parsing happens when the SQL statement (with or without bind variables) is a brand new statement encountered by the server.
Bind variables enables the same SQL cursor to be reused, by simply changing the bind variable value.
Not using bind variables means that each SQL statement is unique and not shareable - as the value is hardcoded into the statement and cannot be changed via a bind value. This typically means LOTS of different SQL statements (where the only difference is the changed value in the statement) are created - with each statement being a new statement not seen before in the Shared Pool and needing to be hard parsed.
One does not design one's code not to be hard parsed. There ALWAYS will be a hard parse in order to get a SQL statement into the Shared Pool. One designs one's code to REUSE cursors in the Shared Pool. -
How to use a parameter in a report program in a dialog program
how to use a parameter in a report program in a dialog program
Hi Shaikh,
Post it in http://scn.sap.com/community/abap
"ABAP Development".
sree -
i'm using flash cs5.5 . i have a problem with bind tool. how to use it.i'm trying lot of times, but i can't find how to use bind tool.please any can help me with a helpful answer.
Hi Sampath,
Please use this Help article to learn how to use Bind Tool.
http://help.adobe.com/en_US/flash/cs/using/WS58BD3A02-DA25-488f-B534-AE5463A24833.html
Please let me know if you would need more help.
Thanks,
Suhas Yogin -
How to use Bind Variables in Essbase data control
Hi,
I am trying to use Bind Variables in MDX query while creating the Essbase Data Control. I have used the below query with the Bind Variable.. this query is working in Essbase admin console..but it is throwing error (*Invalid MDX Query)* while creating Essbase Datacontrol in JDeveloper.
MDX Query : SELECT {[Measures].Msr_2} ON COLUMNS, [Time].Children ON ROWS FROM cube
where ($name)
Could any body suggest me on how to use bind variables with Essbase Data control.
Thanks,
SwathiHello Swathi, can you please help me how you created Essbase DataControl? Also were you able to figure out this?
Thanks, Praveen. -
Hi,
I have the below cursor 1 which is working already.For my requirement i want to use bind variable like second cursor.But its telling Bind Variable "p_col_list" is NOT DECLARED.Please any onehelp me on this.
How to use bind variable Here.
Cursor1:
DECLARE
emp_cv sys_refcursor;
iid NUMBER := 1;
i_sql varchar2(100);
p_col_list varchar2(2000) := 'aaa,bbb,ccc,ddd';
BEGIN
i_sql := 'select '''||REPLACE(p_col_list, ',', ''',''')||''' from dual '||CHR(10) ;
dbms_output.put_line(i_sql);
OPEN emp_cv FOR i_sql ;
END;
Cursor2:
DECLARE
emp_cv sys_refcursor;
iid NUMBER := 1;
i_sql varchar2(100);
p_col_list varchar2(2000) := 'aaa,bbb,ccc,ddd';
BEGIN
i_sql := 'select '''||REPLACE(:p_col_list, ',', ''',''')||''' from dual '||CHR(10) ;
dbms_output.put_line(i_sql);
OPEN emp_cv FOR i_sql using p_col_list;
END;hello,
the reports parameterform capabilities are limited. if you want
to create sophisticated parameterforms, you should do that with
oracle forms or html forms.
regards,
the oracle reports team --pw -
How to use shared parameter on request set
Hi
I have a request set with two stages
First stage contains From Date and To date where i have named the shared parameter as StartSP and EndSP
i have to use these shared parameter in one of the query in next stage where my Type is SQL Statment and i have these two date fields From date and To date in next stage as well where i am able to retirve the values from previous stage
based on these values i need to get the name in next parameter where my Type is SQL Statment
select name from tablename where '02-MAR-09' > =start_Date and '29-MAR-09' <=end_Date
I have written SQL as
select name from tablename where StartSP > =start_Date and EndSP <=end_Date but it throws an error.
I need the values of 02-Mar-09 and 29-Mar-09 from StartSP and EndSP
Appreciate if any one has idea about this.hi user;
please check:
http://download-west.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/repset04.htm
http://download-east.oracle.com/docs/cd/A60725_05/html/comnls/us/fnd/10gch609.htm
Also you can check this search:http://www.google.com.tr/search?hl=tr&source=hp&q=How+to+use+shared+parameter+on+request+set+&meta=&aq=f&oq=
Hope it helps
Regard
Helios -
How to use dynamic parameter when a report is created using Stored Procedures
Hi all,
any one have the idea of how to use dynamic parameter in crystal report XI R2
when report is created using Stored Procedure.
Regards
shashi kant chauhanHi
You can create an SQL command in Database Expert > Expand your datasource > Add command
Then enter the SQL query that will create the list of values to supply to the user
eg select field1,field2 from table
Then edit the parameter of the report. These will be the SP parameters adn can be seen in field explorer.
Change the parameter type to Dynamic
Under the word Value click on Click here to add item
Scroll down to your Command and select one of the values that you want to appear in the list
e.g field1
Then click on the Parameters field - this is essential to create the param
You can edit other options as required
That should do it for you.
I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
Best of luck
Maybe you are looking for
-
Files Import to wrong location
I am selecting 'Add to Library' and selecting the files I want. For some strange reason they keep being added into 'Audiobooks' (even when I have set preferences not to display this). Why is this so? Mac Mini, iTunes 7.0.2 (15) Mac OS X (10.4.8)
-
Allowing access to select few public objects (moved from Native forum)
I am moving my posting from Java Forums > Fundamentals > Key Classes > Native forum to this one. Sorry for posting it on the wrong forum earlier. Before each reply I have added a lien for clarity. Allowing access to select few public objects Author:
-
ICal Alarm Message Is Almost Off The Screen.
After a couple of years of having a weekly reminder message, I have recently started getting them 90% off the screen. Although I drag them to the middle before closing them, the next one always appears 90% offscreen. I did update to Tiger but I am su
-
when intalling itunes i get message saying system administrator has set policies to prevent this installation; when trying to uninstall message says you do not have sufficient access to uninstall itunes please contact your administrator. i am the dm
-
Driver not showing up in printer menu
My Epson StylusPro3800 just stopped communicating with all of the Macs on my network. I receive a cryptic "communications error" message when I try to print to it. I rebooted the Mac and tried again. Same result. I tried another Mac on the network, s