Boolean Authorization No Data Found
Hello, I am trying to create a PL/SQL function returning Boolean to allow new contacts to sign up with a blank form and nothing in session state using a list entry on page 1 targeting page 2, or to edit existing contact information by clicking a link in an email sent to them with their ID in the link. They are required to enter their email address so that noone can "steal" their ID. Everything works except the authorization scheme.
I get ORA-01403: no data found Error ERR-1082 Error in executing authorization scheme code. OK. I suppose it is because the select statement returns no rows. I know this is basic stuff. Can someone please help me with the syntax? I really appreciate it.
declare
v_id number;
begin
select id into v_id from contacts
where id=:P2_ID and e_mail_address=:P2_SECURITY_CHECK;
if :P2_ID is null then
return true;
elsif :P2_ID is not null
and :P2_ID=v_id then
return true;
else return false;
end if;
end;
Peter
So add an exception just before your end statement:
exception
when no_data_found the return true; -- or false whatever you want
Similar Messages
-
Report shows "No data found" when validation fails
Hi folks,
I'm new to the OTN and have a short question regarding validations/report pagination.
We are using Apex 4.0.2.00.07.
I have a page containing a report with three columns.
First column is a checkbox (f30), the second one a date picker and the third one is a value field (f34).
I'm trying to build a validation for the value field (should only allow numeric values, but is varchar2) and used a validation with "Function Returning Boolean".
The PL/SQL code is:
DECLARE
vrow BINARY_INTEGER;
v_number FLOAT:=0;
BEGIN
FOR i IN 1 .. APEX_APPLICATION.g_f30.COUNT
LOOP
BEGIN
vrow := APEX_APPLICATION.g_f30 (i);
v_number := to_number(APEX_APPLICATION.g_f34(vrow));
RETURN TRUE;
EXCEPTION
WHEN OTHERS THEN
RETURN FALSE;
END;
END LOOP;
END;
The validation works fine, but every time I enter a non numeric value and the validation fails (error message is displayed correctly as notification) I get a "report error: ORA-01403: no data found" in the pagination area of the report.
Tried to disable pagination completely, but the error still displays when the validation fails.
Any help would be appreciated.
Thanks in advance and regards
SandroContent of the checkboxes is ok, debugging showed
1:7
2:8
(records 7 and 8 where ticked)
Debugging console also shows:
0.10900 0.00000 Processing point: Before Box Body
0.10900 0.00000 Region: Shareclassinformation
0.10900 0.00000 Item: P59_IS
0.10900 0.00000 Item: P59_NA
0.10900 0.00000 Item: P59_CO
0.10900 0.00000 Region: Attribute Selection
0.10900 0.00000 Item: P59_LO
0.10900 0.00000 Item: P59_ID
0.10900 0.00000 Item: P59_IDAH
0.10900 0.00000 Item: P59_IDAT
0.10900 0.00000 Item: P59_SHO
0.10900 0.00000 Item: P59_UTD
0.10900 0.00000 Item: P59_X NA
0.12500 0.00000 Region: Attributes
0.12500 0.23400 Item: P59_NOT
0.12500 0.00000 show report
0.12500 0.00000 determine column headings
0.12500 0.00000 parse query as: DB
0.35900 0.14100 binding: ":P59_LOV_AT"="P59_LOV_AT" value="64"
0.35900 0.00000 binding: ":P59_IDT"="P59_IDT" value="51"
0.50000 0.01500 print column headings
0.50000 0.00000 rows loop: 20 row(s)
*0.51500 0.01600 report error: ORA-01403: no data found*
0.51500 0.00000 Computation point: After Box Body
... -
Cancelling a report when no data found
Hi All!
I have a report that prints directly to the printer. But if the report query fetches no data then a blank page is printed.
How should I raise a customized message and stop the report execution if there is no data found?
Thanks in advanceHello,
Another way is this: Put a report level summary in the data model that counts the rows in the query (use as the summary count source one of the columns of the main query).
Then create an after report trigger that looks something like this:
function AfterReport return boolean is
begin
if (:cs_count = 0) then
raise srw.program_abort;
end if;
return (TRUE);
end;This will cause the report to stop execution. It'll show an error like this in the report server log:
REP-1419: 'afterreport': PL/SQL program aborted.
You'll have to warn people about this particular error log entry as this may look like abnormal termination, when in fact it is a deliberate termination of the report. But at least you won't get a blank page.
Regards,
The Oracle Reports Team --skw -
AFTER INSERT TIGGER, ora-01403: no data found error
Hi all,
I'm trying to create a fairly simple trigger which fires after an insert on a table.
The trigger is based on a function, defined within a package. The function is as follows...
FUNCTION check_contract_length (V_playerId IN NUMBER)
RETURN BOOLEAN
IS
months NUMBER;
months2 NUMBER;
BEGIN
SELECT months_between(contract_end, contract_start), contract_length
INTO months, months2
FROM player
WHERE playerId = v_playerId;
IF months <> months2 THEN
RETURN (true);
END IF;
RETURN (false);
END check_contract_length;The trigger operates when an insert is made on to the player table, it as defined as follows...
CREATE OR REPLACE TRIGGER play_ins_con
AFTER INSERT ON player
FOR EACH ROW
DECLARE
isover BOOLEAN;
BEGIN
IF INSERTING THEN
isover := player_constr_pkg.check_contract_length(:new.playerId);
IF isover THEN
RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
END IF;
END IF;
END play_ins_con;My problem is, is that every time I try to insert a row into the player table, the trigger fires and produces a "ora-01403: no data found" error. I was under the impression that as the trigger fires after an insert, this shouldn't be a problem.
I'm also aware that this constraint can probably be implemented using a CHECK constraint, however it would be a learning curve for me to work it out this way.
Any help would be much appreciated!!
Cheers guys.I'm also aware that this constraint can probably be implemented using a CHECK constraint,
however it would be a learning curve for me to work it out this way.Starting out by doing stuff the wrong way only increases the learning curve when it comes to doing things the right way. A check constraint is definitely the best way of doing it. However, if you must do it with a trigger this is the way to go:
CREATE OR REPLACE TRIGGER play_ins_con BEFORE INSERT ON player
FOR EACH ROW
BEGIN
IF months_between(:NEW.contract_end, :NEW.contract_start) <> :NEW.contract_length
THEN
RAISE_APPLICATION_ERROR(-30001, 'Contract length incorrect');
END IF;
END play_ins_con;
/Incidentally, as CONTRACT_LENGTH is wholly derivable from the other columns your table structure is obviously insufficiently normalised.
Also, note that only errors between -20999 and -20000 are reserved for our use. Any other number may be used by Oracle for its own purposes.
Cheers, APC -
DB connect no data found is rfc connection required
Hi Gurus,
I want to retrieve data from oracle database, i have all the table with data in it, but through the source system i.e db connect it does not display any contents of the table, it says no data found, the installation was all done perfecttly fine, i can read the table fields but i am not able to read the data from the table. what could be the problem.
Is an RFC connection required for this db connect to retrieve the data from oracle. or else what is the issue. Can anyone please help me out on this, I already posted long back on this still no reply on it. From the osss notes it allgives information about the intallation but it there is no data found then it does not give any information onthis. Can anyone please help me out on this.
Thanks,
HemHi Hem,
You want to retrieve data from Oracle Database using BW and you are having a problem?
Try isolation technique to solve your problem.
Try to use third party softwares e.g. MS Excel. Retrieve data from Oracle using MSExcel. If MSExcel can retrieve data then you can conclude:
a.) The network connection to Oracle is fine.
b.) Oracle is up and running and is able to serve data from your specified table.
RFC Connection is not required. RFC is only useful for SAP to SAP communication. This connection uses a different technique and uses a different driver to communicate. SAP provided DB Connect Engine. A similar approach as what Microsoft's OLEDB is doing. This to make a transparent connection between various database systems. (whether MSSQL, Oracle, MSACCESS, SYBASE etc.)
As part of isolation technique, are you sure you are accessing the correct table? Try to access other tables. If you can access data of different tables then something is wrong with the table you want to access.
Have you check authorization issues? Are you allowed to extract data?
Hope I have helped. If I did, please grant points...
--Jkyle -
Hi,
Im very new to streams and having a doubt regarding ORA-01403 issue happening while replication. Need you kind help on this regard. Thanks in advance.
Oracle version : 10.0.3.0
1.Suppose there are 10 LCRs in a Txn and one of the LCR caused ORA-01403 and none of the LCRs get executed.
We can read the data of this LCR and manually update the record in the Destination database.
Eventhough this is done, while re-executing the transaction, im getting the same ORA-01403 on the same LCR.
What could be the possible reason.
Since, this is a large scale system with thousands of transactions, it is not possible to handle the No data found issues occuring in the system.
I have written a PL/SQL block which can generate Update statements with the old data available in LCR, so that i can re-execute the Transaction again.
The PL/SQL block is given below. Could you please check if there are any issues in this while generating the UPDATE statements. Thank you
/* Formatted on 2008/10/23 14:46 (Formatter Plus v4.8.7) */
--Script for generating the Update scripts for the Message which caused the 'NO DATA FOUND' error.
DECLARE
RES NUMBER; --No:of errors to be resolved
RET NUMBER; --A number variable to hold the return value from getObject
I NUMBER; --Index for the loop
J NUMBER; --Index for the loop
K NUMBER; --Index for the loop
PK_COUNT NUMBER; --To Hold the no:of PK columns for a Table
LCR ANYDATA; --To Hold the Logical Change Record
TYP VARCHAR2 (61); --To Hold the Type of a Column
ROWLCR SYS.LCR$_ROW_RECORD; --To Hold the LCR caused the error in a Txn.
OLDLIST SYS.LCR$_ROW_LIST; --To Hold the Old data of the Record which was tried to Update/Delete
NEWLIST SYS.LCR$_ROW_LIST;
UPD_QRY VARCHAR2 (5000);
EQUALS VARCHAR2 (5) := ' = ';
DATA1 VARCHAR2 (2000);
NUM1 NUMBER;
DATE1 TIMESTAMP ( 0 );
TIMESTAMP1 TIMESTAMP ( 3 );
ISCOMMA BOOLEAN;
TYPE TAB_LCR IS TABLE OF ANYDATA
INDEX BY BINARY_INTEGER;
TYPE PK_COLS IS TABLE OF VARCHAR2 (50)
INDEX BY BINARY_INTEGER;
LCR_TABLE TAB_LCR;
PK_TABLE PK_COLS;
BEGIN
I := 1;
SELECT COUNT ( 1)
INTO RES
FROM DBA_APPLY_ERROR;
FOR TXN_ID IN
(SELECT MESSAGE_NUMBER,
LOCAL_TRANSACTION_ID
FROM DBA_APPLY_ERROR
WHERE LOCAL_TRANSACTION_ID =
'2.85.42516'
ORDER BY ERROR_CREATION_TIME)
LOOP
SELECT DBMS_APPLY_ADM.GET_ERROR_MESSAGE
(TXN_ID.MESSAGE_NUMBER,
TXN_ID.LOCAL_TRANSACTION_ID
INTO LCR
FROM DUAL;
LCR_TABLE (I) := LCR;
I := I + 1;
END LOOP;
I := 0;
K := 0;
dbms_output.put_line('size >'||lcr_table.count);
FOR K IN 1 .. RES
LOOP
ROWLCR := NULL;
RET :=
LCR_TABLE (K).GETOBJECT
(ROWLCR);
--dbms_output.put_line(rowlcr.GET_OBJECT_NAME);
PK_COUNT := 0;
--Finding the PK columns of the Table
SELECT COUNT ( 1)
INTO PK_COUNT
FROM ALL_CONS_COLUMNS COL,
ALL_CONSTRAINTS CON
WHERE COL.TABLE_NAME =
CON.TABLE_NAME
AND COL.CONSTRAINT_NAME =
CON.CONSTRAINT_NAME
AND CON.CONSTRAINT_TYPE = 'P'
AND CON.TABLE_NAME =
ROWLCR.GET_OBJECT_NAME;
dbms_output.put_line('Count of PK Columns >'||pk_count);
DEL_QRY := NULL;
DEL_QRY :=
'DELETE FROM '
|| ROWLCR.GET_OBJECT_NAME
|| ' WHERE ';
INS_QRY := NULL;
INS_QRY :=
'INSERT INTO '
|| ROWLCR.GET_OBJECT_NAME
|| ' ( ';
UPD_QRY := NULL;
UPD_QRY :=
'UPDATE '
|| ROWLCR.GET_OBJECT_NAME
|| ' SET ';
OLDLIST :=
ROWLCR.GET_VALUES ('old');
-- Generate Update Query
NEWLIST :=
ROWLCR.GET_VALUES ('old');
ISCOMMA := FALSE;
FOR J IN 1 .. NEWLIST.COUNT
LOOP
IF NEWLIST (J) IS NOT NULL
THEN
IF J <
NEWLIST.COUNT
THEN
IF ISCOMMA =
TRUE
THEN
UPD_QRY :=
UPD_QRY
|| ',';
END IF;
END IF;
ISCOMMA := FALSE;
TYP :=
NEWLIST
(J).DATA.GETTYPENAME;
IF (TYP =
'SYS.VARCHAR2'
THEN
RET :=
NEWLIST
(J
).DATA.GETVARCHAR2
(DATA1
IF DATA1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| SUBSTR
(DATA1,
0,
253
|| '''';
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.NUMBER'
THEN
RET :=
NEWLIST
(J
).DATA.GETNUMBER
(NUM1
IF NUM1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| NUM1;
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.DATE'
THEN
RET :=
NEWLIST
(J
).DATA.GETDATE
(DATE1
IF DATE1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| 'TO_Date( '
|| ''''
|| DATE1
|| ''''
|| ', '''
|| 'DD/MON/YYYY HH:MI:SS AM'')';
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.TIMESTAMP'
THEN
RET :=
NEWLIST
(J
).DATA.GETTIMESTAMP
(TIMESTAMP1
IF TIMESTAMP1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| TIMESTAMP1
|| '''';
ISCOMMA :=
TRUE;
END IF;
END IF;
END IF;
END LOOP;
--Setting the where Condition
UPD_QRY := UPD_QRY || ' WHERE ';
FOR I IN 1 .. PK_COUNT
LOOP
SELECT COLUMN_NAME
INTO PK_TABLE (I)
FROM ALL_CONS_COLUMNS COL,
ALL_CONSTRAINTS CON
WHERE COL.TABLE_NAME =
CON.TABLE_NAME
AND COL.CONSTRAINT_NAME =
CON.CONSTRAINT_NAME
AND CON.CONSTRAINT_TYPE =
'P'
AND POSITION = I
AND CON.TABLE_NAME =
ROWLCR.GET_OBJECT_NAME;
FOR J IN
1 .. NEWLIST.COUNT
LOOP
IF NEWLIST (J) IS NOT NULL
THEN
IF NEWLIST
(J
).COLUMN_NAME =
PK_TABLE
(I
THEN
UPD_QRY :=
UPD_QRY
|| ' '
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| ' '
|| EQUALS;
TYP :=
NEWLIST
(J
).DATA.GETTYPENAME;
IF (TYP =
'SYS.VARCHAR2'
THEN
RET :=
NEWLIST
(J
).DATA.GETVARCHAR2
(DATA1
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| SUBSTR
(DATA1,
0,
253
|| '''';
ELSIF (TYP =
'SYS.NUMBER'
THEN
RET :=
NEWLIST
(J
).DATA.GETNUMBER
(NUM1
UPD_QRY :=
UPD_QRY
|| ' '
|| NUM1;
END IF;
IF I <
PK_COUNT
THEN
UPD_QRY :=
UPD_QRY
|| ' AND ';
END IF;
END IF;
END IF;
END LOOP;
END LOOP;
UPD_QRY := UPD_QRY || ';';
DBMS_OUTPUT.PUT_LINE (UPD_QRY);
--Generate Update Query - End
END LOOP;
END;Thanks for you replies HTH and Dipali.
I would like to make some points clear from my side based on the issue i have raised.
1.The No Data Found error is happening on a table for which supplemental logging is enabled.
2.As per my understanding, the "Apply" process is comparing the existing data in the destination database with the "Old" data in the LCR.
Once there is a mismatch between these 2, ORA-01403 is thrown. (Please tell me whether my understanding is correct or not)
3.This mismatch can be on date field or even on the timestamp millisecond as well.
Now, the point im really wondering about :
Some how a mismatch got generated in the destination database (Not sure about the reason) and ORA-01403 is thrown.
If we could update the Destination database with the "Old" data from LCR, this mismatch should be resolved isnt it?
Reply to you Dipali :
If nothing is working out, im planning to put a conflict handler for all tables with "OVERWRITE" option. With the following script
--Generate script for applying Conflict Handler for the Tables for which Supplymentary Logging is enabled
declare
count1 number;
query varchar2(500) := null;
begin
for tables in (
select table_name from user_tables where table_name IN ("NAMES OF TABLES FOR WHICH SUPPLEMENTAL LOGGING IS ENABLED")
loop
count1 := 0;
dbms_output.put_line('DECLARE');
dbms_output.put_line('cols DBMS_UTILITY.NAME_ARRAY;');
dbms_output.put_line('BEGIN');
select max(position) into count1
from all_cons_columns col, all_constraints con
where col.table_name = con.table_name
and col.constraint_name = con.constraint_name
and con.constraint_type = 'P'
and con.table_name = tables.table_name;
for i in 1..count1
loop
query := null;
select 'cols(' || position || ')' || ' := ' || '''' || column_name || ''';'
into query
from all_cons_columns col, all_constraints con
where col.table_name = con.table_name
and col.constraint_name = con.constraint_name
and con.constraint_type = 'P'
and con.table_name = tables.table_name
and position = i;
dbms_output.put_line(query);
end loop;
dbms_output.put_line('DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(');
dbms_output.put_line('object_name => ''ICOOWR.' || tables.table_name|| ''',');
dbms_output.put_line('method_name => ''OVERWRITE'',');
dbms_output.put_line('resolution_column => ''COLM_NAME'',');
dbms_output.put_line('column_list => cols);');
dbms_output.put_line('END;');
dbms_output.put_line('/');
dbms_output.put_line('');
end loop;
end;
Reply to u HTH :
Our Destination database is a replica of the source and no triggers are running on any of these tables.
This is not the first time im facing this issue. Earlier, we had to take big outage times and clear the Replica database and apply the dump from the source...
Now i cant think about that situation. -
ORA-01403: no data found - refresh after insert on view
Hi all,
I have problems with refresh after insert on view and i override this method on my xxDefImpl.java
public boolean isUseReturningClause() {
return false;
Anyway what it does is to substitute the RETURNIN INTO to
SELECT ID INTO ? FROM MY_VIEW WHERE ID=?; END;".
And this gives me the error
ORA-01403: no data found ORA-06512: at line 1
Because i'm tryint to insert on my view with ID = -1
And then the view and the my triggers make it happen to became a real ID.
The thing is that i need to refresh my ID after insert and it runs this select with -1 and it finds no data of course because the trigger on the view and on my tables transformed it in a real ID .
DO u know what's missing?See section 26.5 Basing an Entity Object on a Join View or Remote DBLink in the ADF Developer's Guide for Forms/4GL Developers for the additional tip I believe you're missing about marking a unique attribute as well.
You can find the guide on the ADF Learning Center on OTN here:
http://www.oracle.com/technology/products/adf/learnadf.html -
HR_EMPLOYEE_API.CREATE_EMPLOYEE error ORA-01403: no data found
Hi
I am getting below error,
here hard coded values are same as i entered in front end.
Business Group ID :-> 81
Error Occured in API Block :-> ORA-01403: no data found
here is the my code
CREATE OR REPLACE PROCEDURE APPS.XXPER_EMP_API1(errbuf OUT VARCHAR2
,retcode OUT VARCHAR2
IS
ln_person_id NUMBER;
ln_assignment_id NUMBER;
ln_per_object_version_number NUMBER;
ln_asg_object_version_number NUMBER;
ln_per_comment_id NUMBER;
ln_assignment_sequence NUMBER;
gn_business_group_id NUMBER:=apps.fnd_global.per_business_group_id;
ld_per_effective_start_date DATE;
ld_per_effective_end_date DATE;
lc_registered_disabled VARCHAR2(30);
lc_title VARCHAR2(30);
lc_assignment_number VARCHAR2(300);
lb_name_combination_warning BOOLEAN;
lb_assign_payroll_warning BOOLEAN;
lb_orig_hire_warning BOOLEAN;
lc_full_name apps.per_all_people_f.full_name%TYPE;
lc_employee_number apps.per_all_people_f.employee_number%TYPE;
BEGIN
fnd_file.put_line(fnd_file.log,RPAD('*',80,'*'));
fnd_file.put_line(fnd_file.log,'Business Group ID :-> '||gn_business_group_id);
--l_gender Get from hr_lookups where lookup_type = 'SEX' AND enabled_flag='Y'
BEGIN
APPS.Hr_General.G_DATA_MIGRATOR_MODE := 'Y';
APPS.Hr_Employee_Api.Create_Employee
(p_validate => FALSE
,p_hire_date => SYSDATE-100
,p_business_group_id => 81
,p_last_name => 'G1LTest'
,p_sex => 'M'
,p_person_type_id => 1120
,p_per_comments => NULL
,p_date_employee_data_verified => NULL
,p_date_of_birth => TO_DATE('20-OCT-1982','DD-MON-
,p_email_address => NULL
,p_employee_number => lc_employee_number
,p_expense_check_send_to_addres => NULL
,p_first_name => 'G1FTest'
,p_known_as => NULL
--,p_marital_status => 'S'
,p_middle_names => NULL
,p_nationality => NULL
,p_national_identifier => NULL
,p_previous_last_name => NULL
,p_registered_disabled_flag => NULL
,p_title => 'MR.'
,p_vendor_id => NULL
,p_work_telephone => NULL
,p_attribute_category => 81
,p_attribute1 => NULL
,p_attribute2 => NULL
,p_attribute3 => NULL
,p_attribute4 => NULL
,p_attribute5 => NULL
,p_attribute6 => NULL
,p_attribute7 => NULL
,p_attribute8 => NULL
,p_attribute9 => NULL
,p_attribute10 => NULL
,p_attribute11 => NULL
,p_attribute12 => NULL
,p_attribute13 => NULL
,p_attribute14 => NULL
,p_attribute15 => NULL
,p_attribute16 => NULL
,p_attribute17 => NULL
,p_attribute18 => NULL
,p_attribute19 => NULL
,p_attribute20 => NULL
,p_attribute21 => NULL
,p_attribute22 => NULL
,p_attribute23 => NULL
,p_attribute24 => NULL
,p_attribute25 => NULL
,p_attribute26 => NULL
,p_attribute27 => NULL
,p_attribute28 => NULL
,p_attribute29 => NULL
,p_attribute30 => NULL
,p_per_information_category => 'AE'
-- p_per_information_category - Obsolete parameter, do not use
,p_per_information1 => NULL
,p_per_information2 => NULL
,p_per_information3 => NULL
,p_per_information4 => NULL
,p_per_information5 => NULL
,p_per_information6 => NULL
,p_per_information7 => NULL
,p_per_information8 => NULL
,p_per_information9 => NULL
,p_per_information10 => NULL
,p_per_information11 => NULL
,p_per_information12 => NULL
,p_per_information13 => NULL
,p_per_information14 => NULL
,p_per_information15 => NULL
,p_per_information16 => NULL
,p_per_information17 => NULL
,p_per_information18 => 205
,p_per_information19 => NULL
,p_per_information20 => NULL
,p_per_information21 => NULL
,p_per_information22 => NULL
,p_per_information23 => NULL
,p_per_information24 => NULL
,p_per_information25 => NULL
,p_per_information26 => NULL
,p_per_information27 => NULL
,p_per_information28 => NULL
,p_per_information29 => NULL
,p_per_information30 => NULL
,p_date_of_death => NULL
,p_background_check_status => 'N'
,p_background_date_check => NULL
,p_blood_type => NULL
,p_correspondence_language => NULL
,p_fast_path_employee => NULL
,p_fte_capacity => NULL
,p_honors => NULL
,p_internal_location => NULL
,p_last_medical_test_by => NULL
,p_last_medical_test_date => NULL
,p_mailstop => NULL
,p_office_number => NULL
,p_on_military_service => 'N'
,p_pre_name_adjunct => NULL
,p_rehire_recommendation => NULL
,p_projected_start_date => NULL
,p_resume_exists => 'N'
,p_resume_last_updated => NULL
,p_second_passport_exists => 'N'
,p_student_status => NULL
,p_work_schedule => NULL
,p_suffix => NULL
,p_benefit_group_id => NULL
,p_receipt_of_death_cert_date => NULL
,p_coord_ben_med_pln_no => NULL
,p_coord_ben_no_cvg_flag => 'N'
,p_coord_ben_med_ext_er => NULL
,p_coord_ben_med_pl_name => NULL
,p_coord_ben_med_insr_crr_name => NULL
,p_coord_ben_med_insr_crr_ident => NULL
,p_coord_ben_med_cvg_strt_dt => NULL
,p_coord_ben_med_cvg_end_dt => NULL
,p_uses_tobacco_flag => NULL
,p_dpdnt_adoption_date => NULL
,p_dpdnt_vlntry_svce_flag => 'N'
,p_original_date_of_hire => SYSDATE-100
,p_adjusted_svc_date => NULL
,p_town_of_birth => NULL
,p_region_of_birth => NULL
,p_country_of_birth => NULL
,p_global_person_id => NULL
,p_party_id => NULL
,p_person_id => ln_person_id
,p_assignment_id => ln_assignment_id
,p_per_object_version_number => ln_per_object_version_number
,p_asg_object_version_number => ln_asg_object_version_number
,p_per_effective_start_date => ld_per_effective_start_date
,p_per_effective_end_date => ld_per_effective_end_date
,p_full_name => lc_full_name
,p_per_comment_id => ln_per_comment_id
,p_assignment_sequence => ln_assignment_sequence
,p_assignment_number => lc_assignment_number
,p_name_combination_warning => lb_name_combination_warning
,p_assign_payroll_warning => lb_assign_payroll_warning
,p_orig_hire_warning => lb_orig_hire_warning
EXCEPTION
WHEN OTHERS THEN
fnd_file.put_line(fnd_file.log,'Error Occured in API Block :-> '||SQLERRM);
END;
fnd_file.put_line(fnd_file.log,RPAD('*',80,'*'));
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line(fnd_file.log,'Error Message :-> '||SQLERRM);
fnd_file.put_line(fnd_file.log,RPAD('*',80,'*'));
END XXPER_EMP_API1;
Please let me know if any body faced this situation & how to solve it.
Thanks & Rgeards
GireeshProblem solved by replacing SYSDATE with TRUNC(SYSDATE).
Thanks for Clive Tucker.
http://www.hcmaces.com/
Edited by: Gireesh PV on May 7, 2010 4:22 AM -
Apex_item.date_popup giving ORA-01403: no data found
Hi,
I'm having a problem with apex_item.date_popup(). We're using apex 4.0.2.
The apex_item.text and apex_item.select_list_from_query are working fine.
I have a table "dba_comp_veld". Querying this table it gives:
select COMP_VELD_ID, COMP_VELD_NAAM, COMP_VELD_TYPE, COMP_VELD_TYPE_POPUP, COMP_VELD_TYPE_DATE from dba_comp_veld where comp_id = 81;
COMP_VELD_ID COMP_VELD_NAAM COMP_VELD_TYPE COMP_VELD_TYPE_DATE
81 SID T
82 Poort T
85 Owner T
83 Server P
84 Alias T
86 Rdbms T
101 Datum D 20-APR-11
So, when the COMP_VELD_TYPE = D then I want to user apex_item.date_popup.
In the page-region (PL/SQL) the source is:
declare
nServer number;
BEGIN
select min(server_nummer) into nServer from dba_servers;
for rec in (select COMP_VELD_ID, COMP_VELD_NAAM, COMP_VELD_TYPE, COMP_VELD_TYPE_POPUP, COMP_VELD_TYPE_DATE from dba_comp_veld where comp_id = 81)
LOOP
htp.prn(rec.comp_veld_naam||' :');
case rec.comp_veld_type
when 'T' then
htp.prn(APEX_ITEM.TEXT(rec.comp_veld_id, ' ') );
when 'D' then
htp.prn(APEX_ITEM.DATE_POPUP(rec.comp_veld_id,'',rec.COMP_VELD_TYPE_DATE,'DD-MON-YY') );
when 'P' then
case rec.COMP_VELD_TYPE_POPUP
when 'DBA_SERVERS' then
htp.prn(APEX_ITEM.SELECT_LIST_FROM_QUERY(rec.comp_veld_id,nServer,'SELECT NAAM d, server_nummer r FROM dba_servers order by 1',null,'NO'));
else null;
end case;
else null;
end case;
htp.prn('
END LOOP;
END;
All the items are displayed ok, except the DATE_POPUP(). I'm getting a ORA-01403: no data found.
Why? the field rec.COMP_VELD_TYPE_DATE is having a date-value.
reg.
Chris
Edited by: J3v16 on 20-apr-2011 23:43Hi Hari,
I'm just checking my Ayuthentication Scheme (instead of my Authorization scheme) and it seems to be the origin of the "no_data_found" message.
The thing is that we make a Validation against one internal user table wich defines the office where the user work. That table had the username in lowercases and even the user wrote its username in the login page, using lowercases, the SELECT returned an "no_data_found".
If the username field in our table is un UPPERCASE, the same function, typing the username in lowercase, returns OK.
Thanks a lot for your interest
Agustin -
Show "No Applicable Data Found" for Report 0SD_C01_Q22
Hi Gurus,
I just activated BI Content Report, 0SD_C01_Q22 and it's relevant InfoSource, DataSource and so on. The data from R3 were loaded into the infoCube successfully.
However, it shows "No Applicable Data Found" when I executed the query.
I have tried to create a new query based on the same InfoCube but has NO limitation parameter. However the result was the same.
Can anyone consult out?
CheersHi my friends,
I have tested it with a really simple report that has no selection condition. But the result is the same.
Also, I have checked the data in infoprovider with LISTCUBE but the data are definitely available.
By the way, I test it with an account hazing profiles as SAP_ALL and S_A.SYSTEM. The super user account should have enough authorization.
So my friends, anymore ideas? Pls help out....
Cheers. -
Hi,
I'm deploying an APEX app with user general identified users (like user1, user2, and so).
Now in this stage of implementation, we created user groups and user, but when I migrate the app from dev to production, all the new users that we created in the prod environment, when they try to log in, the app sends the error "APEX.AUTHENTICATION.SESSION_VERIFY_FUNCTION - ORA-01403: no data found" and the users cant't access the app.
We have triple-checked all the variables buyt can't find the error from our side.
Any help would by highly appreciate
Thanks in advance,
Agustin.Hi Hari,
I'm just checking my Ayuthentication Scheme (instead of my Authorization scheme) and it seems to be the origin of the "no_data_found" message.
The thing is that we make a Validation against one internal user table wich defines the office where the user work. That table had the username in lowercases and even the user wrote its username in the login page, using lowercases, the SELECT returned an "no_data_found".
If the username field in our table is un UPPERCASE, the same function, typing the username in lowercase, returns OK.
Thanks a lot for your interest
Agustin -
Hello,
I have text item called 'store' in my form. When the user keys in a store#, it should either provide a LOV of stores (if the store already exists in my tables). Else it should simply enable a bunch of fields/blocks in the form. However, when I key in a store that does not exist in my tables, it throws the '0RA-01403: No data found' error. The exception is supposed to catch it right? why does still it show that message in the form?
Below is my code:
DECLARE
v_prop_id number;
v_user varchar2(10);
v_user_id varchar2(10) := fnd_global.user_id;
v_status boolean;
v_chk number;
BEGIN
IF :PAY_HEAD.STORE is not null THEN
IF length(:PAY_HEAD.STORE) = 5 THEN
NULL;
ELSE
IF length(:PAY_HEAD.STORE) <= 4 THEN
IF :PAY_HEAD.STORE > 6999 THEN
:PAY_HEAD.STORE := '7' || lpad(:PAY_HEAD.STORE,4,'0');
ELSE
:PAY_HEAD.STORE := '1' || lpad(:PAY_HEAD.STORE,4,'0');
END IF;
--message(:PAY_HEAD.STORE);
SELECT COUNT(*)
INTO v_chk
FROM PN_PROPERTIES_ALL
WHERE property_name like :PAY_HEAD.STORE || '%';
IF v_chk > 1 THEN
v_status := SHOW_LOV('STORE_LIST');
END IF;
END IF;
END IF;
BEGIN
SELECT property_id
into v_prop_id
FROM PN_PROPERTIES_ALL
WHERE property_name = :PAY_HEAD.STORE;
EXCEPTION
WHEN NO_DATA_FOUND THEN
message('test5');
:GLOBAL.PAY_STATUS := 0;
:GLOBAL.PROPERTY_STATUS := 'NEW';
SET_ITEM_PROPERTY('PAY_HEAD.INSERT',LABEL,'Save');
SET_ITEM_PROPERTY('PAY_HEAD.APPROVE',ENABLED,PROPERTY_FALSE);
SET_ITEM_PROPERTY('PAY_HEAD.SUBMIT',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.INSERT',ENABLED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_ACCTS',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_RECON',INSERT_ALLOWED,PROPERTY_TRUE);
SET_BLOCK_PROPERTY('PAY_DETAIL_COMM',INSERT_ALLOWED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.ST_CITY',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.ST_STATE',ENABLED,PROPERTY_TRUE);
SET_ITEM_PROPERTY('PAY_HEAD.LOCATION_TYPE',ENABLED,PROPERTY_TRUE);
END;
END IF;
END;Thanks,
Chiru
Edited by: Megastar_Chiru on May 3, 2010 2:57 PMIf you are able to run your Form from the Forms Builder, I suggest you turn Debug Messages on then run your form. The Debug Messages will display an Alert informing you of the trigger that is about to execute. This is a help debugging step, just don't forget to turn the Debug Message off again! :D
To turn Debug Messages on, go to Edit - > Preferences - > Runtime Tab -> Debug Messages checkbox.
If your Form is web deployed and you are unable to configure Form Builder so you can run your form locally, I suggest you work with your application server admin to temporarily enable Forms Runtime Diagnostics (FRD). Check out My Oracle Support (formerly Metalink) documents:
Forms Runtime Diagnostics (FRD) [ID 372323.1] (Forms 6i)
or
How to run Forms Runtime Diagnostics (FRD) in 10gR2 Forms. [ID 745280.1]
Craig... -
Discoverer Report returning ' no data found '
Hi ...
i have an issue with one discoverer report .
Discoverer report name : EDI Price Exception Report.
when i ran the report in Discoverer Desktop edition It is returning 'No Data Found ' But i am taken the Query from admin edition and tried to ran in PL/SQL Developer/TOAD by setting Org_id condition
it's returning Data . the Desktop Edition of Discoverer for some specific date Range it's giving Data But from last month on wards it's not returning any Data.
in Discoverer Report Desktop it's not retuning the Data from November to till date
Oracle Applications 11i
Discoverer 4i
Oracle Data base :9i
OS : Windows.
Attached the Sql which i used to generate the Report :
I HAVE USED THE FOLLOWING :-for initialize the profile options
EXEC FND_GLOBAL.APPS_INITIALIZE (0,52163,660);
EXEC APPS.FND_CLIENT_INFO.SET_ORG_CONTEXT(2922);
SELECT A.CUST_PO_NUMBER,
A.ORDER_NUMBER,
A.ORDERED_DATE,
A.ORDER_TYPE,
-- C.CUSTOMER_ID,
C.CUSTOMER_NUMBER,
C.CUSTOMER_NAME,
B.LINE_NUMBER,
B.ORDERED_ITEM,
MSI.SEGMENT1 ACCO_ITEM, -- GRW 20060407
MSI.DESCRIPTION,
-- MSI.INVENTORY_ITEM_ID,
(SELECT MCI.CUSTOMER_ITEM_NUMBER
FROM MTL_CUSTOMER_ITEMS MCI,
MTL_CUSTOMER_ITEM_XREFS MCIX,
MTL_SYSTEM_ITEMS_B MSIB
-- MTL_PARAMETERS MP
WHERE MCI.CUSTOMER_ID = C.CUSTOMER_ID --1814924
AND MCI.CUSTOMER_ITEM_ID = MCIX.CUSTOMER_ITEM_ID
AND MCIX.INVENTORY_ITEM_ID = MSIB.INVENTORY_ITEM_ID
AND MSIB.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID --869899
AND MSIB.ORGANIZATION_ID = MTP.ORGANIZATION_ID --MP.ORGANIZATION_ID
AND MTP.ORGANIZATION_CODE = 'BRM'
AND MCI.CUSTOMER_ITEM_NUMBER = B.ORDERED_ITEM
AND NVL (mci.inactive_flag, 'N') <> 'Y'
AND NVL (mcix.inactive_flag, 'N') <> 'Y')
CUSTOMER_ITEM,
XXAB_ITEM_XREFS.GET_GBC_ITEM_NUM (B.ORDERED_ITEM) GBC_ITEM_NUMBER,
B.ORDERED_QUANTITY,
B.PRICE_LIST,
B.UNIT_SELLING_PRICE,
B.UNIT_LIST_PRICE,
TO_NUMBER (B.ATTRIBUTE7) CUST_SENT_PRICE,
apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)
CUST_SENT_PRICE_CONVERTED,
ABS ( (B.UNIT_SELLING_PRICE
- apps.XXAB_CUST_SENT_PRICE_CONV_SO (C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)))
DIFFERENCE,
MTP.ORGANIZATION_CODE,
B.SHIP_TO_LOCATION
FROM OE_ORDER_HEADERS_V A,
OE_ORDER_LINES_V B,
RA_CUSTOMERS C,
MTL_PARAMETERS MTP,
MTL_SYSTEM_ITEMS_B MSI
WHERE A.HEADER_ID = B.HEADER_ID
AND A.SOLD_TO_ORG_ID = C.CUSTOMER_ID
-- Added by Gati on 19-Oct-2012, tkt - INC000000118962
AND ROUND (TO_NUMBER (apps.XXAB_CUST_SENT_PRICE_CONV_SO (
C.customer_number,
B.ordered_item,
B.header_id,
B.line_number,
B.unit_selling_price,
B.attribute7,
B.pricing_quantity_uom,
B.attribute4)),
2) <> B.UNIT_SELLING_PRICE
--AND ROUND(TO_NUMBER(B.ATTRIBUTE7), 2) <> B.UNIT_SELLING_PRICE
--AND a.ship_from_org_id = mtp.organization_id
AND B.SHIP_FROM_ORG_ID = MTP.ORGANIZATION_ID -- GRW 20060413
--AND a.ship_from_org_id = msi.organization_id
AND B.SHIP_FROM_ORG_ID = MSI.ORGANIZATION_ID -- GRW 20060413
AND B.INVENTORY_ITEM_ID = MSI.INVENTORY_ITEM_ID -- GRW 20060407
AND A.ORDER_SOURCE_ID = 6
AND A.ORG_ID = B.ORG_ID
AND TO_CHAR (A.ordered_date, 'DD-MON-YYYY') between '01-NOV-2013' and '03-NOV-2013'
and mtP.organization_code='BRM'
AND A.ORG_ID = (SELECT HOU.ORGANIZATION_ID
FROM HR_OPERATING_UNITS HOU
WHERE HOU.NAME = '50 ACCO Canada')
AND B.cancelled_flag <> 'Y'
AND B.flow_status_code <> 'CANCELLED'
AND B.ORDERED_ITEM <> 'INVALID_ITEM'
ORDER BY a.order_numberHi,
Assuming your initialization matches your discoverer login, it is pretty weird that you get no data.
I am not sure how you got the SQL but i suggest you trace the session to get the exact SQL ran by the discoverer.
You may find another condition or join that limits your data.
Also another thing that you should try is to initial the session by using all the parameters (including the security group as you have in your discoverer login):
begin
fnd_global.APPS_INITIALIZE(user_id =>, resp_id =>, resp_appl_id =>, security_group_id =>);
end -
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 -
Can not view/export a report which has 2 group by field when no data found
Recently I developed a report, which contains 2 group by fields. it runs successfully when the report displays some data.
but when there is no data, i cann't view/export this report.
It shows nothing by html format and shows "this file cannot be opened because it has no pages" message by pdf format.
even there is no records for this report, i still want to see the template file and show some basic information.
please help me.
DanielI've found that, just like I used to do in Oracle Reports, if you put in a COUNT column to count your returning rows, you can put 'No Data Found' when there's no data. That way, your report will return and not error out.
For .pdfs, this is the code I use; COUNT with code of <?if:count(field_name)=0?>.
In the .rtf..
COUNT
No Data Found
END COUNT
Put this in the .rtf before your data should appear or else it won't work.
Hope this helps!
Kris
Maybe you are looking for
-
Question about using a USA itunes account in UK
So can I do this? I live in the UK, so can I use an american account with no credit card on but has credit to download albums?
-
Error Detected by export DLL for pdf
Post Author: netonomous CA Forum: Exporting We have a Win 2000 box with this feature working with no problem. I am getting an error exporting to .PDF when using .NET 2 Business Objects. Quite the opposite of your situation. Any ideas? My temp folder
-
After upgrading my dual monitor wont work
It keeps flashing say ing no signaland every now and hten display sit,
-
Hi, I am having issues with not all the SCCM client actions appearing in my clients. So it might start at 11 actions - then drop down the 5 actions then go back up to 6 and then after a day go to 11. So this happens after an OSD build. So I might bui
-
Hello all. The last Mac I used was a 2ci, SE30 and Color Classic. After that I've been a PC man. Now I want to return to the Mac world and use LogicPro7. My first question is how well does it run on an iMac? I'm thinking one of the 20 or 24 inch mode