Getting ORA-01403: no data found while saving records
Hi,
I have a customized tabular form using APEX_ITEM API and I created a process to save the records as follows :
-- currently not doing any saving for debugging.
/* Formatted on 2009/03/18 14:52 (Formatter Plus v4.8.8) */
DECLARE
vclass_id NUMBER (10) := NULL;
vattribute_id NUMBER (10) := NULL;
vscore1st NUMBER (2, 1) := 0;
vscore2nd NUMBER (2, 1) := 0;
vrank1st NUMBER (1) := NULL;
vrank2nd NUMBER (1) := NULL;
vcomment VARCHAR2 (4000) := NULL;
BEGIN
FOR i IN 1 .. apex_application.g_f01.COUNT -- numberofline
LOOP
IF apex_application.g_f01 (i) = 2 -- score row
THEN
vclass_id := apex_application.g_f02 (i);
vattribute_id := apex_application.g_f02 (i);
vscore1st := apex_application.g_f05 (i);
vscore2nd := apex_application.g_f06 (i);
ELSIF apex_application.g_f01 (i) = 3
THEN -- rank row
vrank1st := apex_application.g_f05 (i);
vrank2nd := apex_application.g_f06 (i);
ELSIF apex_application.g_f01 (i) = 4
THEN -- comment row
vcomment := apex_application.g_f04 (i);
END IF;
END LOOP;
END;1. Without doing any saving, I am getting NoDataFound error. Can anyone enlighten me why?
2. How can I print the value into the page for debugging?
THanks.
HI Denes,
Thanks for replying :)
I debugged this, and it's due to my array list (f01,f02,..) is not having the same number of value.
The following is the SQL that generate my tabular form.
SELECT APEX_ITEM.DISPLAY_AND_SAVE(1,rectype) rectype,
APEX_ITEM.DISPLAY_AND_SAVE(2,class_id) class_id,
APEX_ITEM.DISPLAY_AND_SAVE(3,attribute_id) attribute_id,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||title||'</p>',
2,'<p><b><i><big>'||title||'</b></i></big></p>',
3,replace(title,chr(13)||chr(10),'</br>'),
apex_item.textarea(4,title,5,200)) title,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||review1st||'</p>',
2,apex_item.text(5,review1st,3,3),
3,APEX_ITEM.SELECT_LIST_FROM_LOV(5,review1st,'ARTIST_RANK',null,'NO'),
apex_item.hidden(5,review1st)) review1st,
decode(rectype,1,'<p style="font-size:17px;color:white;background-color:#383838">'||review2nd||'</p>',
2,apex_item.text(6,review2nd,3,3),
3,APEX_ITEM.SELECT_LIST_FROM_LOV(6,review2nd,'ARTIST_RANK',null,'NO'),
apex_item.hidden(6,review2nd)) review2nd
FROM TABLE (pkg_artist_review.f_artist_skillreview (:P21_ARTIST_SEQ, :P21_ARTIST_DISCIPLINE,:P21_REVIEW_YEAR))I can't find a way to use APEX_ITEM.DISPLAY_AND_SAVE with HTML formatting implementation so I think I need to be smarter with my PLSQL Save process.
My save process save all records. So I don't use checkbox.
The processing point is ON Submit - After Computations and Validations.
Thanks again Denes.
Similar Messages
-
I am getting ORA-01403: no data found error while calling a stored procedur
Hi, I have a stored procedure. When I execute it from Toad it is successfull.
But when I call that from my java function it gives me ORA-01403: no data found error -
My code is like this -
SELECT COUNT(*) INTO L_N_CNT FROM TLSI_SI_MAST WHERE UPPER(CUST_CD) =UPPER(R_V_CUST_CD) AND
UPPER(ACCT_CD)=UPPER(R_V_ACCT_CD) AND UPPER(CNSGE_CD)=UPPER(R_V_CNSGE_CD) AND
UPPER(FINALDEST_CD)=UPPER(R_V_FINALDEST_CD) AND UPPER(TPT_TYPE)=UPPER(R_V_TPT_TYPE);
IF L_N_CNT >0 THEN
DBMS_OUTPUT.PUT_LINE('ERROR -DUPlicate SI-1');
SP_SEL_ERR_MSG(5,R_V_ERROR_MSG);
RETURN;
ELSE
DBMS_OUTPUT.PUT_LINE('BEFORE-INSERT');
INSERT INTO TLSI_SI_MAST
( CUST_CD, ACCT_CD, CNSGE_CD, FINALDEST_CD, TPT_TYPE,
ACCT_NM, CUST_NM,CNSGE_NM, CNSGE_ADDR1, CNSGE_ADDR2,CNSGE_ADDR3,
CNSGE_ADDR4, CNSGE_ATTN, EFFECTIVE_DT, MAINT_DT,
POD_CD, DELVY_PL_CD, TRANSSHIP,PARTSHIPMT, FREIGHT,
PREPAID_BY, COLLECT_BY, BL_REMARK1, BL_REMARK2,
MCC_IND, NOMINATION, NOTIFY_P1_NM,NOTIFY_P1_ATTN , NOTIFY_P1_ADDR1,
NOTIFY_P1_ADDR2, NOTIFY_P1_ADDR3, NOTIFY_P1_ADDR4,NOTIFY_P2_NM,NOTIFY_P2_ATTN ,
NOTIFY_P2_ADDR1,NOTIFY_P2_ADDR2, NOTIFY_P2_ADDR3, NOTIFY_P2_ADDR4,
NOTIFY_P3_NM,NOTIFY_P3_ATTN , NOTIFY_P3_ADDR1,NOTIFY_P3_ADDR2, NOTIFY_P3_ADDR3,
NOTIFY_P3_ADDR4,CREATION_DT, ACCT_ATTN, SCC_IND, CREAT_BY, MAINT_BY
VALUES( R_V_CUST_CD,R_V_ACCT_CD,R_V_CNSGE_CD,R_V_FINALDEST_CD,R_V_TPT_TYPE,
R_V_ACCT_NM,R_V_CUST_NM ,R_V_CNSGE_NM, R_V_CNSGE_ADDR1,R_V_CNSGE_ADDR2, R_V_CNSGE_ADDR3,
R_V_CNSGE_ADDR4,R_V_CNSGE_ATTN, R_V_EFFECTIVE_DT ,SYSDATE, R_V_POD_CD,R_V_DELVY_PL_CD,R_V_TRANSSHIP ,R_V_PARTSHIPMT , R_V_FREIGHT,
R_V_PREPAID_BY ,R_V_COLLECT_BY ,R_V_BL_REMARK1 ,R_V_BL_REMARK2,R_V_MCC_IND,
R_V_NOMINATION,R_V_NOTIFY_P1_NM, R_V_NOTIFY_P1_ATTN, R_V_NOTIFY_P1_ADD1, R_V_NOTIFY_P1_ADD2,
R_V_NOTIFY_P1_ADD3, R_V_NOTIFY_P1_ADD4, R_V_NOTIFY_P2_NM, R_V_NOTIFY_P2_ATTN, R_V_NOTIFY_P2_ADD1,
R_V_NOTIFY_P2_ADD2, R_V_NOTIFY_P2_ADD3, R_V_NOTIFY_P2_ADD4, R_V_NOTIFY_P3_NM, R_V_NOTIFY_P3_ATTN,
R_V_NOTIFY_P3_ADD1, R_V_NOTIFY_P3_ADD2, R_V_NOTIFY_P3_ADD3, R_V_NOTIFY_P3_ADD4,
SYSDATE,R_V_ACCT_ATTN,R_V_SCC_IND,R_V_USER_ID,R_V_USER_ID
DBMS_OUTPUT.PUT_LINE(' SI - REC -INSERTED');
END IF;Hi,
I think there is a part of the stored procedure you did not displayed in your post. I think your issue is probably due to a parsed value from java. For example when calling a procedure from java and the data type from java is different than expected by the procedure the ORA-01403 could be encountered. Can you please show the exact construction of the call of the procedure from within java and also how the procedure possible is provided with an input parameter.
Regards, Gerwin -
I am trying to run this AR API, for a perticular set of value in Oracle R12 instance...
DECLARE
L_RETURN_STATUS VARCHAR2(1);
L_MSG_COUNT NUMBER;
L_MSG_DATA VARCHAR2(2000);
L_BATCH_SOURCE_REC AR_INVOICE_API_PUB.BATCH_SOURCE_REC_TYPE;
L_TRX_HEADER_TBL AR_INVOICE_API_PUB.TRX_HEADER_TBL_TYPE;
L_TRX_LINES_TBL AR_INVOICE_API_PUB.TRX_LINE_TBL_TYPE;
L_TRX_DIST_TBL AR_INVOICE_API_PUB.TRX_DIST_TBL_TYPE;
L_TRX_SALESCREDITS_TBL AR_INVOICE_API_PUB.TRX_SALESCREDITS_TBL_TYPE;
BEGIN
FND_GLOBAL.APPS_INITIALIZE(112,50368,7000);
MO_GLOBAL.SET_POLICY_CONTEXT('S',82);
L_BATCH_SOURCE_REC.BATCH_SOURCE_ID := 1024;
L_TRX_HEADER_TBL(1).TRX_HEADER_ID := 16828;
L_TRX_HEADER_TBL(1).TRX_NUMBER := '620121V';
L_TRX_HEADER_TBL(1).TRX_DATE := '29-APR-08';
L_TRX_HEADER_TBL(1).GL_DATE := '30-SEP-2010';
L_TRX_HEADER_TBL(1).TRX_CURRENCY := 'INR';
L_TRX_HEADER_TBL(1).CUST_TRX_TYPE_ID := 1033;
L_TRX_HEADER_TBL(1).BILL_TO_CUSTOMER_ID := 8256;
L_TRX_HEADER_TBL(1).BILL_TO_ADDRESS_ID := 1476;
L_TRX_HEADER_TBL(1).SHIP_TO_CUSTOMER_ID := 8256;
L_TRX_HEADER_TBL(1).SHIP_TO_ADDRESS_ID := 1476;
L_TRX_HEADER_TBL(1).BILL_TO_SITE_USE_ID := 1687;
L_TRX_HEADER_TBL(1).TERM_ID := 1001;
L_TRX_HEADER_TBL(1).ORG_ID := 82;
L_TRX_HEADER_TBL(1).TRX_CLASS := 'INV';
L_TRX_HEADER_TBL(1).REFERENCE_NUMBER := NULL;
L_TRX_HEADER_TBL(1).COMMENTS := 'Sale';
L_TRX_LINES_TBL(1).TRX_HEADER_ID := 16828;
L_TRX_LINES_TBL(1).TRX_LINE_ID := 16864;
L_TRX_LINES_TBL(1).WAREHOUSE_ID := 102;
L_TRX_LINES_TBL(1).QUANTITY_INVOICED := 1;
L_TRX_LINES_TBL(1).MEMO_LINE_ID := 1001;
L_TRX_LINES_TBL(1).UNIT_SELLING_PRICE := 8070;
L_TRX_LINES_TBL(1).LINE_NUMBER := 1;
L_TRX_LINES_TBL(1).AMOUNT := 8070;
L_TRX_LINES_TBL(1).LINE_TYPE := 'LINE';
L_TRX_LINES_TBL(1).INTERFACE_LINE_CONTEXT := 'CONVERSION';
L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE1 := 3882;
L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE2 := 1;
L_TRX_LINES_TBL(1).INTERFACE_LINE_ATTRIBUTE3 := 'Sale';
L_TRX_LINES_TBL(1).DESCRIPTION := 'Conversion';
AR_INVOICE_API_PUB.CREATE_INVOICE(P_API_VERSION => 1.0,
P_BATCH_SOURCE_REC => L_BATCH_SOURCE_REC,
P_TRX_HEADER_TBL => L_TRX_HEADER_TBL,
P_TRX_LINES_TBL => L_TRX_LINES_TBL,
P_TRX_DIST_TBL => L_TRX_DIST_TBL,
P_TRX_SALESCREDITS_TBL => L_TRX_SALESCREDITS_TBL,
X_RETURN_STATUS => L_RETURN_STATUS,
X_MSG_COUNT => L_MSG_COUNT,
X_MSG_DATA => L_MSG_DATA);
IF ((L_RETURN_STATUS = FND_API.G_RET_STS_ERROR) OR (L_RETURN_STATUS = FND_API.G_RET_STS_UNEXP_ERROR)) THEN
DBMS_OUTPUT.PUT_LINE('Unexpected Errors Found While Calling API');
END IF;
DBMS_OUTPUT.PUT_LINE(CHR(10));
DBMS_OUTPUT.PUT_LINE('L_RETURN_STATUS: '||L_RETURN_STATUS);
DBMS_OUTPUT.PUT_LINE('L_MSG_COUNT: '||L_MSG_COUNT);
DBMS_OUTPUT.PUT_LINE('L_MSG_DATA: '||L_MSG_DATA);
DBMS_OUTPUT.PUT_LINE(CHR(10));
END;
On running this,the output comes as -
Unexpected Errors Found While Calling API
L_RETURN_STATUS: U
L_MSG_COUNT:
L_MSG_DATA: Error in AR_INVOICE_UTILS.validate_tax_exemption ORA-01403: no data found
Can some one help me out where am i going wrong???Hi Gourab
You have posted this request to the wrong forum, so no one here will be able to help you.
I believe the correct forum for the question you are asking is the EBS Financials forum:
Financials
Please try posting your query there, hopefully someone there will be able to help you.
Regards
Simon Kissane
Oracle Support -
When merging workspace I get ORA-01403: no data found error in WMSYS.LT
Hi,
I am investigating an error in a remote system with very little info to go on apart from a stacktrace! This is what it says:
java.sql.SQLException: ORA-01403: no data found
ORA-06512: at "WMSYS.LT", line 6028
ORA-06512: at line 1
The context is an attempt to merge a child workspace into LIVE (LIVE being its direct parent).
it is on Oracle Database 11.1.0.7.
Can you advise what this error means? I am unable to dig deeper into it because the PL-SQL source code for WMSYS.LT is wrapped.
thanks
SimonHi,
Are you able to get a standard trace of the error from the remote database? ora-1403 errors can come from a number of places, so an errorstack trace is usually needed to determine the cause.
Regards,
Ben -
Getting - ORA-01403: no data found - When I Run expdp
Oracle database version 11.1.0.7.0 on Windows 32-bit.
When I run:
expdp system schemas=vms dumpfile=data_pump_dir:vms_bjw%u.dmp logfile=data_pump_dir:vms_bjw.log parallel=2
Connected to: Oracle Database 11g Enterprise Edition Release *11.1.0.7.0* - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: job does not exist
ORA-31637: cannot create job SYS_EXPORT_SCHEMA_01 for user SYSTEM
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT_INT", line 736
ORA-39080: failed to create queues "" and "" for Data Pump job
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPC$QUE_INT", line 1665
ORA-01403: no data found
I turned on tracing like this:
1.) Set the Error Stack 1403 to know exactly which SQL is failing:-
SQL> alter system set events '1403 trace name errorstack level 3';
Re-ran the datapump export to reproduce the error then disable the events.
SQL> alter system set events '1403 trace name errorstack off';
The trace file, oddly enough, shows that this is the failing SQL:
Error Stack Dump
ORA-01403: no data found
Current SQL Statement for this session (sql_id=3n58uzvnuw2hj) -----
SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET'
Under that, I get the call stack.
I ran this SQL manually and I get:
SQL> SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER = 'NLS_CHARACTERSET';
VALUE
AL32UTF8
Any ideas as to why I'm getting the ORA-01403 when I run expdp?
Thank youHello,
Your error looks like what is descibed into the Metalink Note 345198.1.
But this note apply to 10.1.0.4 not to 11.1.0.7.
So, you should open an issue to My Oracle Support.
Best regards,
Jean-Valentin -
ORA-01403: no data found while querying View
Hello,
I have a problem with querying a View which includes XML-Types.
If the View is empty I get a white website with the following error-message: ORA-01403: no data found
How can I implement my own error-website if no data was found??
This is the way I querying my view:
http://10.197.178.154:8080/oradb/LARA/ABSVALUES/ROW[VIN="ZHWGE11M14LA00031"]?rowsettag=LARA_DIAGNOSE&contenttype=text/html&transform=/LaRa/xsl/overviewabs1.xslHi Gourab
You have posted this request to the wrong forum, so no one here will be able to help you.
I believe the correct forum for the question you are asking is the EBS Financials forum:
Financials
Please try posting your query there, hopefully someone there will be able to help you.
Regards
Simon Kissane
Oracle Support -
Error saving column settings with ORA-01403: no data found Error
Hi
I have a region with multi row report updatable.
When I am trying to change the query I am getting below error.
Anybody let me know what will be the problem.
ORA-01403: no data found
Error saving column settings
Regards
KiranHi
I was using below query for this region.
SELECT
result.segment1 Item#,
result.inventory_item_id,
result.revision,
result.lot_number,
result.Lot_Onhand,
result.Heat,
result.Cert_Site_Number Cert_Site_Number_Display,
result.status_code Status_Code_Display,
result.Cert_ID Cert_ID_Display,
result.Cert_Site_Number,
result.status_code,
result.Cert_ID,
result.transaction_id,
result.po_header_id,
result.po_line_id,
result.rcv_transaction_id,
result.shipment_header_id,
result.shipment_line_id
FROM
SELECT
msi.segment1,
mmt.inventory_item_id,
mmt.revision,
mtln.lot_number,
xx_utility_pkg.get_available_qty(mmt.inventory_item_id,mmt.organization_id,mmt.subinventory_code,mtln.lot_number,'ONHAND') Lot_Onhand,
mtln.attribute1 Heat,
mtln.attribute2 Cert_Site_Number,
mms.status_code,
( SELECT clx.cert_id
FROM xxqc.cert_mst cm,
xxqc.cert_lot_xref clx
WHERE cm.cert_id = clx.cert_id
AND cm.cert_type='MILL'
AND clx.lot_no = mtln.lot_number
) Cert_ID,
mmt.transaction_id,
rsl.po_header_id,
rsl.po_line_id,
mmt.rcv_transaction_id,
rt.shipment_header_id,
rsl.shipment_line_id
FROM mtl_material_transactions mmt,
mtl_transaction_lot_numbers mtln,
mtl_material_statuses_tl mms,
rcv_transactions rt,
rcv_shipment_headers rsh,
rcv_shipment_lines rsl,
mtl_system_items_b msi
WHERE mmt.transaction_id = mtln.transaction_id
AND mmt.organization_id = mtln.organization_id
AND mtln.status_id = mms.status_id
AND rt.transaction_id = mmt.rcv_transaction_id
AND rsh.shipment_header_id = rt.shipment_header_id
AND rsl.shipment_header_id = rsh.shipment_header_id
AND rsh.organization_id = mmt.organization_id
AND rsl.item_id = mmt.inventory_item_id
AND msi.inventory_item_id=rsl.item_id
AND msi.organization_id = mmt.organization_id
AND rsl.po_line_id = DECODE(:P5_PO_LINE_NUMBER, 0,rsl.po_line_id,:P5_PO_LINE_NUMBER)
AND rsl.po_header_id IN ( SELECT po_header_id
FROM po_headers_all
WHERE segment1 = :P5_PO_NUMBER
AND org_id = :P5_ORG_ID)
AND mtln.status_id = 90 -- Which is 'T' Status means Temporary
AND mmt.transaction_action_id = 27
AND mmt.transaction_source_type_id = 1
AND mmt.transaction_type_id = 18
) result
WHERE result.Lot_Onhand > 0
when I use above query I am able to update the region perfectly.
But when I comment last WHERE CONDITION I am getting above problem.
What could be the possilbe reason for this?
Regards
Kiran Akkiraju -
Getting Error - CREATE_CASH : ORA-01403: no data found
When i use api AR_RECEIPT_API_PUB.CREATE_CASH in loop then i get error 'CREATE_CASH : ORA-01403: no data found' for second record.
AR_RECEIPT_API_PUB.CREATE_CASH(p_api_version => 1.0
,p_init_msg_list => fnd_api.g_true
,p_commit => fnd_api.g_true
,p_receipt_number => i_receipt_number
,p_receipt_date => TRUNC(SYSDATE)
,p_gl_date => TRUNC(SYSDATE)
,p_amount => i_receipt_amount
,p_currency_code => g_currency_code
,p_receipt_method_id => i_receipt_method_id
,p_customer_id => i_customer_id
,p_cr_id => l_cr_id
,p_org_id => i_org_id
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
I run it for different org. First org it's running fine but for second it's fail -
Here is output -
Start, Org ID - 84
l_receipt_number - 43164
l_receipt_amount - 74.55
g_currency_code - USD
l_receipt_method_id - 4000
l_customer_id - 7040
l_cr_id -
l_return_status -
l_msg_count -
l_msg_data -
Status - S
Start, Org ID - 81
l_receipt_number - 43166
l_receipt_amount - 30
g_currency_code - USD
l_receipt_method_id - 4000
l_customer_id - 7047
l_cr_id -
l_return_status -
l_msg_count -
l_msg_data -
Error count/msg - 2-
Error msg - CREATE_CASH : ORA-01403: no data found
Error msg - ORA-01403: no data found in Package AR_RECEIPT_API_PUB Procedure Create_cash
PLease help it's urgentHere is code which i am using...
IF l_ar_pay_rec > 0 THEN
l_receipt_number := ar_cash_receipts_s.NEXTVAL;
FOR r_ar_org_records IN cr_ar_org_records
LOOP
IF r_ar_org_records.org_id = 81 THEN
l_resp_id := 50677;
ELSE
l_resp_id := 50681;
END IF;
MO_GLOBAL.INIT('AR');
MO_GLOBAL.SET_POLICY_CONTEXT('S',r_ar_org_records.org_id);
FND_GLOBAL.APPS_INITIALIZE(g_user_id,l_resp_id,l_appl_id,0);
DBMS_OUTPUT.PUT_LINE('User,Resp,App,Org - '||g_user_id||','||l_resp_id||','||l_appl_id||','||r_ar_org_records.org_id);
-- Derive Receipt Method ID
BEGIN
SELECT receipt_method_id
INTO l_receipt_method_id
FROM ar_receipt_methods
WHERE name = g_receipt_method;
EXCEPTION
WHEN OTHERS THEN
g_ar_error := 'Y';
g_ar_error_msg := g_ar_error_msg||'Receipet Method Not Found, ';
FND_FILE.PUT_LINE(FND_FILE.LOG,'Error While Derive Receipt Method ID');
END;
-- Derive Customer ID
BEGIN
SELECT customer_id
,SUM(AMOUNT_PAID)
INTO l_customer_id
,l_receipt_amount
FROM xxar_third_party_validation
WHERE raf_code = i_raf
AND receipt_date = i_date_paid
AND org_id = r_ar_org_records.org_id
AND customer_id is not null
GROUP BY customer_id;
EXCEPTION
WHEN OTHERS THEN
g_ar_error := 'Y';
g_ar_error_msg := g_ar_error_msg||' Customer ID Not Found, ';
FND_FILE.PUT_LINE(FND_FILE.LOG,'Error While Customer ID');
END;
fnd_msg_pub.initialize;
l_return_status := NULL;
l_msg_count := NULL;
l_msg_data := NULL;
l_cr_id := NULL;
g_currency_code := 'USD';
DBMS_OUTPUT.PUT_LINE('Start, Org ID - '||r_ar_org_records.org_id);
-- Create Cash for Customer
DBMS_OUTPUT.PUT_LINE('l_receipt_number - '||l_receipt_number);
DBMS_OUTPUT.PUT_LINE('l_receipt_amount - '||l_receipt_amount);
DBMS_OUTPUT.PUT_LINE('g_currency_code - '||g_currency_code);
DBMS_OUTPUT.PUT_LINE('l_receipt_method_id - '||l_receipt_method_id);
DBMS_OUTPUT.PUT_LINE('l_customer_id - '||l_customer_id);
DBMS_OUTPUT.PUT_LINE('l_cr_id - '||l_cr_id);
DBMS_OUTPUT.PUT_LINE('l_return_status - '||l_return_status);
DBMS_OUTPUT.PUT_LINE('l_msg_count - '||l_msg_count);
DBMS_OUTPUT.PUT_LINE('l_msg_data - '||l_msg_data);
AR_RECEIPT_API_PUB.CREATE_CASH(p_api_version => 1.0
,p_init_msg_list => fnd_api.g_true
,p_receipt_number => l_receipt_number
,p_receipt_date => TRUNC(SYSDATE)
,p_gl_date => TRUNC(SYSDATE)
,p_amount => l_receipt_amount
,p_currency_code => g_currency_code
,p_receipt_method_id => l_receipt_method_id
,p_customer_id => l_customer_id
,p_cr_id => l_cr_id
,p_org_id => r_ar_org_records.org_id
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
DBMS_OUTPUT.PUT_LINE('Status - '||l_return_status);
IF l_return_status <> 'S' THEN
g_ar_error := 'Y';
DBMS_OUTPUT.PUT_LINE('Error count/msg - '||l_msg_count||'-'||l_msg_data);
IF l_msg_count = 1 THEN
g_ar_error_msg := g_ar_error_msg||l_msg_data;
DBMS_OUTPUT.PUT_LINE('Error msg - '||l_msg_data);
ELSIF l_msg_count > 1 THEN
LOOP
l_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next
,fnd_api.g_false);
IF l_msg_data IS NULL THEN
EXIT;
END IF;
g_ar_error_msg := g_ar_error_msg||l_msg_data;
DBMS_OUTPUT.PUT_LINE('Error msg - '||l_msg_data);
END LOOP;
END IF;
xxar_log_error(r_ar_org_records.record_id,SUBSTR(g_ar_error_msg,1,120));
ELSE
DBMS_OUTPUT.PUT_LINE('Status - '||l_return_status);
FOR r_ar_records IN cr_ar_records(r_ar_org_records.org_id)
LOOP
fnd_msg_pub.initialize;
l_return_status := NULL;
l_msg_count := NULL;
l_msg_data := NULL;
l_cr_id := NULL;
l_receipt_amount := r_ar_records.amount_paid;
l_trx_number := r_ar_records.transaction_number;
g_currency_code := r_ar_records.currency_code;
l_receipt_date := SYSDATE;
l_gl_date := SYSDATE;
-- Apply payments for the RAF and Date Paid
AR_RECEIPT_API_PUB.APPLY(p_api_version => 1.0
,p_init_msg_list => fnd_api.g_true
,p_commit => fnd_api.g_false
,x_return_status => l_return_status
,x_msg_count => l_msg_count
,x_msg_data => l_msg_data
,p_receipt_number => l_receipt_number
,p_trx_number => l_trx_number
,p_amount_applied => l_receipt_amount
,p_org_id => r_ar_org_records.org_id
IF l_return_status <> 'S' THEN
g_ar_error := 'Y';
IF l_msg_count = 1 THEN
g_ar_error_msg := g_ar_error_msg||l_msg_data;
ELSIF l_msg_count > 1 THEN
LOOP
l_msg_data := fnd_msg_pub.get (fnd_msg_pub.g_next
,fnd_api.g_false);
IF l_msg_data IS NULL THEN
EXIT;
END IF;
g_ar_error_msg := g_ar_error_msg||l_msg_data;
END LOOP;
END IF;
xxar_log_error(r_ar_records.record_id,SUBSTR(g_ar_error_msg,1,240));
ELSE
DBMS_OUTPUT.PUT_LINE('Sucess 2 - ');
NULL;
/* -- Call Adjustment API for Contractual Allowance
IF NVL(r_ar_records.contractual_allowance_amt,0) > 0 THEN
xxar_third_party_rcpt_adj(r_ar_records.record_id
,r_ar_records.transaction_number
,r_ar_records.contractual_allowance_amt
,i_user_id
END IF; */
END IF;
END LOOP;
END IF;
DBMS_OUTPUT.PUT_LINE('Error Flag AR - '||g_ar_error);
IF g_ar_error = 'Y' THEN
xxar_log_error(r_ar_org_records.record_id,SUBSTR(g_ar_error_msg,1,240));
END IF;
END LOOP; -
Help with ORA-01403: no data found please.
First off I'd like to apologise for my lack of PL/SQL experience, what follows may seem naive, but I guess we all have to start somewhere.
I'm trying to create a function which determines an employee's Annual Holiday Entitlement by comparing their length of service against a lookup of entitlement values. Due to the complexity of the application I'm targeting there are a number of other factors to be take into consideration, but this is the basic idea of what I want to achieve.
I've started by taking a working SQL Server 2005 function and converted this using the translation scratch pad in SQL Developer 1.5.1 I'm now hand cranking the subtleties into the script but when I debug the code I'm getting "ORA-01403: no data found" at almost every SELECT. In fact the only successful select is from the ABS_SYSTEM_CONTROLS table. I can handle the first few failures by setting default values in the variables that I'm trying to load, but this isn't an option when it comes to selecting the DATE_OF_START from the PERSON table.
I've sure I've probably made some fundamental error, but can't spot it myself. Any help would be most welcome.
I've included the entire script below for your entertainment ;-)
Thanks
Phil.
create or replace
function mygetannualholidayentitlement
( v_empNo in varchar2
, v_inputDate in DATE
) return number as
-- Declare variables here
v_entitlement FLOAT(53);
v_holidayPlan VARCHAR2(20);
v_contServiceOption VARCHAR2(255);
v_postNo CHAR(16);
v_lengthOfService NUMBER(10,2) ; -- Need to give this a default value else the CURSOR (below) won't initialise.
v_empStartDate DATE;
-- Load up our loacal variable for each row in the loop and the final value is the one we want.
v_selectedLOF FLOAT(53);
v_selectedDateEffective DATE;
v_selectedAmount FLOAT(53);
v_effectiveDate DATE;
-- Cursor declaration
-- Holiday plan details are also keyed on DATE_EFFECTIVE. Need to identify which row is active as at our @effectiveDate.
CURSOR holDefCursor
IS SELECT length_of_service,
date_effective,
amount
FROM holiday_plan_def
WHERE hplan_code = v_holidayPlan
AND length_of_service < v_lengthOfService
ORDER BY date_effective ASC,
length_of_service ASC;
BEGIN
-- Initialise variables --
-- truncate any hours/Mins & secs from effective date
v_effectiveDate := trunc(v_inputdate);
v_entitlement := 0;
v_contServiceOption := 0;
v_lengthOfService := 0;
BEGIN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM APPT_HOLIDAY_BALANCE
WHERE emp_no = v_empNo
-- post_no = @postNo and
AND ( v_effectiveDate BETWEEN HOLIDAY_YEAR_START AND HOLIDAY_YEAR_END );
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_holidayplan:=NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- Still no hoildayPlan? Then use the default plan code from ABS_SYSTEM_CONTROLS.
IF v_holidayPlan IS NULL THEN
SELECT HPLAN_CODE
INTO v_holidayPlan
FROM ABS_SYSTEM_CONTROLS ;
END IF;
BEGIN
SELECT OPTION_VALUE
INTO v_contServiceOption
FROM PS_OPTIONS
WHERE OPTION_NAME = 'CONTINUOUS_SERVICE_OPTION';
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_contServiceOption := 'N' ;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
IF v_contServiceOption = 'Y' THEN
BEGIN
-- Need to take into account the employees CONTINUOUS_SERVICE_DATE when calculating length of service
BEGIN
SELECT CONTINUOUS_SERVICE_DATE
INTO v_empStartDate
FROM person
WHERE emp_no = v_empNo;
EXCEPTION
WHEN NO_DATA_FOUND THEN
v_empStartDate := NULL;
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
-- If we can't get a CONTINUOUS_SERVICE_DATE we will fall back to PERSON.DATE_OF_START
IF v_empStartDate IS NULL THEN
BEGIN
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
EXCEPTION
WHEN OTHERS THEN
raise_application_error(-20011,'Unknown Exception in MyGetAnnualHolidayEntitlement function.');
END;
END IF;
END;
ELSE
BEGIN
-- Need to use employees DATE_OF_START when calculating length of service
SELECT DATE_OF_START
INTO v_empStartDate
FROM PERSON
WHERE emp_no = v_empNo;
END;
END IF;
-- Now we can get length of service
v_lengthOfService := sqlserver_utilities.datediff('MONTH', v_empStartDate, v_effectiveDate) / 12.00;
OPEN holDefCursor;
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
WHILE ( sqlserver_utilities.fetch_status(holDefCursor%FOUND) = 0 )
LOOP
BEGIN
IF v_selectedDateEffective < v_effectiveDate THEN
v_entitlement := v_selectedAmount;
END IF;
-- Get the next value.
FETCH holDefCursor INTO v_selectedLOF,v_selectedDateEffective,v_selectedAmount;
END;
END LOOP;
CLOSE holDefCursor;
-- Return the result of the function
RETURN v_entitlement;
END;Edited by: user4395499 on 27-Oct-2008 04:04
Edited by: user4395499 on 27-Oct-2008 04:05
Edited by: user4395499 on 27-Oct-2008 07:10Your code is extremely procedural - whilst you could ultimately get it to work like this, it is not the most efficient way of doing it.
You should think about reducing your code to one sql statement if at all possible - this reduces the amount of context switching that needs to take place (eg. Going from PL/SQL to SQL back to PL/SQL to SQL, etc) and is usually much easier to maintain and test. You could do this by joining the various tables together, (and you might want to think about using nvl() to combine the two queries on the PERSON table!).
Also, you've labelled your parameters "v_" and your variables "v_" ... common convention uses "p_" for parameters, to allow for easy distinction between parameters passed in and variables declared during the course of the procedure/function.
As to the char() defined column - is there any chance that you could change that? As you've found out, chars are usually not a good datatype to use! Storing numbers in a char/varchar2 column is a no-no too, as you then run the risk of having invalid numbers stored in the column. -
ORA-01403: no data found when calling a web service from HTMLDB
I am working through Section 6 How to Implement a Web Service of the HTML DB 2 Day Developer tutorial. I can get the first example to work but not the second one. I am able to add the web reference and create the form and report. However, when I run the page and click submit, I get ORA-01403: no data found.
When I test the service, this is what shows in the Message Request:
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header><namesp1:Header xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Username xsi:type="xsd:string"></namesp1:Username><namesp1:Password xsi:type="xsd:string"></namesp1:Password><namesp1:Tracer xsi:type="xsd:string"></namesp1:Tracer></namesp1:Header></SOAP-ENV:Header><SOAP-ENV:Body><namesp1:ListFuturesByExchange xmlns:namesp1="http://www.xignite.com/services/"><namesp1:Exchange xsi:type="xsd:string">NYMEX</namesp1:Exchange></namesp1:ListFuturesByExchange></SOAP-ENV:Body></SOAP-ENV:Envelope>
Nothing shows in the Message Response.
I have also tried to call a simple web service that I created in .NET. It exhibits the same behavior. I am able to add the reference and create the form. But when I click the submit button, I get ORA-01403: no data found.
Windows 2000
HTMLDB 2.0.0.00.49
Oracle9i 9.2.0.6.0
Any help will be greatly appreciated.I'm having a similar problem!, Although, distressing as it is to observe the lack of response this thread has had for 9 months, I'm still seeking help here!
I created a web service reference according to the following WSDL : "http://OgAppExpress:[email protected]:5555/invoke/OgAdminUtils.pub:WSDL_HLR" (operation name="getSubscriberInfoByMSISDN") and a form on that web service, all of which went very nicely. But! When I ran the form, inserted the value ("3546933599") into the parameter and pressed submit.... => "ORA-01403: no data found"
The debug action displays very limited information and sheds no light on the problem :( Multiple attempts, on recreating the project from scratch, have resulted in the same utter failure! Needless to say, this nulls the affect of my Prozac proscription....
Is there anybody out there who can help me and defend APEX's reputation? -
ORA-01403: no data found error hile inserting into a table
Hi,
I am populating a PL/SQL table(Array) with the data. From that array inserting into a Actual table. Before inserting am checking array count. Array count is greater than 0. But I am getting "ORA-01403: no data found" exception. I am not getting why this error is displaying.
Please someone help me. Below is the code.
CREATE OR REPLACE PROCEDURE XXDL_TEST_INSERT
IS
BEGIN
IF t_array.count> 0 THEN
FND_FILE.PUT_LINE (FND_FILE.LOG, t_array.count);
FOR i IN t_array.FIRST..t_array.LAST
LOOP
INSERT INTO XXDL_TEST
VALUES(t_array(i).name )
END LOOP;
END IF;
EXCEPTION
WHEN OTHERS THEN
FND_FILE.PUT_LINE (FND_FILE.LOG,SQLERRM);
END;Thanks
AlakaIt looks like your Array is sparsely populated:
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(2) := 'B';
8 l_tab(3) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
B
C
PL/SQL procedure successfully completed.
SQL>
SQL> DECLARE
2 TYPE l_tab_type IS TABLE OF VARCHAR2(10)
3 INDEX BY BINARY_INTEGER;
4 l_tab l_tab_type;
5 BEGIN
6 l_tab(1) := 'A';
7 l_tab(3) := 'B';
8 l_tab(4) := 'C';
9 FOR i IN l_tab.FIRST .. l_tab.LAST LOOP
10 dbms_output.put_line(l_tab(i));
11 END LOOP;
12 END;
13 /
A
DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 10Edited by: JS1 on Apr 11, 2009 8:59 AM
You should also be using the FORALL syntax with INDICES OF. Check out The Docs -
ORA-01403: no data found in alert.log
Dear All,
I am getting ORA-01403: no data found in alert.log.Could you pls help me out what could be reasons behind it..Due to this i m getting loads of alerts.Pls suggest.
ThanksORA-01403 No Data Found
Typically, an ORA-01403 error occurs when an apply process tries to update an existing row and the OLD_VALUES in the row LCR do not match the current values at the destination database.
Typically, one of the following conditions causes this error:
Supplemental logging is not specified for columns that require supplemental logging at the source database. In this case, LCRs from the source database might not contain values for key columns. You can use a DML handler to modify the LCR so that it contains the necessary supplemental data. See "Using a DML Handler to Correct Error Transactions". Also, specify the necessary supplemental logging at the source database to prevent future errors.
There is a problem with the primary key in the table for which an LCR is applying a change. In this case, make sure the primary key is enabled by querying the DBA_CONSTRAINTS data dictionary view. If no primary key exists for the table, or if the target table has a different primary key than the source table, then specify substitute key columns using the SET_KEY_COLUMNS procedure in the DBMS_APPLY_ADM package. You also might encounter error ORA-23416 if a table being applied does not have a primary key. After you make these changes, you can reexecute the error transaction.
The transaction being applied depends on another transaction which has not yet executed. For example, if a transaction tries to update an employee with an employee_id of 300, but the row for this employee has not yet been inserted into the employees table, then the update fails. In this case, execute the transaction on which the error transaction depends. Then, reexecute the error transaction.
There is a data mismatch between a row LCR and the table for which the LCR is applying a change. Make sure row data in the table at the destination database matches the row data in the LCR. When you are checking for differences in the data, if there are any DATE columns in the shared table, then make sure your query shows the hours, minutes, and seconds. If there is a mismatch, then you can use a DML handler to modify an LCR so that it matches the table. See "Using a DML Handler to Correct Error Transactions".
Alternatively, you can update the current values in the row so that the row LCR can be applied successfully. If changes to the row are captured by a capture process at the destination database, then you probably do not want to replicate this manual change to destination databases. In this case, complete the following steps:
Set a tag in the session that corrects the row. Make sure you set the tag to a value that prevents the manual change from being replicated. For example, the tag can prevent the change from being captured by a capture process.
EXEC DBMS_STREAMS.SET_TAG(tag => HEXTORAW('17'));
In some environments, you might need to set the tag to a different value.
Update the row in the table so that the data matches the old values in the LCR.
Reexecute the error or reexecute all errors. To reexecute an error, run the EXECUTE_ERROR procedure in the DBMS_APPLY_ADM package, and specify the transaction identifier for the transaction that caused the error. For example:
EXEC DBMS_APPLY_ADM.EXECUTE_ERROR(local_transaction_id => '5.4.312');
Or, execute all errors for the apply process by running the EXECUTE_ALL_ERRORS procedure:
EXEC DBMS_APPLY_ADM.EXECUTE_ALL_ERRORS(apply_name => 'APPLY');
If you are going to make other changes in the current session that you want to replicate destination databases, then reset the tag for the session to an appropriate value, as in the following example:
EXEC DBMS_STREAMS.SET_TAG(tag => NULL);
In some environments, you might need to set the tag to a value other than NULL. -
ORA-01403: no data found for default value
I have the following pl/sql function body for setting the default value of a select list.
DECLARE
selected VARCHAR2(100);
BEGIN
select person_id into selected from ht_people
where :app_user=flow_user;
RETURN selected ;
END;
It works perfectly until the user who is logged in is not on the list and then I get:
ORA-01403: no data found
ERR-9131 Error in PLSQL function body for item default code, item=P7_IDENTIFIED_BY
Is there an item property I can set to handle this or must this be done in PL/SQL?This will throw no error if user not found:
DECLARE
selected VARCHAR2 (100);
BEGIN
FOR c IN (SELECT person_id
FROM ht_people
WHERE :app_user = flow_user)
LOOP
selected := c.person_id;
END LOOP;
RETURN selected;
END;Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
------------------------------------------------------------------- -
Update conflict resoltion ORA-01403: no data found
I have set up multimaster replication environment with two database and I have implemented Update conflict resolution on a table using DISCARD method(Oracle provided) as below.
Some how it is not able to resolve the conflict and I am getting erro ORA-01403: no data found.
On MDS(M1) I run the follwing SQL
update menu_code
set ipp_uid = 20
where id = 4;
commit;
on master(M2) database in table menu_code row with ID=4 doesn't exsit.
When I apply deffred transaction that gnerated by above SQL
I get ORA-01403: no data found and ofcourse trnsaction doesn't apply to db and goes to deferror. Since I am using DISCARD method
it should be resolved and not to gnerate error message.
Here is detail info.
Table name: menu_code
--creating column group
BEGIN
DBMS_REPCAT.MAKE_COLUMN_GROUP (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
column_group => 'MENU_CODE_CG1',
list_of_column_names => 'id,ipp_uid');
END;
-- adding update conflict resolution
BEGIN
DBMS_REPCAT.ADD_UPDATE_RESOLUTION (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
column_group => 'MENU_CODE_CG1',
sequence_no => 1,
method => 'DISCARD',
parameter_column_name => 'id,ipp_uid');
END;
--regenerating support for the table.
BEGIN
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
sname => 'SYNAPSE',
oname => 'MENU_CODE',
type => 'TABLE',
min_communication => TRUE);
END;
Thanks.
PravinYou are absolutely right. Now we decided not to write any conflict resolution routine at all.
Non MDS database is read-only till fail over. After fail over non MDS (other master) will allow insert/update operation.
To fail back to MDS we will write our procedure/function, out side of Oracle conflict resolution( both database will be in Read only mode during synchronizing).
We will delete all deferred transaction/error form the queue and once data transfer is complete, again MDS becomes primary database to use.
Oracle conflict resolutions are to complicated and has lots of overhead and maintenance.
Thanks.
Pravin -
I have an issue where myself and another user are unable to upload a csv file to my application using the "File Browse" page item in V4.1.1. I get the following error, "Error ORA-01403: no data found".
This function was working perfectly last week prior to the upgrade of our APEX to V4.1.1 from V3. Other users are still able to upload the csv file, so the PL/SQL behind it must be ok.
So here is where I am up to with testing.
Tested the upload using my login on my PC – Fail
Tested the upload using my login on another PC – Fail
Tested the upload using other user’s login on my PC – Success
Tested the upload using other user’s login on another PC - Success
Any help would be greatly appreciated.
Cheers,
GregThe offending piece of code was in a block of script that I used from an online sample when I was first setting up this upload script. A colleague had the same issue in another application and rewrote the script to resolve the issue, see below.
I'm still perplexed as to why the majority of users could run it ok, and there were only 2 of us that it errored on. But now it's working for all, and I can go back to building some cool stuff in V4.1.1.00.23.
-- Read data from wwv_flow_files
select blob_content into v_blob_data
from wwv_flow_files
where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USERID)
and id = (select max(id) from wwv_flow_files where updated_by = :APP_USERID);
-- Rewritten to the following, which works.
select blob_content into v_blob_data
from wwv_flow_files
where id = (select ID from wwv_flow_files
where UPDATED_BY = :APP_USERID
and LAST_UPDATED = (select max(LAST_UPDATED) from wwv_flow_files where UPDATED_BY = :APP_USERID));
Maybe you are looking for
-
APEX 4.0 Report Query column limitation, 43 column maximum for the result!
Hi there, I'm trying to generate report from Apex 4.0.1, but I got stucked with column limitation when I'm executing the report query. Case: Environment: oracle 11g, apex 4.0.1, oracle BI 11, windows xp Table: My test table is quite simple, by creati
-
Problem with distribution model receiver ports
Hi, I am facing a problem with distribution model. I am using Distribution model for material classification data. I am sending my classification data using CLFMAS message type to one of the receiver. Again another person also sending classification
-
All slide transitions 'lost' at conference presentation
This is a really weird one. I spent ages preparing my Keynote presentation for a big conference. I triple checked of course and all was great, UNTIL I connected my macbook pro to the projector set-up at the podium. The tech guy asked me to adjust the
-
SAP NetWeaver BPM Troubleshooting Guide
Hi all, I am not sure if you happen to see that the description of this forum had changed. Thus I wanted to point your attention to a a page we recently added to it: The so called '[SAP NetWeaver BPM Troubleshooting Guide|http://wiki.sdn.sap.com/wiki
-
EHP1 installation problem "No matching SAINT package for 'PI_BASIS' found"
Hi everybody, i want update an Netweaver 2007 (SP14), BI, Dual Stack system to EHP1 (SP 5). I use this manual during this installation: (Update to NetWeaver EhP1) http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/808c3535-e378-2c10-83b4-cff07abe