HP QUERY DATA ERROR((SQLER=ORA01476 divisor is equal to zero
Experts,
We are seeing the following error in Inventory Optimization Horizontal Plan
HP QUERY DATA ERROR((SQLER=ORA01476 divisor is equal to zero
Navigation
Sign on as Inventory Planner responsibility, Inventory Plan > Workbench
Select the plan owning org, so you can see all orgs.
View by organizations
Select org: <Org Code>
Select Category <category>,
item <Item name
Right click, select Horizontal Plan > Default
Can you help please.
Well the easiest way to troubleshoot this problem would be to find the row where FBASEVOLTAGE = 0. Something like this maybe:
SELECT BV.FBASEVOLTAGE
, FB.FMAGNITUDE_RESULT
, BS.IUBUSNO
FROM GN
JOIN GM ON GM.IELEMENT_MAP_ID = GN.IELEMENT_MAP_ID
JOIN BS ON GM.NPS_ELEMENT_ID = BS.IUBUSID
AND GM.NPS_ELEMENT_TYPE = 101
JOIN CONFIG_BASE_VOLTAGE BV ON BS.IBASEVOLTAGEID = BV.IBASEVOLTAGEID
JOIN FACT_BUS FB ON FB.IBUS_NO = BS.IUBUSID
AND FB.IPS_CASE_ID = GN.IPS_CASE_ID
WHERE BV.FBASEVOLTAGE = 0
AND GN.IPS_CASE_ID = 1637
;
Similar Messages
-
BI Report Error:ORA-01476: divisor is equal to zero
I have written the Query containing the Pl/SQL procedures and is working fine when executed ,but when I am using the same query for the BI Publisher report , in the Runtime the report is giving error *"ORA-01476: divisor is equal to zero"* .
Please provide me with the answers and help ,as it is most important for me to get it solved.Hi,
Try this...
case when nvl(Y,0) = 0 then 0 else (X/Y) end
Replace your columns in place of X and Y in your query..
hope helps you....
Cheers,
Aravind -
Hi all.
I tried to get a tablespace and fragmentation information with blow script.
But I got an error(ORA-1476 : divisor is equal to zero)
How can I fix the script properly ?
Could anybody help me to fix the script?
Thanks in advance.
select tablespace_name,sum(obj_cnt) object_count,sum(ini_ext) init_ext,sum(nex_ex
t) next_ext,sum(byte)/1048576 bytesize,
(sum(byte)/1048576)- (sum(fbyte)/1048576) byteused,sum(fbyte)/1048576 bytefree,
sum(frags), sum(largest)/1048576 avail,
(sum(fbyte)/sum(byte))*100 free
from (select tablespace_name,0 obj_cnt,0 ini_ext,0 nex_ext, 0 byte, sum(bytes) fb
yte, count(*) frags, max(bytes) largest
from dba_free_space
group by tablespace_name
union
select tablespace_name,0, 0, 0, sum(bytes), 0, 0, 0 from dba_data_files
group by tablespace_name
union
select tablespace_name, 0, initial_extent/1024 ini_ext, next_extent/1024 nex_ext,
0,0,0,0
from dba_tablespaces
union
select tablespace_name, count(*) obj_cnt, 0, 0, 0, 0, 0, 0
from dba_segments
group by tablespace_name)
group by tablespace_nameThe various NVL and DECODE solutions may get rid of the error, but will not get you the correct answer. By the way, you may want to look at the differences in behaviour between
(sum(fbyte)/decode(sum(byte),0,NULL))*100 free and
(sum(fbyte)/decode(sum(byte),0,1))*100 free before you use either.
Your real problem is that you have a temp tablespace using temporary files. This is the right thing to do, but, you need another union in your statement, to access dba_temp_files:
SELECT tablespace_name,SUM(obj_cnt) object_count,
SUM(ini_ext) init_ext, SUM(nex_ext) next_ext,
SUM(byte)/1048576 bytesize,
(SUM(byte)/1048576)- (SUM(fbyte)/1048576) byteused,
SUM(fbyte)/1048576 bytefree, SUM(frags), SUM(largest)/1048576 avail,
(SUM(fbyte)/SUM(byte))*100 free
FROM (SELECT tablespace_name, 0 obj_cnt, 0 ini_ext, 0 nex_ext, 0 byte,
SUM(bytes) fbyte, COUNT(*) frags, MAX(bytes) largest
FROM dba_free_space
GROUP BY tablespace_name
UNION ALL
SELECT tablespace_name,0, 0, 0, sum(bytes), 0, 0, 0
FROM dba_data_files
GROUP BY tablespace_name
UNION ALL
SELECT tablespace_name,0, 0, 0, sum(bytes), 0, 0, 0
FROM dba_temp_files
GROUP BY tablespace_name
UNION ALL
SELECT tablespace_name, 0, initial_extent/1024 ini_ext,
next_extent/1024 nex_ext, 0,0,0,0
FROM dba_tablespaces
UNION ALL
SELECT tablespace_name, COUNT(*) obj_cnt, 0, 0, 0, 0, 0, 0
FROM dba_segments
GROUP BY tablespace_name)
GROUP BY tablespace_nameYou should also use UNION ALL instead of UNION, because UNION implies a sort distinct, whil union all does not. The sort is unneccessary, and the distinct may cause you to lose rows.
TTFn
John -
Divisor is equal to zero in date function
Hi
I have used a query like this but am getting error like divisor is equal to zero
with s_mon as (select to_char(add_months(trunc(sysdate,'rr'),level-1),'Mon-RR') month from dual connect by level <=12)
select s_mon.month,
tgdate
from abc ,s_mon
where to_char(tgdate(+),'Mon-RR')=s_mon.month
Result should be like this
month tgtdate
jan-12 01-01-12
feb-12 05-02-12
mar-12
apr-12
dec-12
Edited by: vishnu prakash on 27-May-2012 00:32Vishnu,
I did not get any error for the below statements; Does this not match with yours? If not, then please post your table structure, data and the exact query in which you are facing error.
drop table test_table;
create table test_table (pk_col number, col date);
insert into Test_table values (3, to_date('MAY-2012', 'MON-RR'));
insert into Test_table values (4, to_date('DEC-2012', 'MON-RR'));
select * from test_table;
with t as
select to_char(add_months(trunc(sysdate, 'rr'), level - 1), 'MON-RR') month
from dual
connect by level <= 12
select b.month, a.col
from test_table a,
t b
where to_char(a.col(+), 'MON-RR') = b.month
MONTH COL
APR-12
AUG-12
DEC-12 01-DEC-12
FEB-12
JAN-12
JUL-12
JUN-12
MAR-12
MAY-12 01-MAY-12
NOV-12
OCT-12
SEP-12 Regards,
P. -
ORA-01476: divisor is equal to zero Error in tabular form
Hello,
My tabular form will give me this error sometimes: Error in add row internal routine: ORA-01476: divisor is equal to zero. I don't understand what causes it. On the form I have a on load - before header process that will add 5 blank rows automatically, which was wizard generated. This error doesn't always happen, when I turn off this process and then turn it back on it works fine. Currently I have to set the condition to never, so I don't get the error. Is this a bug with Apex?
Also, when there is data available I have to click on the next arrow for the data to display.
Please advise.
Thanks,
Mary
Edited by: MaryM on Feb 26, 2010 9:49 AM
Edited by: MaryM on Mar 2, 2010 11:16 AMHello,
I have the same error message for ADD ROWS in tabular form. It is also happens when I try to open one empty record using On Load when page rendered. Have you found a fix for that ?
Thanks,
Marina -
Divisor is equal to zero error
Hi, I am getting divisor is equal to zero error while doing a calculation using sql. Is there a workaround this ?
ThanksWhat do you want to do, if the divisor is 0?
Is the SQL executed in SqlPlus or in a procedure/function?
Hi, I am getting divisor is equal to zero error while doing a calculation using sql. Is there a workaround this ?
Thanks -
Hi,
I have the following query and it works fine:
SELECT partition_name, TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD') dt, SUBSTR(partition_name,-8) pd
FROM all_tab_partitions
WHERE table_owner='TESTUSER'
AND table_name='ED_OPERATIONS_LOG';
PARTITION_NAME DT PD
EOL_20050113 13-JAN-05 20050113
EOL_20050114 14-JAN-05 20050114
EOL_20050115 15-JAN-05 20050115
EOL_20050116 16-JAN-05 20050116
EOL_20050117 17-JAN-05 20050117
EOL_20050118 18-JAN-05 20050118
If I add in the WHERE clause:
AND TRUNC(TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD')) < TRUNC(SYSDATE)
I get this error:
AND TRUNC(TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD')) < TRUNC(SYSDATE)
ERROR at line 6:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
WHY?
That conversion works fine as stated by the output above.
Please help.
Thanks
TarekSQL> show user
USER is "SYSTEM"
SQL> desc testuser.ed_operations_log
Name Null? Type
UC_USER_COD NOT NULL VARCHAR2(10)
MODULE_COD NOT NULL VARCHAR2(20)
FUNCTION_COD NOT NULL VARCHAR2(15)
OPERATION_DATE NOT NULL DATE
OPERATION_NUMBER NOT NULL NUMBER(8)
TP_OPERATION_STATUS_COD NOT NULL NUMBER(2)
PERSONID_INFO VARCHAR2(10)
PARAMSIN VARCHAR2(2000)
PARAMSOUT VARCHAR2(2000)
RETURN_COD NOT NULL NUMBER(8)
TIMESTAMP NUMBER(5)
SQL> SELECT partition_name, TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD') dt, SUBSTR(partition_name,-8) pd
2 FROM all_tab_partitions
3 WHERE table_owner='TESTUSER'
4 AND table_name='ED_OPERATIONS_LOG';
PARTITION_NAME DT PD
EOL_20041212 12-DEC-04 20041212
EOL_20041213 13-DEC-04 20041213
EOL_20041214 14-DEC-04 20041214
EOL_20041215 15-DEC-04 20041215
EOL_20041216 16-DEC-04 20041216
EOL_20041217 17-DEC-04 20041217
EOL_20041218 18-DEC-04 20041218
EOL_20041219 19-DEC-04 20041219
EOL_20041220 20-DEC-04 20041220
EOL_20041221 21-DEC-04 20041221
EOL_20041222 22-DEC-04 20041222
EOL_20041223 23-DEC-04 20041223
EOL_20041224 24-DEC-04 20041224
EOL_20041225 25-DEC-04 20041225
EOL_20041226 26-DEC-04 20041226
EOL_20041227 27-DEC-04 20041227
EOL_20041228 28-DEC-04 20041228
EOL_20041229 29-DEC-04 20041229
EOL_20041230 30-DEC-04 20041230
EOL_20041231 31-DEC-04 20041231
EOL_20050101 01-JAN-05 20050101
EOL_20050102 02-JAN-05 20050102
EOL_20050103 03-JAN-05 20050103
EOL_20050104 04-JAN-05 20050104
EOL_20050105 05-JAN-05 20050105
EOL_20050106 06-JAN-05 20050106
EOL_20050107 07-JAN-05 20050107
EOL_20050108 08-JAN-05 20050108
EOL_20050109 09-JAN-05 20050109
EOL_20050110 10-JAN-05 20050110
EOL_20050111 11-JAN-05 20050111
EOL_20050112 12-JAN-05 20050112
EOL_20050113 13-JAN-05 20050113
EOL_20050114 14-JAN-05 20050114
EOL_20050115 15-JAN-05 20050115
EOL_20050116 16-JAN-05 20050116
EOL_20050117 17-JAN-05 20050117
EOL_20050118 18-JAN-05 20050118
38 rows selected.
SQL> SELECT partition_name, TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD') dt, SUBSTR(partition_name,-8) pd
2 FROM all_tab_partitions
3 WHERE table_owner='TESTUSER'
4 AND table_name='ED_OPERATIONS_LOG'
5 AND TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD') < SYSDATE;
AND TO_DATE(SUBSTR(partition_name,-8), 'YYYYMMDD') < SYSDATE
ERROR at line 5:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0 -
Error in add row internal routine: ORA-01476: divisor is equal to zero
Hi,
I am using Tabular Form Report in my application. So, when the user enters the page for the first time, no fields appear (if he has previously not entered any values in the DB). So to avoid this I added a Data Manipulation process-> Add rows to tabular Form ->On load after footer, so that when the user logins whether he entered previous values or not, he can see some empty fields, but this is not working as expected.
Any ideas how to resolve this issue.Hmm other people have had this errorm found this hope it helps,
Hi,
Have a look at: Re: Add Row in detail table when check box is checked on a master report table as this shows how you can use javascript to clone a row -
How can i resolve divisor is equal to zero
hi,
i have the situation like i am calculating the column values. in that one field divided by other. but in that divisor field have zero. for that it's giving the error.
please help to do so...
example: select 8/o from dual;
error: ora-01476divisor equal to zeroindra wrote:
i have the situation like i am calculating the column values. in that one field divided by other. but in that divisor field have zero. for that it's giving the error.Either exclude it by adding:
divisor != 0to WHERE clause or use:
CASE divisor
WHEN 0 THEN whatever_result_you_want_for_zero_divisor
ELSE divident / divisor
ENDSY.
Edited by: Solomon Yakobson on Sep 19, 2011 6:47 AM -
Ora-01476 divisor is equal to zero
hi!
ROUND(SUM(VALOR_VDA) / SUM(DECODE(QTDE_VDA,0,1,QTDE_VDA)),2)
Oracle 10.2.0.1.0
Red Hat Enterprise 5is this QTDE_VDA field numeric
The only issues here with the decode is see is if the total value of all the rows when summed is 0 - zero then you will have zero-divide error
SS
Message was edited by:
user478316 -
Trying to query data from a view - ORA-01882 and ORA-02063 Errors
Hey there,
I tried to query data from a view that was provided by a colleague. This view works fine and gives correct data using PL/SQL Developer or SQLPLUS, but in SQL Developer, I get the following error:
ORA-01882: Time zone region not found
ORA-02063: preceding line from SYSTOOLS
01882.00000 - "timezone region %s not found"
* Cause: Specified reason name was not found
* Action: Please contact Oracle Customer Support
Vendor Code 1882
Where comes this error message from?! SYSTOOLS is the database link.
Can't see an obvious reason for this error.
OS is Windows 2000 SP4, SQL Developer is v1.1.1.25 BUILD MAIN-25.14
Regards,
ThomasFrom Oracle Messages 'Cause and Action'
http://www.oracle.com/technology/products/designer/supporting_doc/des9i_90210/cmnhlp72/messages/ora_messages.htm
ORA-01882, 00000, "timezone region %s not found"
Cause: The specified region name was not found.
Action: Please contact Oracle Customer Support.
Maybe invalid region in NLS_LANG?
"select * from v$nls_parameters"
Starting this script in all developer program and compared result... -
Frm-41380 error - cannot set the blocks query data source
Fairly new forms so bare with me. I am creating a form based on one table. This table has one column that is a nested table.
table name: szrtime
table columns: szrtime_code, szrtime_styp_list
szrtime_styp_list is a table of varchar2(1).
main block is szvtime_block
the block that contains the nested table is szvtime_styp_block
I read that I could use a WHEN_NEW_RECORD_INSTANCE trigger on the main block to display the related nested table. I have tried the folllowing:
Declare
select_stmt Varchar2(512) ;
Begin
If :szvtime_block.szvtime_code Is not null Then
select_stmt := '(SELECT column_value FROM TABLE ( SELECT szrtime_styp_list FROM szrtime WHERE szrtime_code = ''' || :SZVTIME_BLOCK.SZVTIME_CODE || '''))';
Go_Block('SZVTIME_STYP_BLOCK' );
Clear_Block ;
message('select_stmt = '||select_stmt);
Set_Block_Property( 'SZVTIME_STYP_BLOCK', QUERY_DATA_SOURCE_NAME, select_stmt ) ;
Execute_Query ;
Go_Block('SZVTIME_BLOCK') ;
Else
Go_Block('SZVTIME_STYP_BLOCK' );
Clear_Block ;
Go_Block('SZVTIME_BLOCK') ;
End if ;
End ;
The result is the frm-41380 error.
I have tried change the query data source type on the nested table block to Table or From-clause but did not help. The select statement that is valid and returns the correct result in Toad.
Any suggestions on what to look for? Thank you.
Todd> But what is giving me pause is that the user will be updating, deleting, and inserting
into this table and, of course, the nested table column.
It would give me pause, too. I've never used nested tables, so I poked around in Forms on-line help. In Forms 6i, it specifically states that Forms does not support the Nested Table structure.
In Forms 10g help, it describes Nested Table structures, but says NOTHING about how a form would handle it. And that implies to me that it is still not supported. So good luck.
In addition to creating the view, you may need to provide your own nested table updating procedures via a package on the server which your form can call. I know Forms supports passing pl/sql tables ("indexed by binary_integer"), so you could pass your nested table back and forth between the package and the form in that format. -
Error when attempting to download SQ01 query data to Excel
Hi Experts ,
I am getting error when attempting to download SQ01 query data to Excel .
Error message - Contact your system administrator. The following template is missing: sap_om.xls
Message no. 0K 407
I have looked through the SAP GUI installation files and can find no record of the missing file
HelpHi
Please check SAP note 305900 & 803067
Regards
Ravinder -
Stale data error while deleting a record
Hi
My design of this development is as follow...
1. Search Page in which users give some search criteria and results will be displayed in the results region on the same page. For each results record I have two buttons like 'Update' and 'Delete' so that users can delete the record or can update the record. For update i created a one more page where users can able to edit and save the data. I have two AM one for Search Page and one for Update Page.
Please find more details below.
intfEO based on PO_REQUISITIONS_INTERFACE_ALL
errorEO based on PO_INTERFACE_ERRORS
updateEO based on PO_REQUISITIONS_INTERFACE_ALL
VOs
intfVO based on intfEO and errorEO
updateVO based on updateEO
AM
intfAM based on intfVO
updateAM based on updateVO
Pages
searchPG based on intfAM
updatePG based on updateAM
Suppose I have one record in interface table with corresponding error record in error table.When users given the search criteria and hit enter they found a record. It means i have one record in the interface having one error record in the error table and both tables have same transaction id (primary key). So here user first try to update the record and it is working. After update he try to delete a record then I am getting below error. Please note that I am not getting this error when if i directly delete the record with out doing any update before delete. When ever users click on update icon then update PG will open and when users click on Apply button then data is getting updated in the database and page will forward to the search page.
Unable to perform transaction on the record.
Cause: The record contains stale data. The record has been modified by another user.
Action: Cancel the transaction and re-query the record to get the new data.
My UpdatePage Controller
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package powl.oracle.apps.xxpowl.po.requisition.webui;
import com.sun.java.util.collections.HashMap;
import com.sun.rowset.internal.Row;
import java.io.Serializable;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OADialogPage;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.form.OASubmitButtonBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageDateFieldBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
//import oracle.apps.fnd.oam.diagnostics.report.Row;
import oracle.apps.icx.por.common.webui.ClientUtil;
import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateAMImpl;
import powl.oracle.apps.xxpowl.po.requisition.server.xxpowlPOReqIntfUpdateEOVOImpl;
* Controller for ...
public class xxpowlPOReqIntfAllUpdatePageCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
xxpowlPOReqIntfUpdateAMImpl am = (xxpowlPOReqIntfUpdateAMImpl)pageContext.getApplicationModule(webBean);
xxpowlPOReqIntfUpdateEOVOImpl UpdateVO =(xxpowlPOReqIntfUpdateEOVOImpl)am.findViewObject("xxpowlPOReqIntfUpdateEOVOImpl");
String newvalue = (String)pageContext.getSessionValue("testValue");
System.out.println("Transaction ID from processRequest UpdateCO from testValue field:"+newvalue);
String transactionid = pageContext.getParameter("HashmapTransacitonid");
System.out.println("Transaction ID from processRequest Hash Map in UpdateCO :"+transactionid);
String errorcolumn = pageContext.getParameter("HashmapErrorcolumn");
System.out.println("Error Column Name from processRequest Hash Map in UpdateCO :"+errorcolumn);
String errormsg = pageContext.getParameter("HashmapErrormessage");
System.out.println("Error Message from processRequest Hash Map in UpdateCO :"+errormsg);
String readyonly = pageContext.getParameter("HashmapReadonly");
System.out.println("Read Only value from processRequest Hash Map in UpdateCO :"+readyonly);
if (transactionid !=null & !"".equals(transactionid)) {
/* Passing below four parameters to the Update Page */
Serializable amParams[] = new Serializable[]{transactionid,readyonly,errorcolumn,errormsg} ;
pageContext.getRootApplicationModule().invokeMethod("executexxpowlPOReqIntfUpdateEOVO", amParams);
* 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);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("ApplyButton") != null)
System.out.println("Inside ApplyButton method in UpdatePageCO");
OAViewObject vo = (OAViewObject)am.findViewObject("xxpowlPOReqIntfUpdateEOVO");
String transactionid = pageContext.getParameter("HashmapTransacitonid");
System.out.println("Transaction ID from processFormRequest Hash Map in UpdateCO-ApplyButton method :"+transactionid);
am.invokeMethod("apply");
pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
else if (pageContext.getParameter("CancelButton") != null)
am.invokeMethod("rollback");
pageContext.forwardImmediately("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
UpdatePageAMImpl.java
package powl.oracle.apps.xxpowl.po.requisition.server;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OARow;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.inv.appsphor.order.server.XxapOrderHeaderVOImpl;
import oracle.jbo.Transaction;
// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
public class xxpowlPOReqIntfUpdateAMImpl extends OAApplicationModuleImpl {
/**This is the default constructor (do not remove)
public xxpowlPOReqIntfUpdateAMImpl() {
/**Container's getter for xxpowlPOReqIntfUpdateEOVO
public xxpowlPOReqIntfUpdateEOVOImpl getxxpowlPOReqIntfUpdateEOVO() {
return (xxpowlPOReqIntfUpdateEOVOImpl)findViewObject("xxpowlPOReqIntfUpdateEOVO");
/**Sample main for debugging Business Components code using the tester.
public static void main(String[] args) {
launchTester("powl.oracle.apps.xxpowl.po.requisition.server", /* package name */
"xxpowlPOReqIntfUpdateAMLocal" /* Configuration Name */);
/* // Added by
public void execute_update_query(String TransactionID) {
xxpowlPOReqIntfUpdateEOVOImpl vo = getxxpowlPOReqIntfUpdateEOVO();
vo.initQuery(TransactionID);
// Added by , this will not call bec changed the logic and so now the update button enabled on search results page
// and this method will not called
public void pageInEditMode (String transactionID, String readOnlyFlag, String ErrorColumn,
String ErrorMessage)
System.out.println("Transaction Id from pageInEditMode in UpdatePGAMImpl.java: "+transactionID);
System.out.println("xxReadOnly from pageInEditMode in UpdatePGAMImpl.java: "+readOnlyFlag);
// Get the VO
xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
//Remove the where clause that was added in the previous run
updateVO.setWhereClause(null);
//Remove the bind parameters that were added in the previous run.
updateVO.setWhereClauseParams(null);
//Add where clause
// updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
//Bind transactionid to the where clause.
// updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
updateVO.setWhereClauseParam(0, transactionID);
//Execute the query.
updateVO.executeQuery();
xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
// Assiging the transient varaibles
currentRow.setxxErrorMessage(ErrorMessage);
currentRow.setxxErrorColumn(ErrorColumn);
if ("N".equals(readOnlyFlag))
/* Make the attribute to 'False so that all fields will be displayed in Edit Mode because we used this
xxReadOnly as SPEL */
currentRow.setxxReadOnly(Boolean.FALSE);
public void executexxpowlPOReqIntfUpdateEOVO(String transactionID, String xxReadyOnly, String ErrorColumn,
String ErrorMessage)
System.out.println("Transaction Id from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+transactionID);
System.out.println("xxReadOnly from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+xxReadyOnly);
System.out.println("Error Message from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorColumn);
System.out.println("Error Column from executexxpowlPOReqIntfUpdateEOVO in UpdatePGAMImpl.java: "+ErrorMessage);
// Get the VO
xxpowlPOReqIntfUpdateEOVOImpl updateVO = getxxpowlPOReqIntfUpdateEOVO();
//xxpowlPOReqIntfUpdateEOVORowImpl updaterowVO = xxpowlPOReqIntfUpdateEOVO();
//not working
// OARow row = (OARow)updateVO.getCurrentRow();
// row.setAttribute("xxReadOnly", Boolean.TRUE);
// updateVO.putTransientValue('XXXXX',x);
//Remove the where clause that was added in the previous run
updateVO.setWhereClause(null);
//Remove the bind parameters that were added in the previous run.
updateVO.setWhereClauseParams(null);
//Add where clause
// updateVO.addWhereClause(" TRANSACTION_ID = :1 ");
//Bind transactionid to the where clause.
// updateVO.setWhereClauseParam(1, transactionID); // this will not work bec it will start with zero from from 1
updateVO.setWhereClauseParam(0, transactionID);
// updateVO.setWhereClauseParam(1, ErorrColumn);
//Execute the query.
updateVO.executeQuery();
/* We want the page should be read only initially so after executing the VO with above command
and if you use next() it will go to the first record among the
fetched records. If you want to iterate for all the records then use iterator */
/* Using Iterator
while(updateVO.hasNext()) { // this will check after execute Query above command if it has any rows
xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
/* above line next() will take the control of the first record */
/* currentRow.setxxErrorMessage(ErrorMessage);
currentRow.setxxErrorColumn(ErrorColumn);
if ("Y".equals(xxReadyOnly))
currentRow.setxxReadOnly(Boolean.TRUE);
} // this while loop will loop till end of all the fetched records
xxpowlPOReqIntfUpdateEOVORowImpl currentRow = (xxpowlPOReqIntfUpdateEOVORowImpl)updateVO.next();
// Assiging the transient varaibles
currentRow.setxxErrorMessage(ErrorMessage);
currentRow.setxxErrorColumn(ErrorColumn);
/* Make the attribute to 'TRUE' so that all fields will be displayed as READ ONLY because we used this
xxReadOnly as SPEL
if ("Y".equals(xxReadyOnly))
currentRow.setxxReadOnly(Boolean.TRUE);
//Added by and this methiod will get called from UpdatePG Process Form Request controller
public void rollback()
Transaction txn = getTransaction();
if (txn.isDirty())
txn.rollback();
public void apply()
//OAViewObject vo1 = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
//Number chargeAccountID = vo1.get
getTransaction().commit();
OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfUpdateEOVO();
if (!vo.isPreparedForExecution())
vo.executeQuery();
SearchPG AM
package powl.oracle.apps.xxpowl.po.requisition.server;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
import oracle.jbo.RowSetIterator;
import oracle.jbo.Transaction;
import oracle.jbo.domain.Number;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlErrosLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlInterfaceSouceCodeLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlItemSegment1LovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlOrgLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlReferenceNumberLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequestIdLovVOImpl;
import powl.oracle.apps.xxpowl.po.requisition.lov.server.xxpowlRequisitionTypeLovVOImpl;
// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
public class xxpowlPOReqIntfAllAMImpl extends OAApplicationModuleImpl {
/**This is the default constructor (do not remove)
public xxpowlPOReqIntfAllAMImpl() {
/**Container's getter for xxpowlPOReqIntfAllVO
public xxpowlPOReqIntfAllVOImpl getxxpowlPOReqIntfAllVO() {
return (xxpowlPOReqIntfAllVOImpl)findViewObject("xxpowlPOReqIntfAllVO");
/**Sample main for debugging Business Components code using the tester.
public static void main(String[] args) {
launchTester("powl.oracle.apps.xxpowl.po.requisition.server", /* package name */
"xxpowlPOReqIntfAllAMLocal" /* Configuration Name */);
/**Container's getter for xxpowlRequestIdLovVO
public xxpowlRequestIdLovVOImpl getxxpowlRequestIdLovVO() {
return (xxpowlRequestIdLovVOImpl)findViewObject("xxpowlRequestIdLovVO");
/**Container's getter for xxpowlErrosLovVO
public xxpowlErrosLovVOImpl getxxpowlErrosLovVO() {
return (xxpowlErrosLovVOImpl)findViewObject("xxpowlErrosLovVO");
/**Container's getter for xxpowlOrgLovVO
public xxpowlOrgLovVOImpl getxxpowlOrgLovVO() {
return (xxpowlOrgLovVOImpl)findViewObject("xxpowlOrgLovVO");
//Start Adding by Lokesh
//This method wil get invoked from the search results page Process Request
public void rollbackItem()
Transaction txn = getTransaction();
if (txn.isDirty())
txn.rollback();
//This method will invoked from Controller page when user click Yes on delete confirmtion page from Search Results Page
public void deleteItem(String trasnsactionID)
Number rowToDelete = new Number(Integer.parseInt(trasnsactionID));
OAViewObject vo = (OAViewObject)getxxpowlPOReqIntfAllVO();
xxpowlPOReqIntfAllVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
// System.out.print(fetchedRowCount);
System.out.println("No of row fetched on delete method :"+fetchedRowCount);
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
System.out.println("1 :");
if (fetchedRowCount > 0)
System.out.println("2 :");
deleteIter.setRangeStart(0);
System.out.println("3 :");
deleteIter.setRangeSize(fetchedRowCount);
System.out.println("4 :");
for (int i = 0; i < fetchedRowCount; i++)
System.out.println("5 :");
row = (xxpowlPOReqIntfAllVORowImpl)deleteIter.getRowAtRangeIndex(i);
System.out.println("6 :");
Number PK = row.getTransactionId();
System.out.println("7 :");
if (PK.compareTo(rowToDelete) == 0)
System.out.println("8 :");
row.remove();
System.out.println("9 :");
getTransaction().commit();
System.out.println("10 :");
break;
//System.out.println("11 :");
System.out.println("11 :");
deleteIter.closeRowSetIterator();
System.out.println("12 :");
/**Container's getter for xxpowlInterfaceSouceCodeLovVO
public xxpowlInterfaceSouceCodeLovVOImpl getxxpowlInterfaceSouceCodeLovVO() {
return (xxpowlInterfaceSouceCodeLovVOImpl)findViewObject("xxpowlInterfaceSouceCodeLovVO");
/**Container's getter for xxpowlRequisitionTypeLovVO
public xxpowlRequisitionTypeLovVOImpl getxxpowlRequisitionTypeLovVO() {
return (xxpowlRequisitionTypeLovVOImpl)findViewObject("xxpowlRequisitionTypeLovVO");
/**Container's getter for xxpowlReferenceNumberLovVO
public xxpowlReferenceNumberLovVOImpl getxxpowlReferenceNumberLovVO() {
return (xxpowlReferenceNumberLovVOImpl)findViewObject("xxpowlReferenceNumberLovVO");
/**Container's getter for xxpowlItemSegment1LovVO
public xxpowlItemSegment1LovVOImpl getxxpowlItemSegment1LovVO() {
return (xxpowlItemSegment1LovVOImpl)findViewObject("xxpowlItemSegment1LovVO");
Search Page Controller
/*===========================================================================+
| Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
| All rights reserved. |
+===========================================================================+
| HISTORY |
+===========================================================================*/
package powl.oracle.apps.xxpowl.po.requisition.webui;
import com.sun.java.util.collections.HashMap;
//import com.sun.java.util.collections.Hashtable;
import java.util.Hashtable;
//import java.util.HashMap;
import java.io.Serializable;
import javax.servlet.jsp.PageContext;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.common.VersionInfo;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.webui.OAControllerImpl;
import oracle.apps.fnd.framework.webui.OADialogPage;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
* Controller for ...
public class xxpowlPOReqIntfAllSearchPageCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
//Added by Lokesh
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext, "updateRecord", false)) {
am.invokeMethod("rollbackItem");
TransactionUnitHelper.endTransactionUnit(pageContext, "updateRecord");
* 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);
String userClicked = pageContext.getParameter("event");
System.out.println("Event from processFormRequest in SearchPageCO :"+userClicked);
System.out.println("Parametere Names are :- \t" + pageContext.getParameter("UpdateImage"));
System.out.println("Parametere Names are :- \t" + pageContext.getParameter("event"));
if (pageContext.getParameter("event") != null &&
pageContext.getParameter("event").equalsIgnoreCase("Update")) {
String ReqTransactionId=(String)pageContext.getParameter("transacitonidParam");
String errorcolumn=(String)pageContext.getParameter("errorcolumnParam");
String errormsg=(String)pageContext.getParameter("errormessageParam");
String readyonly="Y"; //(String)pageContext.getParameter("readonlyParam");
System.out.println("Requisition Transaction Id : "+ReqTransactionId);
System.out.println("Error Column : "+errorcolumn);
System.out.println("Error Message : "+errormsg);
System.out.println("Read Only : "+readyonly);
HashMap params = new HashMap(4);
params.put("HashmapTransacitonid",ReqTransactionId);
params.put("HashmapErrorcolumn",errorcolumn);
params.put("HashmapErrormessage",errormsg);
params.put("HashmapReadonly",readyonly);
pageContext.putSessionValue("testValue",ReqTransactionId);
//System.out.println("Transaction Id passing through HashMap :- \t" + ReqTransactionId);
pageContext.setForwardURL("OA.jsp?page=/powl/oracle/apps/xxpowl/po/requisition/webui/xxpowlPOReqIntfAllUpdatePG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
params,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES) ;
else if (pageContext.getParameter("event") != null &&
pageContext.getParameter("event").equalsIgnoreCase("Delete")) {
System.out.println("Inside Delete method in SearchCO");
String deleteTransactionID=(String)pageContext.getParameter("deleteTransactionIDParam");
System.out.println("Transaction Id in Delete Method :- \t" + deleteTransactionID);
// deleteTransactionID =""; //Makeing Null because dont want to show the transaction id bec users dont know about it
//MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", deleteTransactionID) };
MessageToken[] tokens = { new MessageToken("MESSAGE_NAME", "") };
OAException mainMessage = new OAException("FND", "FND_MESSAGE_DELETE_WARNING", tokens);
OADialogPage dialogPage = new OADialogPage(OAException.WARNING,mainMessage, null, "", "");
String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
dialogPage.setOkButtonItemName("DeleteYesButton");
dialogPage.setOkButtonToPost(true);
dialogPage.setNoButtonToPost(true);
dialogPage.setPostToCallingPage(true);
dialogPage.setOkButtonLabel(yes);
dialogPage.setNoButtonLabel(no);
Hashtable formParams = new Hashtable(1);
formParams.put("transactionIdDeleted", deleteTransactionID);
dialogPage.setFormPHi friend ,
In Search page i didn't do any update. and also search page is not a problem it's working fine. create page only the problem. In this page only throwing Stale data error exception.
Please give me more suggestion.
Thanks in advance, -
Not able insert ,query data from forms
hi,
I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
should i do anything to insert record.please helpthe block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
Craig...
Maybe you are looking for
-
Dear Experts, I have a problem with previous period postings. We are entering in to production server. Present date is : 01.04.2009. Now the open period is 10th of 2008 (January). But we are starting the transactions from 01.01.2009 (3rd quarter of 2
-
How do I source an image with HTML in Adobe Muse?
Hello, I am wanting a horizontal slideshow for images and I got the code to work nicely in my muse website and all I need to do now if populate it with images. I have looked into the syntax for placing an image and I am not too sure how to handle the
-
Linking subledger table to property manager table
Hello I need to write a query displaying all the GL and Property Manager info. When you link GL to Payables then your query would look something like the below with the line "and ppia.ap_invoice_num(+) = xte.transaction_number" being the link between
-
Insert 600 variable values in pop up filter of a web query
Hello all, in order to analyze some Material movements I have to insert 600 material numbers in the selction of a query. In Bex Analyzer I can copy and paste the variable in the variable pop up screen. But when I execute the query in web the filter p
-
Apex 4.0.1 Error handling
Hi All, Do we need plug in to handle user friendly error message instread of throwing ORA- error to user?