Post Insert or Post Update
Hi,
When I put raise form_trigger_failure in post-update Or Post Update the form builder go throw normal behviour
and insert or update the record.
Regards,
Hi
Raise Form_Trigger_Failure just stops a specific process from executing due to a flag or a condition.
You should put all ur validation in When-validate-item or When-Validate_Record Trigger...
pls note that any statment after raise form_trigger_failure scope will not executed...
or try use...
VALIDATE(RECORD_SCOPE);
IF FORM_SUCCESS THEN
-- do some validation
ELSE
MESSAGE('not valid transaction');
RAISE FORM-TRIGGER-FAILURE;
END IF;else if some piece of code u share us will be helpful to deal with this problem...
Hope this helps...
Regards,
Abdetu...
Similar Messages
-
Errors with post-insert trigger
I had a POST-INSERT TRIGGER here.but i encountered some problems.can someone help me with the errors?
begin
insert into user_acct
userid_n, user_m, coy_c, contact_n, emp_n,
work_loc_c, curr_passwd_t, prt_f, indv_pc_f, pc_deploy_c,
ext_email_addr_t, other_na_sys_t, status_c, status_rmk_t, upd_d)
values
(:user_acct.userid_n, :user_acct.user_m, :user_acct.coy_c, :user_acct.contact_n, :user_acct.emp_n,
:user_acct.work_loc_c, :user_acct.curr_passwd_t, :user_acct.prt_f, :user_acct.indv_pc_f, :user_acct.pc_deploy_c,
:user_acct.ext_email_addr_t, :user_acct.other_na_sys_t, :user_acct.status_c, :user_acct.status_rmk_t,
:user_acct.upd_d);
exception
when others then
clear_message;
Message('Insertion of Applicant Particulars failed');
SYNCHRONIZE;
RAISE Form_Trigger_failure;
end;
begin
insert into user_acct_na_detl
na_sys_c)
values
(:na_sys_cd.na_sys_c);
exception
when others then
clear_message;
Message('Insertion of Non-Application failed');
SYNCHRONIZE;
RAISE Form_Trigger_failure;
end;
when others then
null;
end;
the error:
Error 103 at line 31, column 3
Encountered the symbol 'WHEN' when expecting one if the following:
begin declare end exception exit for goto if loop mod null
pragma raise return select update while <an identifier>
<a double-quoted delimited-identifier><a bind variable><<
close current delete fetch lock insert open rollback
savepoint set sql commit<a single-quoted SQL string>
The symbol "exception"was substituted for "WHEN" to continue
Error 103 at line 2, column 1
Encountered the symbol "END"i delete the "END" already but when i compile again, i encountered some error again.
Error 370 at line 27, column
OTHERS handler must be last among the exception handlers of a block
Error 0 at line 1, column 1
Statement ignored -
Am not sure how to solve this issue ,, but i had an old MAcBook Pro that i was using with for somt time and i got a notre MACBook pro and on both of them am using the same apple accouny to purchase or download application . . now APP store is not allowing to upgrade or purchase any applications on my newest MAC posting this message " To Update this application , sign in to the account you used to purchase it" .. and could not find a solution to this by signing out and in didnt work ,, any clues is much appreciated..
Cheers
HeshamThanks for you reply. I'm 99% positive that I'm using the user id and password that I used to set up my computer. That's why I'm stumped. I read the solution someone else suggested (type your user name without @gmail and create a new password. When I tried it, I was asked for my birthday. It didn't recognize it. I know I got my birthday correct. Oh well...
Karen -
Execution of ddl statement in post-insert trigger
hi,
I'm working on headstart 6.5. I wants to execute a DDL statement in post-insert-trigger.The problem is this trigger is executed in between pre-commit and post-forms-commit.In pre-commit the transaction is opened with a insert statement that is inserting "open" in field status which is having a deffered check constraint QMS_NEED_TO_CLOSE_TRANSACTION.In post-forms-commit it will check whether the transaction is open if yes will check the business rule will delete the data that was inserted into qms_transaction in pre-commit trigger and will close the transaction .
In between if i execute a DDl statement a commit will be performed on the insert statement written in pre-commit trigger.This will violate the check-constraint and we will get the error qms_need_to_close_transaction violated.
My business logic wants this statement to be executed at the post-insert trigger on the block.Is this possible??
Does anyone have face the same problem?Whts the workaround for the same?Hello,
You could use the execute_query after the commit_form called, by exeample in a KEY-COMMIT trigger.
KEY-COMMIT trigger
Commit_Form ;
Go_block( 'master_block' ) ;
Execute_Query ;Francois -
let say i define a post insert trigger for a datablock , then when this will be execute ?, after the insert is performed , in another words will the trigger wait till a comfirmation message is send from the database or let say that the insertion is not completed becuse of network failure then will the trigger execute?
Hi,
In Metalink document 61675.1 you can find the trigger execution sequence for Forms 4.5. I can't find the trigger execution sequence for Forms 6i, but I think this should be the same for most events.
For the event "create record", see the following triggers:
Create Record 1. Post-Change Block
2. When-Validate-Item Block
3. Post-Text-Item Block
4. When-Validate-Record Block
5. Post-Record Block
6. Post-Block Block
7. On-Savepoint Form
8. Pre-Commit Form
9. Pre-Insert Block
10. On-Insert Form
11. Post-Insert Block
12. Post-Forms-Commit Form
13. On-Commit Form
14. Post-Database-Commit Form
15. Pre-Block Block
16. Pre-Record Block
17. Pre-Text-Item Block
18. When-New-Item-Instance Form
So it seems the the Post-Insert trigger fires AFTER the insert is performed. The insert will be performed in the On-Insert trigger.
HTH
Kind regards,
Lennart de Vos -
Can't auto play music post iweb 1.1 update
Hello,
I have just updated to iweb 1.1. On the previous version I was able to publish and edit the html source using Taco HTML Edit to auto play Quicktime music attachment but with the 1.1 update I can't seem to find the source code for the music attachment. Please look at the source for this page:
http://web.mac.com/dilation/iWeb/Site/Foundation.html
there definitely is music attachment but can't see it from the source. And for some reason I need to right click the play button to play rather then left.
Does anyone know how I can make the music to autoplay post iweb 1.1 update?
iMac Mac OS X (10.4.6)The recent update to iWeb now places QuickTime content in a javascript file. Yours is:
http://web.mac.com/dilation/iWeb/Site/Foundation_files/Foundation.js
And the music file is:
4-11%20Piano%20Sonata%20No.13%20in%20E%20flat%20major,%20Op.27_1%20III.%20Adagio %20con%20espressione.m4a
It includes many spaces and some punctuation that could cause issues with playback on some machines. -
hi all
i have a form for sale entry. i want to insert into an another table
when i save its contents.
i used a post insert trigger for this.
but the form has a detail block. and so this insert as many records as this block has.
the form has the following blocks.
sal_master(master block)
sal_id
sal_date
cust_id
sal_detail(detail block)
sal_id
qty
price
post insert trigger
declare
a number; -- ledger no
b number; -- customer id
c date; -- entry date
d number; -- credit
begin
-- insert into customer ledger
select nvl(max(l_id)+1,1)
into a
from cust_led;
b:= :sal_master.cust_id;
c:= :sal_master.sal_date;
d:= :ser_detail.total;
insert into cust_led (l_id, cust_id, e_date, credit)
values ( a, b, c, d);
exception
when no_data_found then
raise FORM_TRIGGER_FAILURE;
END;
on block level and form level the result is same.
i want to insert only one entry in the table for multiple records
in this form.
MUhammad Nadeem
marda (pakistan)
[email protected]move this trigger to your sal_master(master block level) . this will only insert 1 record.
-
Dear All,
can anybody explain the difference b/w pre-insert and post-insert trigger ?
i need such example which process something that becomes possible in one trigger and no possible in other ?
Regards
Kashif ButtHere is an example. Please remove any syntax errors before running :-)
create sequence my_seq;
create table table_a
(id number(20) constraint pk_table_a primary key,
text varchar2(100)
create table table_b
(id number(20) constraint pk_table_b primary key,
a_id number(20) constraint fk1_table_b foreign key references table_a(id),
text varchar2(100)
Create a form with a block based on table_a with items "id" and "text"
"id" is on null canvas (not visible), put "text" on a canvas.
pre-insert:
select my_seq.nextval into :table_a.id;
This can't be done in post-insert. Then the insert will fail because it's the primary key and must be "not null"
post-insert:
insert into table_b(id, a_id, text)
values(my_seq.nextval, :table_a.id, 'Inserted automatically by post-insert');
This can't be done in the pre-insert trigger, because the foreign key constraint will require the record in table_a
to be inserted first. -
Hey Verizon / HTC / Google Please fix the caller ID problem, post 2.2 Froyo UPDATE. This is a major Problem.
I have provided some steps below that may help with the Caller Id issue you are experiencing.
Try completing a soft reset on the device. A soft reset would be powering the device off and pulling out the battery. Once the battery is removed, place it back in and power the device back on.
Dial *228 and send. Once dialed, listen for the recording to prompt you for option 1 and select option 1. The phone should complete its programming within a minute.
Ensure you are using the area-code and 7 digit number format (ex. 9999951212)
Try removing the contact and re-adding it. -
The "Roman" font is not being recognized in Firefox 4.0. As such, I cannot read any previously posted topics or post any new topics on websites using this font.
I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6. -
Change Moving Average Price when Post Goods issue posted from VL02N
Hi all,
Please help me to find USER EXIT / BADI or Enhancement to change Price - MSEG-DMBTR
when Post Goods Issue posted from transaction VL02N.
Thanks in advance,
Mila.Hi,
Check these Enhancemnts...
Exit Name Description
V02V0001 Sales area determination for stock transport order
V02V0002 User exit for storage location determination
V02V0003 User exit for gate + matl staging area determination (headr)
V02V0004 User Exit for Staging Area Determination (Item)
V50PSTAT Delivery: Item Status Calculation
V50Q0001 Delivery Monitor: User Exits for Filling Display Fields
V50R0001 Collective processing for delivery creation
V50R0002 Collective processing for delivery creation
V50R0004 Calculation of Stock for POs for Shipping Due Date List
V50S0001 User Exits for Delivery Processing
V53C0001 Rough workload calculation in time per item
V53C0002 W&S: RWE enhancement - shipping material type/time slot
V53W0001 User exits for creating picking waves
VMDE0001 Shipping Interface: Error Handling - Inbound IDoc
VMDE0002 Shipping Interface: Message PICKSD (Picking, Outbound)
VMDE0003 Shipping Interface: Message SDPICK (Picking, Inbound)
VMDE0004 Shipping Interface: Message SDPACK (Packing, Inbound)
Badi Name Description
DELIVERY_ADDR_SAP Determine Time-Dependent Delivery Address in Delivery
DELIVERY_PUBLISH Returns BAdI Implementation: Automatic GR Posting T 2
DELIVERY_PUBLISH Updating of Delivery in Purchase Order
DELIVERY_PUBLISH AIP: Delivery Confirmation for Sales Order
Regards
Raghu -
Payment Lot-Posting incomplete but posted a FICA document
Hello,
A payment lot was created with the status "Posting incomplete" and there were few items in the "Not posted" list. When checked one of the accounts, the FICA document was posted for payment, but was NOT referring to the payment lot. The account maintenance happened during the posting and cleared the open items. When tried to close the payment lot and transfer the to GL it failed due to the recon key in the reserved status. I re-posted the lot which updated with the status "Postings made". The non-posted items got new FICA document and it got updated in the Payment lot item. Now there are 2 payment documents in the account with the same amount.
There is no job failure or any information in the application log. I checked the system log and ST22, but no help.
Any help is appreciated.
Thanks
AgeethaHi,
The most common reason for the Incomplete status of the Payment lot is at times during the processing of the payment lot, System does not get sufficient background processes and then in that scenario goes into a incomplete state.
Make sure that when you are processing the payment lot, no other back ground jobs are running,so that payment lot gets all the background processes for posting the payment lot.
Moreover, if such scenario happens, just click on the "Post" button.
Once you do that the status will change from Incomplete to "Direct Postings Stopped".
Don't worry on the status, System starts posting the items once again.
Once its completed, you will find the status as Postings made or Postings made, post processing is required.
I think it might be something related to System issue rather than a functionality issue.
Had it been a functional issue, you would not be able to post the payment lot
Hope it clarifies.
Thanks,
Amlan -
Instead of trigger example - INSERT works but UPDATE and DELETE does not?
Below is a demostration script of what I am trying to troubleshoot. Tests are done on 10gR2;
conn system/system
drop table tt purge ;
create table tt nologging as select * from all_users ;
alter table tt add constraint pk_tt_user_id primary key (user_id) nologging ;
analyze table tt compute statistics for table for all indexed columns ;
conn hr/hr
drop database link dblink ;
create database link dblink
connect to system identified by system
using 'xe.turkcell' ;
select * from global_name@dblink ;
drop view v_tt ;
create view v_tt as select username, user_id, created from tt@dblink order by 2 ;
select count(*) from v_tt ;
COUNT(*)
13
drop sequence seq_pk_tt_user_id ;
create sequence seq_pk_tt_user_id
minvalue 1000 maxvalue 99999
increment by 1;
create synonym tt for tt@dblink ;
CREATE OR REPLACE PROCEDURE prc_update_tt(old_tt v_tt%ROWTYPE, new_tt v_tt%ROWTYPE) IS
BEGIN
IF old_tt.user_id != new_tt.user_id THEN
RETURN; -- primary key
END IF;
IF old_tt.user_id IS NOT NULL AND new_tt.user_id IS NULL THEN
DELETE FROM tt
WHERE user_id = nvl(old_tt.user_id,
-99);
RETURN;
END IF;
IF (old_tt.username IS NULL AND new_tt.username IS NOT NULL) OR
(old_tt.username IS NOT NULL AND new_tt.username != old_tt.username) THEN
UPDATE tt
SET username = new_tt.username
WHERE user_id = nvl(old_tt.user_id,
-99);
END IF;
IF (old_tt.created IS NULL AND new_tt.created IS NOT NULL) OR
(old_tt.created IS NOT NULL AND new_tt.created != old_tt.created) THEN
UPDATE tt
SET created = new_tt.created
WHERE user_id = nvl(old_tt.user_id,
-99);
END IF;
END prc_update_tt;
CREATE OR REPLACE PROCEDURE prc_insert_tt(old_tt v_tt%ROWTYPE, new_tt v_tt%ROWTYPE) IS
new_tt_user_id NUMBER;
BEGIN
SELECT seq_pk_tt_user_id.NEXTVAL INTO new_tt_user_id FROM dual;
INSERT INTO tt
(username, user_id, created)
VALUES
(new_tt.username, new_tt_user_id, new_tt.created);
END prc_insert_tt;
CREATE OR REPLACE PROCEDURE prc_delete_tt(old_tt v_tt%ROWTYPE, new_tt v_tt%ROWTYPE) IS
BEGIN
DELETE FROM tt
WHERE user_id = nvl(old_tt.user_id,
-99);
END prc_delete_tt;
CREATE OR REPLACE TRIGGER trg_iof_v_tt
INSTEAD OF UPDATE OR INSERT OR DELETE ON v_tt
FOR EACH ROW
DECLARE
new_tt v_tt%ROWTYPE;
old_tt v_tt%ROWTYPE;
BEGIN
dbms_output.put_line('INSTEAD OF TRIGGER fired');
dbms_output.put_line(':NEW.user_id ' || :NEW.user_id);
dbms_output.put_line(':OLD.user_id ' || :OLD.user_id);
dbms_output.put_line(':NEW.username ' || :NEW.username);
dbms_output.put_line(':OLD.username ' || :OLD.username);
dbms_output.put_line(':NEW.created ' || :NEW.created);
dbms_output.put_line(':OLD.created ' || :OLD.created);
new_tt.user_id := :NEW.user_id;
new_tt.username := :NEW.username;
new_tt.created := :NEW.created;
old_tt.user_id := :OLD.user_id;
old_tt.username := :OLD.username;
old_tt.created := :OLD.created;
IF inserting THEN
prc_insert_tt(old_tt,
new_tt);
ELSIF updating THEN
prc_update_tt(old_tt,
new_tt);
ELSIF deleting THEN
prc_delete_tt(old_tt,
new_tt);
END IF;
END trg_iof_v_tt;
set serveroutput on
set null ^
insert into v_tt values ('XXX', -1, sysdate) ;
INSTEAD OF TRIGGER fired
:NEW.user_id -1
:OLD.user_id
:NEW.username XXX
:OLD.username
:NEW.created 30/01/2007
:OLD.created
1 row created.
commit ;
select * from v_tt where username = 'XXX' ;
USERNAME USER_ID CREATED
XXX 1000 31/01/2007 <- seems to be no problem with insert part but
update v_tt set username = 'YYY' where user_id = 1000 ;
INSTEAD OF TRIGGER fired
:NEW.user_id
:OLD.user_id
:NEW.username YYY
:OLD.username
:NEW.created
:OLD.created
1 row updated.
commit ;
select count(*) from v_tt where username = 'YYY' ;
COUNT(*)
0 <- here is my first problem with update part, Oracle said "1 row updated."
delete from v_tt where user_id = 1000 ;
INSTEAD OF TRIGGER fired
:NEW.user_id
:OLD.user_id
:NEW.username
:OLD.username
:NEW.created
:OLD.created
1 row deleted.
commit ;
select count(*) from v_tt ;
COUNT(*)
14 <- here is my second problem with delete part, Oracle said "1 row deleted."
Any comments will be welcomed, thank you.
Message was edited by:
TongucY
changed "-1" values to "1000" in the where clause of delete and update statements.
it was a copy/paste mistake, sorry for that.What table do you process in your procedures ? You don't use DBLINK to
reference remote table in your procedures.
Seems, you have table "TT" in "HR" schema too.
Look:
SQL> create table tt nologging as select * from all_users where rownum <=3;
Table created.
SQL> select * from tt;
USERNAME USER_ID CREATED
SYS 0 25-APR-06
SYSTEM 5 25-APR-06
OUTLN 11 25-APR-06
SQL> conn scott/tiger
Connected.
SQL> create database link lk65 connect to ... identified by ... using 'nc65';
Database link created.
SQL> select * from tt@lk65;
USERNAME USER_ID CREATED
SYS 0 25-APR-06
SYSTEM 5 25-APR-06
OUTLN 11 25-APR-06
SQL> create view v_tt as select username, user_id, created from tt@lk65 order by 2;
View created.
SQL> select * from v_tt;
USERNAME USER_ID CREATED
SYS 0 25-APR-06
SYSTEM 5 25-APR-06
OUTLN 11 25-APR-06
SQL> create sequence seq_pk_tt_user_id
2 minvalue 1000 maxvalue 99999
3 increment by 1;
Sequence created.
SQL> CREATE OR REPLACE PROCEDURE prc_insert_tt(old_tt v_tt%ROWTYPE, new_tt v_tt%ROWTYPE) IS
2 new_tt_user_id NUMBER;
3 BEGIN
4 SELECT seq_pk_tt_user_id.NEXTVAL INTO new_tt_user_id FROM dual;
5 INSERT INTO tt
6 (username, user_id, created)
7 VALUES
8 (new_tt.username, new_tt_user_id, new_tt.created);
9 END prc_insert_tt;
10 /
Warning: Procedure created with compilation errors.
SQL> show error
Errors for PROCEDURE PRC_INSERT_TT:
LINE/COL ERROR
5/1 PL/SQL: SQL Statement ignored
5/13 PL/SQL: ORA-00942: table or view does not exist
SQL> edit
Wrote file afiedt.buf
1 CREATE OR REPLACE PROCEDURE prc_insert_tt(old_tt v_tt%ROWTYPE, new_tt v_tt%ROWTYPE) IS
2 new_tt_user_id NUMBER;
3 BEGIN
4 SELECT seq_pk_tt_user_id.NEXTVAL INTO new_tt_user_id FROM dual;
5 INSERT INTO tt@lk65
6 (username, user_id, created)
7 VALUES
8 (new_tt.username, new_tt_user_id, new_tt.created);
9* END prc_insert_tt;
SQL> /
Procedure created.Rgds. -
Is there a way to link an existing discussions post to a posts by topic? How is this accomplished?
I created a discussion post and a regular post with an assignment within a course. I trying to link a discussion post that I created externally within the course to a post with an assignment. Is there a way to do this?It took me a while to parse your question, so please forgive me if I'm making a faulty assumption.
As near as I can understand, you have created an assignment for which participation in a general discussion (i.e., not associated with a given post) is required for completion. To simplify matters for the student, you want to offer a direct link to the required discussion.
I thought dropping a link to Course Manager's URL to the discussion would do the trick, but that did NOT work. So, we're left with having to request this feature from Apple. I encourage you to make your interest known to Apple by filling out the feedback form:
http://www.apple.com/feedback/itunes-u_ios.html
Assume the reader has no idea what you are talking about, be thorough in your description, and include workflows and reference screenshots if applicable. -
POSTING ERROR-MESSAGE POSTING BALANCE NOT CLEARED FOR THE PERIOD 2/2008A
Hi
I have a problem in payroll posting. While posting for one employee's persn number rejected and gave a message as Posting Balance not cleared for the period 2/2008A. To come out of the problem I changed the Payroll status record using pu03 changed the Erliest Retro date as 01.06.2008. Again tried to post but not posted again same Message displayed. After changing the Erliest Retro record I have not run the payroll for the particular employee. Is it required to run the payroll for the employee after changing the status in PU03. Request to guide on this
Thanks
EKP YadavHi there
The posting may be out of balance for the employee because their credits dont equal their debits...
Do a test posting for the employee with the log on, this will tell you what amounts are being posted - and should give you an inidcation of where the balance is not cleared...
Yes, you would have to re-run the employee if you'd changed the retro date in PU03, but I dont think that will fix your posting problem....Should the employee have retroe'd?
From what I have seen, just changing the control record doesn't usually fix an out-of balance..there is usually another reason....eg wagetype incorrectly posting to the wrong number of accounts....or a missing wagetype on the employee (eg bank details...no /559 for the net pay to go to).
Cheers
Mary
Maybe you are looking for
-
Will an audio interface help?
I'm looking to get started with GB using my Yamaha Clavinova. I've managed to get the keyboard connected through its built in USB midi interface, but when playing software instruments there seems to be a limitation on how fast, and how many keys I ca
-
.exs is erased, how can I get it back?
Earlier today (1/16/08) I started a song and added a part using 'Cleopatra Chord' and saved it and left to do other stuff. When I returned later in the day I opened the song and as Garageband was loading a message appeared saying that "The file Hybri
-
Is this a way to eject my usb?
I clicked on file, then open and my usb port appeared in the list. I then clicked on the arrow which disappeared. Is this a way to eject my usb device?
-
What's the point of movie creator?
What is the point of movie creator if I can't edit or create my own movie? All it does is select it's genre (weekly,monthly,yearly ect) and compose it's own movie. To me it's a useless app either that or I'm a simpleton and haven't explored it enough
-
Error compiling pro*C/C code in SunOS 5.8
I am getting the following error when I try compiling a pro*C code and a C code on my new SunOS 5.8 ld: fatal: file /opt/SUNWspro/SC4.2/lib/crti.o: wrong ELF class: ELFCLASS32 Initially I was getting the error ld: fatal: file /opt/dbms/oracle/product