Home » Developer & Programmer » Forms » FRM-40735:when-button-pressed trigger raised unhandled exception ORA-06502 (oracle forms 11g,windows 7 32bit)
FRM-40735:when-button-pressed trigger raised unhandled exception ORA-06502 [message #603481] |
Mon, 16 December 2013 23:16 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.gravatar.com/avatar/1f966b1deed4b27479a619fdd5e391b8?s=64&d=mm&r=g) |
s1984
Messages: 5 Registered: May 2012 Location: chennai
|
Junior Member |
|
|
hi all
i am using forms 11g release2 i am having a problem
when i use the following stored procedure in form then i am getting this
error.
FRM-40735:when-button-pressed trigger raised unhandled exception ORA-06502
When-button-Trigger is having below code.
DECLARE
PARAM_ID PARAMLIST ;
QUERY_OK NUMBER (5) ;
REPID REPORT_OBJECT ;
V_REP VARCHAR2(100) ;
REP_STATUS VARCHAR2(20) ;
BEGIN
message('1'); pause;
PARAM_ID := GET_PARAMETER_LIST ('PARAM1') ;
IF NOT (ID_NULL (PARAM_ID)) THEN
DESTROY_PARAMETER_LIST (PARAM_ID) ;
END IF ;
message('2'); pause;
PARAM_ID := CREATE_PARAMETER_LIST ('PARAM1') ;
IF ID_NULL (PARAM_ID) THEN
message('3'); pause;
Message ('Error while creating parameter list LINE') ;
RAISE FORM_TRIGGER_FAILURE ;
END IF ;
IF :M_TILL_DATE IS NULL THEN
message('4'); pause;
Change_Alert('Please Enter the Valid Date...');
GO_ITEM('CTRL.M_FROM_DATE');
RAISE FORM_TRIGGER_FAILURE ;
END IF ;
BUILD_QUERY;
------------------------------------------------------------------------------------------------
:ctrl.USER_ID := :global.M_USER_ID ;
:ctrl.M_SCOPE_DESC := SCOPE_LABEL_FROM_ID (:ctrl.M_SCOPE_ID) ;
ADD_PARAMETER (PARAM_ID , 'paramform' , TEXT_PARAMETER , 'NO') ;
ADD_PARAMETER (PARAM_ID , 'DESTYPE' , TEXT_PARAMETER , :ctrl.DESTYPE) ;
ADD_PARAMETER (PARAM_ID , 'ORIENTATION' , TEXT_PARAMETER , 'LANDSCAPE') ;
ADD_PARAMETER (PARAM_ID , 'P_REP_ID' , TEXT_PARAMETER , :ctrl.M_REP_ID) ;
ADD_PARAMETER (PARAM_ID , 'P_USER_ID' , TEXT_PARAMETER , :ctrl.USER_ID) ;
ADD_PARAMETER (PARAM_ID , 'P_LINE_ID' , TEXT_PARAMETER , :ctrl.M_LINE_ID) ;
IF :GLOBAL.PL_USER_ID='DUBAL' THEN
message('5'); pause;
ADD_PARAMETER (PARAM_ID , 'P_SCOPE_ID' , TEXT_PARAMETER , ' ') ;
ELSE
ADD_PARAMETER (PARAM_ID , 'P_SCOPE_ID' , TEXT_PARAMETER , :ctrl.M_SCOPE_ID) ;
END IF;
message('6'); pause;
ADD_PARAMETER (PARAM_ID , 'P_SCOPE_DESC' , TEXT_PARAMETER , :ctrl.M_SCOPE_DESC) ;
ADD_PARAMETER (PARAM_ID , 'P_FROM_POT' , TEXT_PARAMETER , :ctrl.M_FROM_POT) ;
ADD_PARAMETER (PARAM_ID , 'P_TO_POT' , TEXT_PARAMETER , :ctrl.M_TO_POT) ;
ADD_PARAMETER (PARAM_ID , 'P_PURITY' , TEXT_PARAMETER , :ctrl.M_PURITY) ;
ADD_PARAMETER (PARAM_ID , 'P_OPTION' , TEXT_PARAMETER , :ctrl.M_OPTION) ;
ADD_PARAMETER (PARAM_ID , 'P_OPTION_DESC' , TEXT_PARAMETER , :ctrl.M_OPTION_DESC) ;
ADD_PARAMETER (PARAM_ID , 'P_P69' , TEXT_PARAMETER , :ctrl.M_CONST_TYPE1) ;
ADD_PARAMETER (PARAM_ID , 'P_PPF' , TEXT_PARAMETER , :ctrl.M_CONST_TYPE2) ;
ADD_PARAMETER (PARAM_ID , 'P_CD200' , TEXT_PARAMETER , :ctrl.M_CONST_TYPE3) ;
ADD_PARAMETER (PARAM_ID , 'P_CD26' , TEXT_PARAMETER , :ctrl.M_CONST_TYPE4) ;
ADD_PARAMETER (PARAM_ID , 'P_PERIOD' , TEXT_PARAMETER , :ctrl.RG_PERIOD) ;
ADD_PARAMETER (PARAM_ID , 'P_REPORT_STATUS' , TEXT_PARAMETER , :ctrl.REPORT_STATUS) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY1' , TEXT_PARAMETER , :ctrl.M_QUERY1) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY2' , TEXT_PARAMETER , :ctrl.M_QUERY2) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY3' , TEXT_PARAMETER , :ctrl.M_QUERY3) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY4' , TEXT_PARAMETER , :ctrl.M_QUERY4) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY5' , TEXT_PARAMETER , :ctrl.M_QUERY5) ;
ADD_PARAMETER (PARAM_ID , 'P_QUERY6' , TEXT_PARAMETER , :ctrl.M_QUERY6) ;
ADD_PARAMETER (PARAM_ID , 'P_SCALE_MAX' , TEXT_PARAMETER , :ctrl.M_SCALE_MAX) ;
ADD_PARAMETER (PARAM_ID , 'P_SCALE_MIN' , TEXT_PARAMETER , :ctrl.M_SCALE_MIN) ;
ADD_PARAMETER (PARAM_ID , 'P_AVG_LCL' , TEXT_PARAMETER , :ctrl.M_AVG_LCL_CC) ;
ADD_PARAMETER (PARAM_ID , 'P_AVG_UCL' , TEXT_PARAMETER , :ctrl.M_AVG_UCL_CC) ;
ADD_PARAMETER (PARAM_ID , 'P_AVG_MAX_CC' , TEXT_PARAMETER , :ctrl.M_AVG_MAX_CC) ;
ADD_PARAMETER (PARAM_ID , 'P_AVG_MIN_CC' , TEXT_PARAMETER , :ctrl.M_AVG_MIN_CC) ;
ADD_PARAMETER (PARAM_ID , 'P_FROM_DATE' , TEXT_PARAMETER , :ctrl.REPORT_FROM_DATE) ;
ADD_PARAMETER (PARAM_ID , 'P_FORMAT_MASK' , TEXT_PARAMETER , :ctrl.M_Format_Mask) ;
ADD_PARAMETER (PARAM_ID , 'P_TILL_DATE' , TEXT_PARAMETER , :ctrl.REPORT_TILL_DATE) ;
message('7'); pause;
IF :RG_PERIOD='M' THEN
ADD_PARAMETER (PARAM_ID , 'P_TILL_MNNO' , TEXT_PARAMETER , :ctrl.M_TILL_DATE);
END IF;
message('8'||V_REP); pause;
REPID := FIND_REPORT_OBJECT('RRI002') ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_FILENAME,'RRI002') ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_EXECUTION_MODE,RUNTIME) ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_COMM_MODE,SYNCHRONOUS) ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_DESFORMAT,'PDF') ;
SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_SERVER,:GLOBAL.REPORTSERVER) ;
V_REP := RUN_REPORT_OBJECT(REPID,PARAM_ID) ;
MESSAGE('1'||V_REP);PAUSE;
REP_STATUS := REPORT_OBJECT_STATUS(V_REP) ;
WHILE REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
REP_STATUS := REPORT_OBJECT_STATUS(V_REP) ;
END LOOP ;
IF REP_STATUS = 'FINISHED' THEN
message('10'); pause;
WEB.SHOW_DOCUMENT('http://'||:GLOBAL.HOST||':'||:GLOBAL.PORT||'/reports/rwservlet/getjobid'|| substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||:GLOBAL.REPORTSERVER, '_blank') ;
ELSE
MESSAGE ('Error Running Report ...') ;
MESSAGE ('Error Running Report ...') ;
END IF ;
message('11'); pause;
------------------------------------------------------------------------------------------------
DESTROY_PARAMETER_LIST (PARAM_ID) ;
--RPMS_REP_ACCESS_LOG_PR ('RRIssue_EMAL' , :global.M_USER_ID , SYSDATE , ' ' , ' ' , NULL , NULL , NULL , NULL , 'Run Report' , 'Printer') ;
-- end if;
END ;
|
|
|
Re: FRM-40735:when-button-pressed trigger raised unhandled exception ORA-06502 [message #603493 is a reply to message #603481] |
Tue, 17 December 2013 00:14 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/72104.gif) |
Littlefoot
Messages: 21818 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
Oracle
ORA-06502: PL/SQL: numeric or value errorstring
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
I believe it is quite straightforward.
As of terminology you use: code you posted is not a stored procedure; these are stored within the database - your code belongs to a certain form trigger or a procedure, but these aren't "stored".
As of programming technique you use: MESSAGE is more or less the only way if you want to debug forms developed in old Forms versions (6i and lower). Modern Forms offers debugging so I'd suggest you use it. It provides step-by-step code execution, you can watch variables (your own and system ones), block items ... a lot of useful information. Forget about MESSAGE; use debugger.
|
|
|
Goto Forum:
Current Time: Fri Aug 23 19:34:46 CDT 2024
|