Showing the number of records affected (saved) [message #468608] |
Sat, 31 July 2010 02:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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';
|
|
|
|