Home » Developer & Programmer » Forms » Showing the number of records affected (saved) (10g R2, Linux)
Showing the number of records affected (saved) [message #468608] Sat, 31 July 2010 02:21 Go to next message
rajthampi
Messages: 28
Registered: December 2006
Location: Kuwait
Junior Member
Hi Guys
We are building a custom form extension with our EBS R12 where against certain parameters we are inserting and updating records in a table through a PL/SQL procedure.
This PL/SQL doesn't use a commit exclusively, instead the user must click the Save button after verifying the data (new records are inserted, existing ones are updated and after the insert and update routines, execute_query is fired to fetch the latest data)

Everything works fine, however, when the user clicks on the Save button form status bar says "FRM-40401: No changes to save"

We would like to alter this message with our own custom message stating how many records were inserted and hows many were updated (We have counters counting this information)

Under which particular trigger we should write the code to enhance this requirement?

regards
Re: Showing the number of records affected (saved) [message #468614 is a reply to message #468608] Sat, 31 July 2010 03:04 Go to previous messageGo to next message
rajthampi
Messages: 28
Registered: December 2006
Location: Kuwait
Junior Member
Okay guys
I managed to get this done by changing system messaging level, code as following:
Trigger: KEY-COMMIT
:System.Message_Level := '20';
if :ctrl.ins_count > 0 and :ctrl.upd_count > 0 then
Message(:ctrl.ins_count||' Records were newly added & '||:ctrl.upd_count||' Records were updated');
elsif :ctrl.ins_count > 0 and :ctrl.upd_count = 0 then
Message(:ctrl.ins_count||' Records were newly added & '||:ctrl.upd_count||' Records were updated');
elsif :ctrl.ins_count = 0 and :ctrl.upd_count > 0 then
Message(:ctrl.ins_count||' Records were newly added & '||:ctrl.upd_count||' Records were updated');
end if;
commit;
:System.Message_Level := '0';
Re: Showing the number of records affected (saved) [message #468684 is a reply to message #468614] Sun, 01 August 2010 07:57 Go to previous message
mehediu
Messages: 46
Registered: February 2010
Location: Dhaka
Member

Dear Mr.rajthampi

use standard.commit instead of commit

thanks
Md. mehedi Hossain
Previous Topic: retriving the data according to where clause
Next Topic: Displaying Arabic in Forms 10g
Goto Forum:
  


Current Time: Thu Sep 19 12:54:37 CDT 2024