Enable/disable constraint
Hi!
Kindly help.
I'm using 9207 on win server 2k3.
I have a master table with 100M records, I need to retain only 10M of data. I plan to put the 10M of data to be retained to a temp table, I truncate the master table, then I put the 10M of data from the temp table back to the master table. I will use the parallel and nologging for the index and table and I'll use the skip_unusable_index option. Is it ok to disable the constraints? After the bulk load I'll still be able to enable them correct?
I'm just worrying that I might not be able to enable the constraints.
Thanks and Best REgards
Dexter
You can disable the constraints before the operation and enable them afterwards. It will not be a problem unless you insert invalid data not matching your constraints.
You can insert the rows you want into a new table, create indexes and constraints and then rename that table. This way you do not need to reinsert the rows back to the original table from the temp table.
Similar Messages
-
ALTER TABLE privilege and CREATE/DROP/ENABLE/DISABLE constraint privilege
Hi,
I am looking for some detailed info regarding the below previleges
ALTER TABLE, CREATE CONSTRAINT, DROP CONSTRAINT, ENABLE CONSTRAINT AND DISABLE CONSTRAINT PRiVILEGES.
I have two schemas 'A' and 'B', I want to provide user 'A' with Alter table, create or drop constraint,Enable or Disable constraint on schema B.
Please let me know how to make this work.
Thank youI got the answer for my second question, I have an option to grant 'Alter ANY table' privilege to the user.Yes, but you should not do that.
Regarding question one, Suppose I have two schemas A and B and I want Schema A to have alter table privilege on all tables of Schema B.
Can I do this in one command No
or I need to grant alter on each table saperately?Yes
If I am chosing the second option for each table saperately then whenever a table is added in schema B we need to grant privilege on that table as well.Yes. But nothing strange there. Designing and creating objects includes the privileges on them.
If user A is granted with alter table privilege on a table which user B owns then can user A drop/create/enable/disable constraints for that table?Yes, isn't that what all this about?
Again, letting one user alter the objects of another user is generally not such a good idea. Hope you see this from our discussion.
Alter table privilege includes adding and dropping columns. This is why I suggested writing a procedure that does exactly what you need. And then grant execute on that to A.
The best thing of course would be NOT TO disable the constraints, they are probably there for a reason.
I am currently handling an issue where one session doing this, deadlocks with another session doing only selects - From other tables, that is!
Regards
Peter -
Trying to implement a ENABLE NOVALIDATE constraint.....
Hi ,
In order to see how the ENABLE NOVALIDATE constraint in the DEPT table of SCOTT schema , i followed the following steps:
1)Disable state
SQL> alter table dept modify constraint pk_dept disable;
Table altered2)Perform the operation (insert a row in for which the deptno preexists )
SQL> insert into dept(deptno,dname) values(10,'dname10');
1 row inserted
SQL> commit;
Commit complete3)Enable novalidate state
SQL> alter table dept modify constraint pk_dept novalidate;
Table altered4)Enable state
SQL> alter table dept modify constraint pk_dept enable;
alter table dept modify constraint pk_dept enable
ORA-02437:cannot validate (SCOTT.PK_DEPT) - primary key violatedHow can i solve the problem.....?????
Many thanks,
SimonHi,
I haven't found any use of the NOVALIDATE parameter in the constraint.....
In Oracle doc ... it's pointed out:
"When a constraint is in the enable novalidate state, all subsequent statements are checked for conformity to the constraint. However, any existing data in the table is not checked. A table with enable novalidated constraints can contain invalid data, but it is not possible to add new invalid data to it. Enabling constraints in the novalidated state is most useful in data warehouse configurations that are uploading valid OLTP data.
Enabling a constraint does not require validation. Enabling a constraint novalidate is much faster than enabling and validating a constraint. Also, validating a constraint that is already enabled does not require any DML locks during validation (unlike validating a previously disabled constraint). Enforcement guarantees that no violations are introduced during the validation. Hence, enabling without validating enables you to reduce the downtime typically associated with enabling a constraint."
I have followed the steps in my first post to run a test case in order to see that the sentence above in bold, is implemented....
But an error is displayed.....
What should i have to do......????
Many thanks ,
Simon -
Hello everyone,
it seems like SQLDeveloper Ver. 3.0.0.4 Tools -> Database Diff ignores ENABLED/DISABLED flag when comparing tables. Namely, two tables (in two schemas) were reported identical although a foreign key constraint was enabled in one schema and disabled in the other schema.
Am I missing something or is this indeed a bug?
Many thanks,
BobHello everyone,
it seems like SQLDeveloper Ver. 3.0.0.4 Tools -> Database Diff ignores ENABLED/DISABLED flag when comparing tables. Namely, two tables (in two schemas) were reported identical although a foreign key constraint was enabled in one schema and disabled in the other schema.
Am I missing something or is this indeed a bug?
Many thanks,
Bob -
HI,
Is there a way in oracle 10g to disable all constraints using a single query?If yes,what is it?
Thanks in advanceHere is a generic script that will turn off all FKs for MY_SCHEMA. It is easy enough to adapt to more than one schema, more than one constraint type, and etc. Just be careful not to mess with SYS, SYSTEM, and other Oracle supplied schemas.
set serveroutput on
BEGIN
dbms_output.enable(1000000);
FOR x IN ( SELECT owner,
table_name,
constraint_name
FROM dba_constraints
WHERE owner IN ( 'MY_SCHEMA' )
AND constraint_type = 'R'
AND status = 'ENABLED')
LOOP
BEGIN
EXECUTE IMMEDIATE 'alter table '||x.owner||'.'||x.table_name||' disable constraint ' ||
x.constraint_name;
-- EXCEPTION
-- WHEN others THEN
-- NULL;
-- dbms_output.put_line('Bad owner = '||x.owner||'; Bad table_name='||x.table_name||
-- '; Bad constraint_name='||x.constraint_name);
END;
END LOOP;
END;
/ -
Paralell in enable unique constraint
TO use the feature of EXCEPTION into when creating unique index, I run the folllwing command to enable a unique constraints:
alter table TEST_DUP2 enable constraint UNQ_TEST_DUP2
using index tablespace EDWSALESINDEX nologging
EXCEPTIONS into exceptions
This will create the unique index and when duplicate uniqe key encountered, the command fails and store the rowid of the duplicating row to exceptions table.
Now I want to run this commnad in parallel to enhance performance. I tried
alter table TEST_DUP2 enable constraint UNQ_TEST_DUP2
using index tablespace EDWSALESINDEX nologging PARALLEL
EXCEPTIONS into exceptions
and I got SQL Error: ORA-00933: SQL command not properly ended.
Can this be done, or are there any worka around ?
I do not want create unique index explicitly as that does not have the EXCEPTION into feature.
ThanksHere is an example for exceptions,
SQL> create table e( a number);
Table created.
SQL> alter table add constraint a_uk unique(a);
alter table add constraint a_uk unique(a)
ERROR at line 1:
ORA-00903: invalid table name
SQL> alter table e add constraint a_uk unique(a);
Table altered.
SQL> alter table e modify constraint a_uk disable;
Table altered.
SQL> host
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Aman>d:
D:\>cd oracle\product\11.1.0\db_1\RDBMS\ADMIN
D:\oracle\product\11.1.0\db_1\RDBMS\ADMIN>exit
SQL> @utlexcpt.sql
SP2-0310: unable to open file "utlexcpt.sql"
SQL> host dir utlex*
Volume in drive C is VAIO
Volume Serial Number is 54A5-8EF0
Directory of C:\Documents and Settings\Aman
File Not Found
SQL> host dir utl*
Volume in drive C is VAIO
Volume Serial Number is 54A5-8EF0
Directory of C:\Documents and Settings\Aman
File Not Found
SQL> hist
SP2-0042: unknown command "hist" - rest of line ignored.
SQL> host
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Aman>d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
'd:\oracle\product\11.1.0\db_1\RDBMS\ADMIN' is not recognized as an internal or extern
operable program or batch file.
C:\Documents and Settings\Aman>cd d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
C:\Documents and Settings\Aman>sqlplus aman/aman
SQL*Plus: Release 11.1.0.6.0 - Production on Mon Sep 15 22:02:20 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL>
SQL> d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN
SP2-0734: unknown command beginning "d:\oracle\..." - rest of line ignored.
SQL> @d:\oracle\product\11.1.0\db_1\RDBMS\ADMIN\utlexcpt.sql
Table created.
SQL> insert into e values(1);
1 row created.
SQL> /
1 row created.
SQL> /
1 row created.
SQL> alter table e modify constraint a_uk enable validate exceptions into exceptions;
alter table e modify constraint a_uk enable validate exceptions into exceptions
ERROR at line 1:
ORA-02299: cannot validate (AMAN.A_UK) - duplicate keys found
SQL> select * from exceptions;
ROW_ID OWNER TABLE_NAME
CONSTRAINT
AAARXIAAGAAAAAVAAC AMAN E
A_UK
AAARXIAAGAAAAAVAAB AMAN E
A_UK
AAARXIAAGAAAAAVAAA AMAN E
A_UK
SQL> select * from exceptions;Its on 11106.The same must work on pre 11g also.Do this and let me know.
Yup,Parallel is unimplemented surely enough,
SQL> alter table e
2 enable validate constraint a_uk using index tablespace nologging parallel;
enable validate constraint a_uk using index tablespace nologging parallel
ERROR at line 2:
ORA-03001: unimplemented featureAnd here is the reason for it,
http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_3001.htm#i2054940
The clause Parallel is not a right clase for this command.
Hope this helps
Aman....
Edited by: Aman.... on Sep 15, 2008 10:08 PM -
Hello ,
I wrote a query to disable all the constraints of particular table.
Alter Table Test disable all constraints;
but it is giving me the error Invalid alter Table option.
Can anybody give me the solution for how to disable all the constraints of a table using single sql query.
Thanksset serveroutput on
declare
sql_stm varchar2(2000);
begin
dbms_output.enable(1000000);
for x in (select constraint_name
from user_constraints
where table_name =table_name ) loop
sql_stm := 'alter table table_name disable constraint '||
x.constraint_name;
dbms_output.put_line(sql_stm);
execute immediate sql_stm;
end loop;
end;replace table_name with the required table name
Regards,
Mohd. Mehraj Hussain
http://mehrajdba.wordpress.com -
Speeding up enable of constraints
I have various constraints that used to take seconds and now are taking up to half an hr to enable. The data in the tables is static, it has increased or decreased. Does anyone know how to speed up the enabling of constraints on a table? What goes on behind the scenes after issuing alter table <table_name> enable constraint <constraint_name>;
ThankisDear HouseofHunger,
Please tell me if that online documentation is enough for you or not?
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/statements_3001.htm#i2183600
+"+
+Restrictions on Modifying Constraints Modifying constraints is subject to the following restrictions:+
+*You cannot change the state of a NOT DEFERRABLE constraint to INITIALLY DEFERRED.+
+*If you specify this clause for an index-organized table, then you cannot specify any other clauses in the same statement.+
+*You cannot change the NOT NULL constraint on a foreign key column of a reference-partitioned table, and you cannot change the state of a partitioning referential constraint of a reference-partitioned table.+
+See Also:+
+"*Changing the State of a Constraint: Examples*"+
+"+
+"+
+Changing the State of a Constraint: Examples The following statement places in ENABLE VALIDATE state an integrity constraint named emp_manager_fk in the employees table:+
+ALTER TABLE employees+
+ENABLE VALIDATE CONSTRAINT emp_manager_fk+
+EXCEPTIONS INTO exceptions;+
+Each row of the employees table must satisfy the constraint for Oracle Database to enable the constraint. If any row violates the constraint, then the constraint remains disabled. The database lists any exceptions in the table exceptions. You can also identify the exceptions in the employees table with the following statement:+
+SELECT e.*+
+FROM employees e, exceptions ex+
+WHERE e.rowid = ex.row_id+
+AND ex.table_name = 'EMPLOYEES'+
+AND ex.constraint = 'EMP_MANAGER_FK';+
+The following statement tries to place in ENABLE NOVALIDATE state two constraints on the employees table:+
+ALTER TABLE employees+
+ENABLE NOVALIDATE PRIMARY KEY+
+ENABLE NOVALIDATE CONSTRAINT emp_last_name_nn;+
+This statement has two ENABLE clauses:+
+*The first places a primary key constraint on the table in ENABLE NOVALIDATE state.+
+*The second places the constraint named emp_last_name_nn in ENABLE NOVALIDATE state.+
+In this case, Oracle Database enables the constraints only if both are satisfied by each row in the table. If any row violates either constraint, then the database returns an error and both constraints remain disabled.+
+Consider the foreign key constraint on the location_id column of the departments table, which references the primary key of the locations table. The following statement disables the primary key of the locations table:+
+ALTER TABLE locations+
+MODIFY PRIMARY KEY DISABLE CASCADE;+
+The unique key in the locations table is referenced by the foreign key in the departments table, so you must specify CASCADE to disable the primary key. This clause disables the foreign key as well.+
+"+
Hope That Helps.
Ogan -
From SQLDev2.1 and on... Disable Constraint Bug
Hi everyone,
Since SQLDeveloper 2.0 there's a bug in the query generated by the software when you right click a table > constraint > Disable all related constraints
It generates the following:
begin
for cur in (select fk.owner, fk.constraint_name , fk.table_name
from all_constraints fk, all_constraints pk
where fk.CONSTRAINT_TYPE = 'R' and
pk.owner = 'OWNER' and
fk.R_CONSTRAINT_NAME = pk.CONSTRAINT_NAME and
pk.TABLE_NAME = 'TABLE_NAME') loop
execute immediate 'ALTER TABLE '||cur.owner||'.'||cur.table_name||' MODIFY CONSTRAINT '||'''cur.constraint_name'''||' DISABLE';
end loop;
end;
when it should be:
begin
for cur in (select fk.owner, fk.constraint_name , fk.table_name
from all_constraints fk, all_constraints pk
where fk.CONSTRAINT_TYPE = 'R' and
pk.owner = 'OWNER' and
fk.R_CONSTRAINT_NAME = pk.CONSTRAINT_NAME and
pk.TABLE_NAME = 'TABLE_NAME') loop
execute immediate 'ALTER TABLE '||cur.owner||'.'||cur.table_name||' MODIFY CONSTRAINT '||cur.constraint_name||' DISABLE';
end loop;
end;
[The problem is on cur.constraint_name]
On the new SQLDeveloper 3.0 EA4 this bug its still valid...
To enable the constraint is ok.
Has anyone else seen this?Hey,
I've tested out the disable constraints script generation on 3.1 EA1 [3.1.05.97] and now it creates the script just fine. Also with the 'fk.r_owner = pk.owner' part that was missing.
The generated script:
begin
for cur in (select fk.owner, fk.constraint_name , fk.table_name
from all_constraints fk, all_constraints pk
where fk.CONSTRAINT_TYPE = 'R' and
pk.owner = 'TEST_OWNER' and
fk.r_owner = pk.owner AND
fk.R_CONSTRAINT_NAME = pk.CONSTRAINT_NAME and
pk.TABLE_NAME = 'TEST_TABLE') loop
execute immediate 'ALTER TABLE "'||cur.owner||'"."'||cur.table_name||'" MODIFY CONSTRAINT "'||cur.constraint_name||'" DISABLE';
end loop;
end;My thanks to everybody of the SQL Developer Team. -
Cannot disable constraint error
Hi - this might be a bit of a noob question but here goes. I have a table with a constraint (called FK_Category_Product) that I want to disable. When I run this statement the constraint is returned in the results:
SELECT owner,constraint_name, constraint_type, table_name, status
FROM user_constraints
WHERE constraint_type = 'R'However when I run this statement:
alter table T_PRODUCT disable constraint FK_Category_ProductI get this error:
SQL Error: ORA-02431: cannot disable constraint (FK_CATEGORY_PRODUCT) - no such constraintAnyone got any ideas?
Edited by: user9507427 on Mar 17, 2013 5:08 PMOk thanks - I'm guessing it's something to do with the schema / owner. Here's my version ( running on Windows Server 2008 R2):
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit ProductionWhen I run this query:
SELECT owner,constraint_name, constraint_type, table_name, status
FROM user_constraints
WHERE table_name='T_PRODUCT'I get these results:
OWNER CONSTRAINT_NAME CONSTRAINT_TYPE TABLE_NAME STATUS
PRODOWNER FK_Product_SourceSpecies R T_PRODUCT ENABLED
PRODOWNER FK_Product_CreatePerson R T_PRODUCT ENABLED
PRODOWNER FK_Product_ModifyPerson R T_PRODUCT ENABLED
PRODOWNER FK_Product_ExpressionSystem R T_PRODUCT ENABLED
PRODOWNER FK_Product_Localisation R T_PRODUCT ENABLED
PRODOWNER FK_Batch_Products R T_PRODUCT ENABLED
PRODOWNER SYS_C00908459 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908460 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908461 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908462 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908463 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908464 C T_PRODUCT ENABLED
PRODOWNER SYS_C00908465 P T_PRODUCT ENABLED Then when I run this statement (as PRODOWNER):
alter table T_PRODUCT disable constraint FK_Product_SourceSpeciesI get this result:
Error starting at line 3 in command:
alter table T_PRODUCT disable constraint FK_Product_SourceSpecies
Error report:
SQL Error: ORA-02431: cannot disable constraint (FK_PRODUCT_SOURCESPECIES) - no such constraint
02431. 00000 - "cannot disable constraint (%s) - no such constraint"
*Cause: the named constraint does not exist for this table.
*Action: ObviousI tried the above with and without single quotes around the constraint name, same result but slightly different error message with single quotes -
Enable/disable fields in Workspace form
Okay here is my scenario. I need to disable some fields on a form depending on which user logs onto workspace to open the same form.
1. User1 logs onto workspace and opens leave request form, fields at the top of the form are enabled for the user to fill out, bottom fields which are for leave request administrator to fill out are disabled but visible.
2. User1 fills out top portion of leave request form and completes form. Workflow sends form to leave request administrators "To do" list in Workspace.
3. Administrator opens up submitted form in Workspace and sees User1's filled out data on the form and the bottom fields are now enabled for administrator to approve or dissaprove. Bottom fields only include two check boxes, two text fields and one date field.
Now how is this done? I am sure their maybe scripting involved? if so what is it and at what events in the form? Is this whole process done in the form or through Admin UI or Workebench as well? Please help!!!!!!!!!Hi Rahat,
You can use the same form and enable/disable some fields according to the user's role with only little scripting. Review the steps the below:
1-First place a hidden field ("user_role") in your form
2-Insert a script object into your form onder "Variables" in object hierarchy and write a script for enabling/disabling the fields (regarding the value of "user_role")
3-On the initialize and change events of the "user_role" call your script object
4-On your process design, put a SetValue service before User tasks. In the asssignment you should set the desired user_role to the form, so that the script is triggered in your form and the fields are enabled/desiabled
Fro further needs on your form or process design you can contact us from: http://www.kgc.com.tr/company_Contact.html
Oguz
http://www.kgc.com.tr -
Enable/disable/defaulting the radio button in tabular Form
Hi friends,
I have one radio button column in my tabular form with 3 values for it.
<li>FC
<li>BC
<li>EC
I need to enable/disable the radio buttons according to the position of the user.
If the position of the user is CEO means,
then FC radio button has to be checked defaultly and also for him he needs to have BC and EC radio buttons to be enabled.
If the position of the user is between(1-4) grades means,
then FC radio button has to be disabled, but BC radio button has to be checked defaultly and also for him he needs to have EC radio buttons to be enabled.
If the position of the user is between(4-6) grades means,
then FC, BC radio button has to be disabled, but EC radio button has to be checked defaultly.
How i can achieve this radio button enabling/disabling and defaulting it dynamically according to the user.
Where i need to specify this kind of restriction inorder to work for me in my application.
Brgds,
MiniHi Bob,
thanks for your reply first, and your suggestion too.
I tried in the below manner on the lov definition of my radio button and it hide/shown according to the user who logs into the application.
SELECT 'FC' d, 'FC' r FROM DUAL WHERE lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO')
UNION ALL
SELECT 'BC' d, 'BC' r FROM DUAL WHERE lower(:APP_USER) IN (select lower(user_name) from apps.xxhy_ams_details_v where grade_name
BETWEEN 1 and 4 OR lower(:APP_USER) = (select lower(user_name) from apps.xxhy_ams_details_v where upper(job_name) = 'CEO'))
UNION ALL
SELECT 'EC' d, 'EC' r FROM DUALBut how i can check the radio button defaultly according to the user who logs in .
<li> If the employee with the position CEO logs into the application means, he needs to have FC to be checked defaultly.
<li> If the employee with the grade between(1-4) logs into the application means, he needs to have BC to be checked defaultly.
<li> If the employee with the grade between(5-12) logs into the application means, he needs to have EC to be checked defaultly.
Note:
Instead of hide/show the radio buttons defaultly whether it is possible to enable/disable the radio button according to the user who logs into the application.
Brgds,
Mini... -
Enable/Disable Column in a Advanced Bean Table
Hi,
I have 2 columns that needs to be enabled/disabled on a standard oa page PO Lines summary page.
I went through couple of blogs/forums and found 2 approaches :-
Approach 1
1) Extended the standard VO POLinesMerge.
2) Added a attribute column DeriveDisplayFlag of type VARCHAR2 . This call a database function and will return Y or N
3) Added a attribute of type ShowAdditionalColumn boolean. the get method of this attribute returns TRUE if DeriveDisplayFlag is 'Y' otherwise returns FALSE.
4) created a substitution for the custom VO
5) uploaded the substitution to mds.
6) copied the xml/class files to $JAVA_TOP/..
7) Bounced entire middle tier
8) using personalization, entered a SPEL command on the rendered property. I know rendered will hide/show the column but for time being I just want this to work.
But this fails :-
oracle.apps.fnd.framework.OAException: Message not found. Application: FND, Message Name: FND_VIEWOBJECT_NOT_FOUND. Tokens: VONAME = XXPBPoLinesMergeVO; APPLICATION_MODULE = oracle.apps.po.document.server.DocumentAM;
I am not aware how to get around this. Can someone help please?
Approach 2
1) steps 1 to 6 from Approach 1.
2) trying to extend controller class OrderLinesTableRNCO. But have couple of questions. This iis a advanced bean table so how should i reference individual record and the column that i need to disable/enable ?
Conceptual questions
Also, when i am entering a new record at what point in time the 2 new attribute will derive its value? the 2 attributes are dependent on the Item number column but i have not created a dependency between the attributes and Item# column.
Will the controller logic fire for every column while i am entering a new record?
Thanks.Hi Anil,
Thanks for the response. I have given up that i will get reply on this post.
I have done the substitution and upload the jpx to umsing importer.
But you are correct may be i might have done something wrong. Can you please help me. I can send you the files if you can review and let me know it will be great.
Also, will this approach work since PO Lines is a advanced bean table ?
One of the experts suggested to use Bound values. I am not sure how to implement it though?
I have went and told back to my business team that I am not able to do this so now they have asked me to enable/disable columns based on a dff value on po header. I thought this will be easier by extending the controller class on PO Lines table but that too is not working.
Can you help me please ?
Here is my code to extend the controller class :-
package xxpb.oracle.apps.po.webui;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageLovInputBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.fnd.framework.webui.beans.table.OAAdvancedTableBean;
import oracle.apps.fnd.framework.webui.beans.table.OAColumnBean;
import oracle.apps.fnd.framework.webui.beans.table.OASortableHeaderBean;
import oracle.apps.fnd.framework.webui.beans.table.OATableBean;
import oracle.apps.po.document.order.webui.OrderLinesTableRNCO;
public class XXPBOrderLinesTableRNCO extends OrderLinesTableRNCO
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAAdvancedTableBean tableBean =
(OAAdvancedTableBean)webBean.findIndexedChildRecursive("LinesTableRN");
OAMessageLovInputBean poLineLov =
(OAMessageLovInputBean)tableBean.findIndexedChildRecursive("XXPBSecondaryUOMLOV");
poLineLov.setDisabled(false);
} -
Enable/disable textbox depending on list option, list is dependent on Radio
Hi,
I'm trying to enable/disable text_box which is dependent on select_list option, select_list is dependent on radio_button.
I'm able to enable/disable select_list using radio_button options, but I'm unable to handle text box which is again dependent on this SELECT_LIST item.
under html header page:-
<script type="text/javascript">
function disableOnValue(o)
if (o.value == 'Y')
document.getElementById('P86_Select_list_item').disabled = false;
else
document.getElementById('P86_Select_list_item').disabled = true;
document.getElementById('P86_text_box_item').disabled = true;
</script>
<script type="text/javascript">
$(document).ready(function()
$('#P86_Select_list_item').change(function()
if($(this).val() == 'Other')
$('#P86_text_box_item').attr("disabled", false);
else
$('#P86_text_box_item').attr("disabled", true);
</script>
under Region_Source of the region, whose Display point :- <b>Before Footer</b>
<script type="text/javascript">
if(document.getElementById('P86_radio_button_0').checked == true)
{disableOnValue(document.getElementById('P86_radio_button_0'));}
else
{disableOnValue(document.getElementById('P86_radio_button_1'));}
</script>
and under Radio_button item, HTML Form Element Attributes :- <b>onchange="javascript:disableOnValue(this);"</b>
also same way under text_box item , HTML Form Element Attributes :- <b>disabled</b>
any help
DeepThanks for replying Ben,
I have kept an example into apex workspace
workspace:- DEEPAPEX
username:- [email protected]
password:- walubu
application "Javascript" page 1
I'm able to enable/disable Select_list item & Text_box item with the help of Radio_button item(depending on user select yes or no option of the radio button)
But after selecting Yes option of the radio_button, only when user select "Other" option of the Select_List item the Text_box should be enabled otherwise it should be disabled for any of the options of the Select_list item.
I hope you understand my point.
Deep -
Enabling / Disabling graphs and opening a new Front Panel Window
Hi,
I have a simple application of showing 12 analog signals on 12 different graphs placed vertically in aligned position. I have to develop a user interface so that if user wants to display signal no. 1, 4 and 6 out of total 12 signals, he should make selection using check boxes and click a re-draw button. It should result in opening a separate window with these three signals displayed as separate graphs aligned vertically and adjusted to fit window size. Similarly later user can change his selection of displaying signals (from same acquired data) say 1, 3, 5, 6, 8, 9, 11 & 12 and click Redraw button. It should result in opening a new Window showing all these signals as separate graphs which are aligned vertically and resized to fit the window. Now I have two major issues in this context.
1) I have been searching LabView help to locate a way to open a new window for this purpose but I failed to locate any way for it. As per my limited knowledge, it seems that we cannot have multiple "Front Panel" windows in Labview.
2) For the graph I could not locate a control to enable/disable a graph so that it appears or vanishes. Is there any way to achieve it?
I shall appreciate your valuable advice. I shifted from "Lab View Signal Express" to "Lab View" in order to achieve this user interface design but I am still not successful in finding a good solution for this application.
Regards
MnuetHi Mnuet,
You can do what was said above. Here is a KB on dynamically loading VIs. It looks something like this.
Dynamically loaded VIs are loaded at the point in code while running, as opposed to being loaded when the parent VI is loaded into memory like normal subVIs. You can make a reference to them and then control the front panel appearance, their run status, etc with property nodes and invoke nodes.
Jeff | LabVIEW Software Engineer
Maybe you are looking for
-
What hardcover case should I get for new Macbook Pro 13inch?
Hello, Hoping someone here can help me. I got a Macbook Pro 13 w/ retina display late 2013 model earlier this month. The hardcover Incase I got from Best Buy made for Macbook Pro 13 doesn't fit. Does anyone know of a case that will and that you'd rec
-
My skype account is linking to someone else. How d...
It seems to be a problem with Facebook connection. My Facebook ID is linked to my skype account. I tried sending a message to a friend and the message comes to me. Now, other people that send messages to her, it seems to come to my account. How do I
-
GL account 131139 does not exist in chart of accounts INT (CIN)
Hi All, I understand this question has been discussed many times. But I am not able to solve it. The error is in MIGO.It was working fine before.I activated CIN by doing all the settings. When I do MIGO its giving the error.The GL 131139 has been cre
-
Hello Exports, When i do BDC for f-58 it is working till save, The moment i save the transaction BDC complete. but it is unable to capture doc no generated. So that i am unable to create check. pls can anybody help me in this. Thanks Murali
-
Email text files through plsql procedures
Hi, I have written a procedure that selects table data and writes a .txt file in delimitted format. After the file is created on the C drive of the server I want to attach the file in a email and send it to the recepients. I have used the built in pa