Raising an exception in report
Hi All,
Consider the following scenario:
a = b * c ( where a, b c are variables of type i)
After multiplication, if the variable has reached it max limit of integers, then it would throw a short dump.
My question: How do I catch this type of exceptions in reports.
Thanks in Advance,
Regards,
Deepika
Moderator Message: Very basic question. Please search before posting. Also, responders please do not encourage such behaviour.
Edited by: kishan P on Sep 2, 2010 3:19 PM
Hi,
Try the below code
DATA : a TYPE i VALUE '1000000001'
, b TYPE i VALUE '1000000001'
DATA l_oref TYPE REF TO cx_root.
DATA p_text TYPE string.
TRY.
a = a * b.
CATCH cx_sy_arithmetic_overflow INTO l_oref.
p_text = l_oref->get_text( ).
WRITE / p_text.
ENDTRY.
Similar Messages
-
System instability using reports that raise an exceptions
I am having a problem with some reports when I use the type "PL/SQL function body returning SQL query".
If the Function raise an exception, the apex's engine will call again the function and it raise again the exception. These will make a loop that doesn't end until you close the session. The problem is that this page consume all the recourse of the CPU and/or fill the partition where the logs are saved. All these generate Instability on the server and also could bring down the server.
To reproduce this error you have to follow this steps:
1) First create a simple function to return a raise.
FUNCTION DORTEGA_TEST_RAISE RETURN VARCHAR2 IS
BEGIN
DECLARE
A NUMBER;
BEGIN
A := 12/0; --This operation generate an exception.
END;
RETURN 'SELECT 1 FROM DUAL';
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
2) Create a empty page with one report region.
3) Edit the report region and set these values:
a. Type = SQL Query (PL/SQL function body returning SQL query)
b. Display Point = Page Template Region Position 2
c. Source = BEGIN RETURN DORTEGA_TEST_RAISE; END;
Use Generic Column Names (parse query at runtime only)
4) When we run the application the page never load, and if you look the data base, you can view that the session it’s growing and it’s begins to consume all the memory and the processor of the server.
I am using APEX 3.1.0.00.32. And the DB is 11g.
Someone know why is this happening? Are there any fix for this bug?Hi:
I was able to reproduce this in APEX 3.1.2 installed in an Oracle XE instance.
The APEX engine does seem to go into an endless loop and the server Oracle process handling this request eventually does with an out-of-memory error.
However, if instead of raising an exception in the exception handler of the function I have a statement like 'Return Null;' then the APEX engine comes back with an expected response of
failed to parse SQL query:
ORA-00900: invalid SQL statement
Varad -
How to Raise a Exception in constructor ..
Hi all...
Can any one tell how to raise a Exception in Constructor ...
u can Post codings if u have ....
Thanking you ...Hello Jayakumar
Here is a sample report showing how to use exception classes:
*& Report ZUS_SDN_EXCP_IN_CONSTRUCTOR
REPORT zus_sdn_excp_in_constructor.
* CLASS zcl_myclass DEFINITION
CLASS zcl_myclass DEFINITION.
PUBLIC SECTION.
METHODS:
constructor
IMPORTING
value(id_dump) TYPE boolean
" EXCEPTIONS " do not use exceptions !!!
RAISING
cx_bapi_error.
ENDCLASS. "zcl_myclass DEFINITION
* CLASS zcl_myclass IMPLEMENTATION
CLASS zcl_myclass IMPLEMENTATION.
METHOD constructor.
IF ( id_dump = 'X' ).
RAISE EXCEPTION TYPE cx_bapi_error
EXPORTING
textid = cx_bapi_error=>cx_bo_error
class_name = 'ZCL_MYCLASS'.
ENDIF.
ENDMETHOD. "constructor
ENDCLASS. "zcl_myclass IMPLEMENTATION
DATA:
gd_text TYPE string,
go_myclass TYPE REF TO zcl_myclass,
go_error TYPE REF TO cx_root.
START-OF-SELECTION.
TRY.
CREATE OBJECT go_myclass
EXPORTING
id_dump = 'X'.
CATCH cx_bapi_error INTO go_error.
gd_text = go_error->get_text( ).
MESSAGE gd_text TYPE 'I'.
ENDTRY.
END-OF-SELECTION.
Regards
Uwe -
Exception Messages Report / List
I have been unable to locate an exception messages report, either for production orders, requisitions, or purchase orders. I am looking for a report that will contain all of the exception mesages.
Ideally, the output would be something like:
1. WBS element (project)
2. Material number
3. Material Description
4. Make or buy code
5. Recd. / Reqd. Quantity (This would be the qty affected by the exception message)
6. Date (e.g. date on which the material is currently expected to be received)
7. Purchase order or work order #
8. Purchase order line #
9. Purchasing group
10. MRP Controller
11. Exception message Number
12. Exception message Description
13. Re-Scheduling date
14. Various additional MM fields
I have requested the report, but I am told by my IT group that the exception messages do not reside in any table, so they cannot be retrieved, much less exported to excel, so a list of teh applicable tables/fields would also help.
I assume that this issue has been raised and solved many times, since SAP is not new and my request not unique.
I welcome any suggestions.
Thank you.HI,
Why dont you try to list the messages in SE91 and by giving the application area.
Thanks & Regards,
Kiran -
Tcode VF02 RAISE statement in the program "SAPLCSS3" raised the exception.
Hi,
I am getting a short dump in my smartform attached with vf02. For few of invoice no. its working perfectly but giving dump in few invoice no.
Below is short dump statement. Pls guide me for this issue.
A RAISE statement in the program "SAPLCSS3" raised the exception
condition "CALL_INVALID".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
invalid call
Regards,
Ranu`
Edited by: ranu sharma on Feb 6, 2010 2:55 PMHi Dipesh,
In background SAP GUI functionalities are not available.
This question has been asked many times on scn:
CNTL_ERROR
CNTL_ERROR while running a report in background mode
Regards,
Ashvin -
FRM-40735: when-button-pressed trigger raised unhandled exception ORA-06508
Hi,
I built a report using Reports Builder, and a form that calls this report. When I try to run the rdf file (report), using [b]rp2rro.rp2rro_run_product I get the error:
FRM-40735: when-button-pressed trigger raised unhandled exception ORA-06508.
How fix it?
[]'s
SandroHi Mark,
The debbuger stopped at line that was causing the error (rp2rro.rp2rro_run_product(REPORTS, 'myReport', SYNCHRONOUS, RUNTIME, FILESYSTEM,v_paramList , NULL);
The data type passed in arguments and its lenght that's ok... I don't know what I should do...
Sandro -
FRM-40735 WHEN BUTTON PRESSED trigger raised unhandled exception ORA-29282
Hi All,
while entering data in EAM forcaste workorder in maintenance workbench am getting this error
FRM-40735 WHEN BUTTON PRESSED trigger raised unhandled exception ORA-29282
check google and oracle forums and checked versions of pll and plx (as mentioned in one forum) for the form every thing is fine
i hav also generated tkprof report but did'nt get enough info required
my environment
linux 5.6
R12.1.3
on 11.1.0.7
please do let me know how to attach the print screen and tkprof report
please help
zaviHi There,
Srini:
the form form name is different from one you mentioned in note
ORA-29282 In POST-DELETE Trigger In EAMWOMDF Form [ID 1364328.1]
any how i check the EAM diag option is set to yes,
sorry i cant upload the screenshots and trace file we cant upload any from company
here are few details from form-->help--> about
RDBMS : 11.1.0.7.0
Oracle Applications : 12.1.3
Form Application : Enterprise Asset Management
Form Name : EAMPLNWB
Form Path : /u02/uat/apps/apps_st/appl/eam/12.0.0/forms/US/EAMPLNWB.fmx
Form Version : 12.0.78.12010000.28
Form Last Modified : $Date: 2011/05/17 02:44 $
Forms PL/SQL
APPCORE : 12.0.29.12010000.22
APPDAYPK : 12.0.2.12010000.6
APPFLDR : 12.0.6.12010000.2
APPTREE : 12.0.0
CUSTOM : 12.0.0
EAMMRMDF : 12.0.27.12010000.4
EAMOPMDF : 12.0.13.12010000.1
EAMRSMDF : 12.0.10.12010000.2
EAMWOMDF : 12.0.77.12010000.25
FNDAPLT : 12.0.1
FNDSQF : 12.0.3.12010000.8
GHR : 12.0.46.12010000.14
GLOBE : 12.0.76.12010000.10
GMS : 12.0.51.12010000.8
IGILUTIL2 : 12.0.32
IGILUTIL : 12.0.3
OPM : 12.0.7.12010000.2
PQH_GEN : 12.0.7
PSA : 12.0.17
PSAC : 12.0.5
PSB : 12.0.2
Hi Hussain:
from the note
Please see (Creating Work Orders with Activity gives PL/SQL: numeric or value error: ORA-06512: at "APPS.EAM_WORKORDER_PKG", line 1431 [ID 822365.1]).
it says about
to debug the issue, users has enabled profile EAM: Debug Profile Option needs to be set to Yes at site level.
Every time when WO API is involved, the following files are generated: createwo.log , updatewo.log.
where can i find those logs please specify the location
what i did
as said by hussain i have manually compiled form and libraries assocaited with that form
still waiting for reply from user
got tkprof report
few lines from that tkprof:
declare
m_stmt varchar2(512);
begin
m_stmt:='delete from sdo_geor_ddl__table$$';
EXECUTE IMMEDIATE m_stmt;
EXCEPTION
WHEN OTHERS THEN
NULL;
end;
some select statement
SELECT MAX(STOCK_LOCATOR_CONTROL_CODE), MAX(DEFAULT_DEMAND_CLASS),
MAX(CALENDAR_CODE), MAX(CALENDAR_EXCEPTION_SET_ID),
NVL(MAX(PROJECT_REFERENCE_ENABLED),2), NVL(MAX(PROJECT_CONTROL_LEVEL),1),
NVL(MAX(PM_COST_COLLECTION_ENABLED),2), MAX(PRIMARY_COST_METHOD)
FROM
MTL_PARAMETERS WHERE ORGANIZATION_ID = :B1
insert statement its performing
insert into eam_forecasted_work_orders( pm_forecast_id, group_id,
pm_schedule_id, activity_association_id, cycle_id, seq_id,
scheduled_start_date, scheduled_completion_date, action_type,
wip_entity_id, process_flag, wo_status, created_by, creation_date,
last_update_date, last_updated_by, pm_base_meter_reading ,
ORGANIZATION_ID )
values
( :1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, sysdate, sysdate,
:14,:15,:16 )
please add a line through your vission
cheers
Zavi -
Raised the exception condition"OUTPUTFIELD_TOO_SHORD"
Hi Folks,
I developed report on BOM explode. i sheduled my program in background mode and it is sucessfully completed. the movement i press 'print' to see the output its getting dumped.
the terminationed occured in prg'SAPLBTCH'.
1)raised the exception condition"OUTPUTFIELD_TOO_SHORD"
2)length of field RESULT is too short.
could you tell me i need to apply note on this or either the logic of my report may be inefficent ?( becoz my report taking morethan 1000 sec to execution).
thanks in advance
srini vanchaHi Srinivas,
Try this, If you are displaying any Icons or texts, increase the lenght and then check .
Thanks
Lakshman -
Call global class exception to report prog
Hi expert,
In global class, i write a method in that one exception can be raised. that exception can be called in
report program. please can you help me.
Thank you,
dinesh.Hello Dinesh
If your method has just exceptions defined in its signature and NOT exception classes then you can handle them like you do for function module exceptions.
However, I assume your method has one or more exception classes defined in its signature. Then you can use the TRY...CATCH...ENDTRY block:
" Here we are in your report:
DATA: lo_error TYPE REF TO cx_root.
DATA: ld_msg TYPE bapi_msg.
TRY.
CALL METHOD go_myclass->method_with_exceptionclass( ). " e.g. ZCX_MY_EXCEPTION
CATCH zcx_my_exception INTO lo_error.
ld_msg = lo_error->get_longtext( ).
MESSAGE ld_msg TYPE 'I'.
ENDTRY.
Regards
Uwe -
Raising cx_rsrout_abort exception in Start Routine of Transformations
Hello Abap OO Gurus:
This is likely a very simple question but I'm brand new to Abap OO and despite reading and searching, I cannot convert some old abap code used in the start routine of business content in BW to be used in the Transformation start routine in SAP BI.
My Start Routine inside a BI 7.0 transformation rule has a method declared like this:
<b>METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.</b>
The Exception "cx_rsrout_abort" has replaced what used to be a simple ABORT data field. The <u>old code I want to replace was just "abort = 1'.</u>
But now it seems like I have to use TRY... ENDTRY statement to raise Exception "cx_rsrout_abort". I am inside the abap code of the Method "start routine"
METHOD start_routine.
*=== Segments ===
Could some kind soul educate me as to how to raise the Exception "cx_rsrout_abort" inside the Method start routine?
thanks in advance, DavidTx HDev:
we are almost there... I have that PDF but never got thru to the rest of the Appendix B as my project is just too crazy...
When try what Appenix B suggest..
<u>"raise exception type CX_RSROUT_SKIP_RECORD."</u>
I get the following Warning msg which makes sense...
<b>"W:The exception CX_RSROUT_SKIP_RECORD is neither caught nor is it
declared in the RAISING clause of "START_ROUTINE".</b>
The METHOD statement in the start routine never declares another exception other than cx_rsrout_abort as seen below:
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
Maybe NW2004s has a bug here... I'm hoping that a SAP Developer reads this posting and can enlighten us all... otherwise I'll have to post a OSS msg
So the mystery is still how to do
"raise exception type CX_RSROUT_ABORT" and make this equal to ABORT = 1
which makes the start routine skip a record
tx again, David -
In R12.1.3 we get FRM-40735: ON-ERROR trigger raised unhandled exception.
Hello,
after we upgrade to R12.1.3 users are getting FRM-40735: ON-ERROR trigger raised unhandled exception ORA-01001, can you please help to resolve this issue immediately.Can you provide the list of patches you have applied?
In addition to the log files mentioned above, please confirm that you have no invalid objects in the database.
Loading the System Administrator Forms Responibility Produces Error FRM-40735,ORA-06508 (Doc ID 271652.1)
Oracle Application Return The following Error FRM-40735: ON-ERROR trigger raised unhandled exception ORA-6508 (Doc ID 797293.1)
After Migrating To Linux, Users Are Seeing FRM-40735 When Trying To Access Forms. (Doc ID 1282488.1)
Thanks,
Hussein -
Issue with Exceptions in Reporting
Hi BW Gurus,
I am still new to BW, Like I have a issue with exceptions in reporting.
Let me explain clearly, I created a report which gives me two MRP values they are for example V1 and PD(there other MRP types but I am focusing only this two). Here I can see in my report those two values and the overall result of all MRP types (they are 6 different types). My report looks like this for examply
V1 46,782,434(this are rough figures)
PD 56,232,453
Overall Result 102,434,111
Here my requirement is I need to find this overall result like accroding to thresold values this overall result shows RED,YELLOW,GREEN.
I have given threshold values in exceptions. like
0 -
> 45,000,000(Red)
45,000,001 -
> 65,000,000 (Yellow)
65,000,001 -
> 500,000,000 (Green)
But according to this values I should get Red( Overall Result), I cant see any change in the overall result.
Please can some one give advice how to reflect this threshold values in my report.Or I have to select any other options in exceptions.
Thanks in advance.
Regds
SamNot really possible with BEx functions, but if you provide a workbook to users you can just type in this information in a non-Bex cell and save the workbook.
Else you can try to name your exception such that it shows the value ranges. Then in the report, from the toolbar Layout > Display Exceptions.
Hope this helps... -
FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
I am getting the above error when i am trying to change the Assignment Category field of
an employee from Junior Staff to Senior Staff.
Navigation People> Enter & Maintain> (B)Assignment.
Kindly assist me to resolve this error.
Plz note there is a promotion that is suppose to be given to some employees in our company as of
01-APR-2010 so i had to open the closed payroll periods and do the changes. I managed to change for all
the 9 employees but 1 employee's assignment is giving me an error as follows :
FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
The error displays after i try to save the changes made to the Assignment Category from Junior Staff to Senior Staff.
NB: i have also tried to switch off the custom code...but its giving me same error.
Also the element links have been defined for employment category on the links window.
please help!!
Edited by: 594647 on Jul 20, 2010 10:26 PMRelease 12.1.1.
OS is Red Hat Ent Ed 4
i am trying to change the employee assignment category from Junior to Senior. so when i am updating the assignment details on the assignment screen (Navigation is People >Enter & Maintain> Assignment) and trying to save, the system gives error on the status bar of the application as follows:
FRM-40735 POST- UPDATE trigger raised unhandled exception ORA- 01403
NB: Error is appearing on the Assignment screen.
Please help!!
Edited by: 594647 on Jul 21, 2010 2:48 PM -
When-new-form-Instance trigger raised unhandled exception ORA-04062
Hi,
We are facing ORA-04062 (FRM-40735 WHEN-NEW-FORM-INSTANCE trigger raised unhandled exception ORA 04062) while trying to run the first form of our Application.
We are using a PL/SQL LIBRARY(.pll) for forms.
We are using 10G Application Server,10G DB and Oracle 9i Forms.
DB Version----10.1.0.4.0
Application Server--9.0.4.0
During compilation, we are following the below steps:
1. Compile the .pll
2.Compile Forms.
When we are running these compiled version of forms and pll in Development server where we are compiling it,we are not facing any error.
But when we are taking these compiled version of forms and pll to the Production Server,we are getting the above error.
When we are compiling the .pll in Production server, Application runs fine.
But we should not compile form or pll in Production server.
Searching in Metalink(Note:73506.1) , we find a solution that remote_dependency_mode if set to signature this problem may be resolved.
We tried that by chaning ' REMOTE_DEPENDENCIES_MODE=SIGNATURE' in Init.ora file in both Production and Development server.
But the error still persist.
I think the problem is regarding .pll.Because for the time being to test the application,I compiled the pll in Production and we didnot get any error while running the Application.
But whenever we are tring to deploy the compiled version of pll (compiling in Development sever) and to run the application in Production, we are facing the error.
Also, pll calls one standard database package in SYS.That standard package has VALID status both in Production and in Development.
We donot have priviledge to change/compile that package.So,we didnot change anything in that package. We didnot change anything in .pll also.
We are upgrading our forms from 6i to 9i.And now when we are trying to deploy it to Production we are facing ORA-04062 error.
Can anyone please help ?Exactly what procedure or package in SYS are you calling that causes this problem?
<p>Are both test and production databases at the same version?
<p>Do you know what procedure or package is named in the error? If not, then you need to improve your on-error trigger processing. I use a PLL_On_Error trigger to capture and improve a number of Oracle messages. It is posted here:
<p> Re: FRM-40735:Pre_Insert trigger raised unhandled exception ORA-20011
<p>Note especially the part near the end that deals with FRM-40735. (Not sure, but you may also want to display DBMS_ERROR_TEXT in your situation.)
<p>If that doesn't help find the actual problem, I would pull out my Re: Zdebug -- Download a Forms debugging message tool, and add messages before every call in the when-new-form-instance process to zero-in on the offending call.
<p>If it really IS a call to a system process, I would then experiment with creating a server-side package or stored procedure that calls the process, and then call that stored procedure from my form. That way, you effectively insulate your form from system differences. -
FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-
Hi,
In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
ORA-01403: no data found
FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
This error is not happening when we search for the SYSADMIN user....
Any idea why this error happening...
Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined Exception
Thanks
Joseph
Edited by: 783717 on Sep 27, 2010 10:49 PMHi,
In R12 When trying to search existing users through Sysadmin or any other user ...we are getting the below errror...
ORA-01403: no data found
FRM-40735: WHEN-NEW-RECORD-INSTANCE trigger raised unhandled exception ORA-06510
This error is not happening when we search for the SYSADMIN user....
Any idea why this error happening...What changes have been done recently?
Please run AutoConfig and make sure it completes successfully.
Also another error which is faced by users other than SYSADMIN is the below one when changing the responsability...
APP-FND-01926---The custom event WHEN-RESPONSIBILITY-CHANGED raised unhandled exception:User Defined ExceptionCan you find any errors in the database log file?
Please compile CUSTOM.pll (and other files) as per these docs and try again (as you are on R12 use frmcmp_batch.sh instead of f60gen).
APP-FND-01926, ORA-06508 [ID 797242.1]
APP-FND-01926: The custom event WHEN-LOGON-CHANGED raised unhandled exception: ORA-06508: PL/SQL: [ID 831159.1]
APP-FND-01926 when logon changed ORA-06508 [ID 334295.1]
Thanks,
Hussein
Maybe you are looking for
-
How do I create an association in Folder Options?
How do I create an association in Folder Options? I tried to start using the free version of Photoshop to organize pictures and (hopefully) set up the screen saver to view a group of pictures instead of them being randomly selected as Windows XP does
-
On my XP laptop, using IE6 with standard security settings (javascript enabled), flashplayer 9, swfobject.js with the index.html, http://cafeplenum.dk doesn't load all the way... I have no problem viewing other websites that needs flashplayer 9, and
-
How do I transfer work done in trial version to the paid version?
How do I transfer a project from Trial version to the paid version?
-
How to download a canadian app on an australian itunes account.
I am an australian currently living in Canada. I would like to download the Nike Fitness app which is not currently available on my Australian itunes account. I understand I need to contact the developers to make it available in Australia, however I
-
my phone just randomly got the voice over back on and wont let me scroll up and down and wont shut off voice over---tried shutting down and back on but didnt help---------------help!!!!!!!!!!!