If one filed is null then i am removing that record. But it is failing
mstJan 23 2012 — edited Feb 15 2012Hi all,
I am populating data to tabler form from cursor when user press the one button
User will enter the :B4.EPCH_PCM_RCVD_QNTY filed in that form.
If :B4.EPCH_PCM_RCVD_QNTY is null then while saving the form that record should be removed automatically.
I written following code in KEY-COMMIT trigger but it is not working for first and second records :B4.EPCH_PCM_RCVD_QNTY is null it is failing. Please do the needfaul.
------------------------
go_block('B4');
FIRST_RECORD;
LOOP
IF :B4.EPCH_PCM_RCVD_QNTY IS NULL THEN
DELETE_RECORD;
IF :SYSTEM.CURSOR_RECORD <> 1 THEN
PREVIOUS_RECORD;
END IF;
END IF;
EXIT
WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
END LOOP;
----------------------------