REP-1401: 'no_daysformula':Fatal PL/SQL error occured. ora-06503: PL/SQL : Functio returned without value. REP-0619: You cannot run without a layout.
Hi everyone.
Can anyone tell me what is wrong in this code below?
Code:
function NO_DAYSFormula return Number is
begin
IF TO_CHAR(TO_DATE(:P_FR_DT, 'DD-MM-RRRR'), 'RRRR') =TO_CHAR(TO_DATE(:ACCT_OPN_DT, 'DD-MM-RRRR'), 'RRRR')
AND :P_TO_DT<:MATURITY_DATE
AND :ACCT_OPN_DT>:P_FR_DT
THEN RETURN (:P_TO_DT-:ACCT_OPN_DT+1);
ELSIF TO_CHAR(TO_DATE(:P_FR_DT, 'DD-MM-RRRR'), 'RRRR') =TO_CHAR(TO_DATE(:ACCT_OPN_DT, 'DD-MM-RRRR'), 'RRRR')
AND :P_TO_DT<:MATURITY_DATE
AND :ACCT_OPN_DT<:P_FR_DT
THEN RETURN (:P_FR_DT-:P_TO_DT+1);
ELSIF TO_CHAR(TO_DATE(:P_FR_DT, 'DD-MM-RRRR'), 'RRRR') =TO_CHAR(TO_DATE(:ACCT_OPN_DT, 'DD-MM-RRRR'), 'RRRR')
AND :P_TO_DT>:MATURITY_DATE
AND :ACCT_OPN_DT<:P_FR_DT
THEN RETURN (:P_FR_DT-:MATURITY_DATE+1);
END IF;
END;
It gets compiled successfully but when i run the report, i get 2 errors.
Error 1:
REP-1401: 'no_daysformula':Fatal PL/SQL error occurred.
ora-06503: PL/SQL : Function returned without value.
Error 2:
REP-0619: You cannot run without a layout.
Should i use only 1 return statement?
Can i use as many return statements as i want?
What is the exact mistake? Please let me know.
Thank You.
Let me clear you the first thing...
If you get any fatal errors while running the report (e.g., function returned without value,no value etc.,) the report will show
REP-0619: You cannot run without a layout.
So you just correct the function 'no_daysformula' .
First of all you run the report without that formula column.
If it works fine then , Check the return value of your formula column (Your formula column properties --> Return value --> value (It will be DATE as i think so).
As function will always return a single value, Check your formula 'no_daysformula' returns the same.
declare a return variable say for example..
DECLARE
V_DATE DATE;
BEGIN
--YOUR CODE---
RETURN V_DATE := (RETURN VALUE)
END;
Last but not least ... use Else condition to return (NULL or any value ) in your code and check..
If any Problem persists let me know
Regards,
Soofi.
Similar Messages
-
hi,
my report is giving error REP-1401:'cf_1formula': Fatal PL/SQL error occured,
ORA-01403: no data found
There are two table emp1 and emp2 created from employees table from HR schema
I have deleted some records from table emp2 where department id is 110
main query is
select employee_id, first_name, department_id from emp1
now i created a foumula column
function CF_1Formula return Number is
dept number;
begin
select department_id into dept from emp2 where employee_id = :employee_id;
return(dept);
end;
the above error is given when report is run. i tried
exception
when_no_data_found then
dept:=000
but problem is not solved
i want to disply any number in this foumula column if the record is not foundM. Khurram Khurshid wrote:
exception
when_no_data_found then
dept:=000try this code in formula
function CF_1Formula return Number is
dept number;
begin
select department_id into dept from emp2 where employee_id = :employee_id;
if dept is not null then
return(dept);
else
return 0;
end if;
end; Hope this will help you...
If someone response is helpful or correct please, mark is accordingly. -
REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error
Hi,
I am getting following error in reports 6i
REP-1401 Fatal PL/SQL error occur ORA-06502 numeric or value error.
I have added a formula column based on other formula column
function CF_1FORMULA0005 return varchar2 is
CF_CREDIT varchar2(38);
begin
:CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR;
RETURN (:CF_CREDIT);
end;
Oracle Standard formula coulmn:
function D_CARRY_F_DRFormula return VARCHAR2 is
l_dr VARCHAR2(38);
l_dr_disp VARCHAR2(38);
begin
SRW.REFERENCE(:C_FUNC_CURRENCY);
SRW.REFERENCE(:C_CARRY_F_DR);
if (:C_CARRY_F_DR = 0) THEN
ax_globe_package.g_dr_cf := TRUE;
--l_dr:= '0.00';
l_dr_disp := '0.00';
l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,l_dr_disp,38);
else
-- return(ax_currency_pkg.display_char(:C_FUNC_CURRENCY,:C_CARRY_F_DR,ax_page_pkg.f_maxlength));
-- Bug2239881. Setting the carried forward totals.
IF (:P_GLOBAL_ATTR_CAT = 'JE.GR.GLXSTBKS.BOOKS' AND ax_globe_package.g_dr_cf = FALSE) THEN
ax_globe_package.g_dr_cf := TRUE;
ax_globe_package.g_dr_total := :C_CARRY_F_DR;
END IF;
srw.message(999,'G_DR_TOTAL = ' || ax_globe_package.g_dr_total );
l_dr := ax_currency_pkg.display_char(:C_FUNC_CURRENCY,to_char(ax_globe_package.g_dr_total),38);
/*select to_number(l_dr, '999G999G999G999G990D00')
into l_dr_disp
from dual;
end if;
srw.message(999,'l_dr = ' || l_dr );
return l_dr;
--return ltrim(to_char(l_dr_disp,'999G999G999G999G990D00','nls_numeric_characters=,.'));
end;
both formula column return types are character.Please help me ASAP.
Thanks,
sriharsha.Hi,
First of all: when you should use concatenation operator (||) instead of plus sign when working with strings. So, instead of
:CF_CREDIT:= :D_CARRY_F_CR+:D_HD_SUM_REP_CR; you should use
:CF_CREDIT:= :D_CARRY_F_CR||:D_HD_SUM_REP_CR; If :D_CARRY_F_CR and :D_HD_SUM_REP_CR are both numbers then consider to use to_char function before you assign value to :CF_CREDIT.
I wonder, why your CF's returns varchar's if they operates on numbers?
regards
kikolus
Edited by: kikolus on 2012-11-30 08:03 -
REP-1401 'TPSCFORMULA:' Fatal PL/SQL Error Occured
Dear Friends
In the report form I had given the following code after compale
function tpscFormula return Number is
begin
return(nvl(:pftotcost,0)/nvl(:SumPFIQTYPerPFINO,1)*:PFIPFIDIFF);
end;
REP-1401 'TPSCFORMULA:' Fatal PL/SQL Error Occured
REP-1609: you cannot run without a layout
Can anyone help to resolve this error.
sandyHi,
how about trying like this...
function tpscFormula return Number is
begin
return (nvl(:pftotcost,0)/(nvl(:SumPFIQTYPerPFINO,1)*NVL(:PFIPFIDIFF,0)));
exception
when others then
return 0;
end;It will return 0 in case of any error in the code you used. So, you can check either it is zero_divided or something else...
-Ammad -
Rep-1401: 'beforereport': Fatal PL/SQL error occured
Hi all
I am working in Oracle reports 6i.
in my report i hav two program units.
iam calling them in before report trigger. Then iam getting the following error
rep-1401: 'beforereport': Fatal PL/SQL error occured
ORA-03120: two-task conversion routin: integer overflow
and if i call any one of them they are working fine.
whenever i call two of them at a time iam getting above error.
can anybody help me.....in the before report trigger check the code where u r assigning value to a variable...like fetching cursor into some variable......or assigning to any variable and there the variable must be smaller than the value being assigned to it....
-
While running the livecache server test a native sql error occures
We are using scm4.1 livecache 7.5.0 And every time we are running the livecache test program he is dumping
whith the following dump
patch level scm & scm_basis is 8
Runtime Errors DBIF_DSQL2_SQL_ERROR
Except. CX_SY_NATIVE_SQL_ERROR
Date and Time 31.10.2005 16:50:55
ShrtText
An SQL error occurred when executing Native SQL.
What happened?
Error 600 occurred in the current database connection "LCA".
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
is especially useful if you want to keep a particular message.
How to correct the error
Database error text........: "Work rolled back: DbpError -28814 in
APS_ORDER_CH"
Database error code .......: 600
Triggering SQL statement...: " ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? or'"
Internal call code.........: "[DBDS/NEW DSQL]"
Please check the entries in the system log (Transaction SM21).
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"DBIF_DSQL2_SQL_ERROR" CX_SY_NATIVE_SQL_ERRORC
"/SAPAPO/SAPLOM_PLANNING" or "/SAPAPO/LOM_PLANNINGU08"
"/SAPAPO/OM_ORDER_CHANGE"
If you cannot solve the problem yourself and you wish to send
an error message to SAP, include the following documents:
1. A printout of the problem description (short dump)
To obtain this, select in the current display "System->List->
Save->Local File (unconverted)".
2. A suitable printout of the system log
To obtain this, call the system log through transaction SM21.
Limit the time interval to 10 minutes before and 5 minutes
after the short dump. In the display, then select the function
"System->List->Save->Local File (unconverted)".
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, select the Editor function "Further Utilities->
Upload/Download->Download".
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.
The exception must either be prevented, caught within the procedure
"/SAPAPO/OM_ORDER_CHANGE"
"(FUNCTION)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
System environment
SAP Release.............. "640"
Application server....... "bebruap2"
Network address.......... "195.213.49.227"
Operating system......... "Windows NT"
Release.................. "5.2"
Hardware type............ "4x Intel 801586"
Character length......... 16 Bits
Pointer length........... 32 Bits
Work process number...... 1
Short dump setting....... "full"
Database server.......... "BEBRUAP2"
Database type............ "MSSQL"
Database name............ "APD"
Database owner........... "apd"
Character set............ "C"
SAP kernel............... "640"
Created on............... "Aug 23 2005 00:00:49"
Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
Database version......... "SQL_Server_8.00 "
Patch level.............. "87"
Patch text............... " "
Supported environment....
Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
SAP database version..... "640"
Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
Memory usage.............
Roll..................... 8176
EM....................... 24040336
Heap..................... 0
Page..................... 1687552
MM Used.................. 1516920
MM Free.................. 572032
SAP Release.............. "640"
User and Transaction
Client.............. 000
User................ "CGRAULS"
Language key........ "E"
Transaction......... "/SAPAPO/OM03 "
Program............. "/SAPAPO/SAPLOM_PLANNING"
Screen.............. "SAPMSSY0 1000"
Screen line......... 6
Information on where terminated
The termination occurred in the ABAP program "/SAPAPO/SAPLOM_PLANNING" in
"/SAPAPO/OM_ORDER_CHANGE".
The main program was "/SAPAPO/OM_TB_FLOW_QUANTITY ".
The termination occurred in line 91 of the source code of the (Include)
program "/SAPAPO/LOM_PLANNINGU08"
of the source code of program "/SAPAPO/LOM_PLANNINGU08" (when calling the
editor 910).
Processing was terminated because the exception "CX_SY_NATIVE_SQL_ERROR"
occurred in the
procedure "/SAPAPO/OM_ORDER_CHANGE" "(FUNCTION)" but was not handled locally,
not declared in the
RAISING clause of the procedure.
The procedure is in the program "/SAPAPO/SAPLOM_PLANNING ". Its source code
starts in line 5
of the (Include) program "/SAPAPO/LOM_PLANNING$08 ".
Source Code Extract
Line
SourceCde
61
is_gen_params-simversion
62
is_gen_params-dont_set_netchg_flag
63
space.
64
65
Kontrollstruktur IS_GET_CHANGED_OPTIONS anpassen.
66
IF NOT et_changed_orders IS REQUESTED.
67
is_get_changed_options-send_chg_top_order = gc_false.
68
ENDIF.
69
IF NOT et_changed_cap_reqs IS REQUESTED.
70
is_get_changed_options-send_chg_cap_req = gc_false.
71
ENDIF.
72
IF NOT et_changed_io_nodes IS REQUESTED.
73
is_get_changed_options-send_chg_ionode = gc_false.
74
ENDIF.
75
IF NOT et_changed_io_pp_nodes IS REQUESTED.
76
is_get_changed_options-send_chg_io_pp = gc_false.
77
ENDIF.
78
IF NOT et_changed_pegids IS REQUESTED.
79
is_get_changed_options-send_chg_pegid = gc_false.
80
ENDIF.
81
IF NOT et_deleted_fix_pegging IS REQUESTED.
82
is_get_changed_options-send_del_fix_peg = gc_false.
83
ENDIF.
84
start_function 'OM_ORDER_CHANGE'. "#EC *
85
Verbindung zum liveCache aufbauen
86
check_server.
87
connect_to_livecache.
88
COM-Routine zum Anlegen bzw. Überschreiben eines Zeitstrahls
89
90
EXEC sql.
>>>>>
execute procedure "APS_ORDER_CHANGE" (
92
in :ls_gen_com_params,
93
out :lv_rc,
94
in :et_rc,
95
in :it_order_method,
96
in :it_ordkeys,
97
in :it_ordmaps,
98
in :it_orders,
99
in :it_activities,
100
in :it_mode,
101
in :it_cap_reqs,
102
in :it_positions,
103
in :it_inputs,
104
in :it_outputs,
105
in :it_prodflow,
106
in :it_intern_constraints,
107
in :it_extern_constraints,
108
in :it_charact_val_acts,
109
in :it_charact_req_inpnode,
110
in :it_charact_val_outnode,
Contents of system fields
Name
Val.
SY-SUBRC
0
SY-INDEX
0
SY-TABIX
1
SY-DBCNT
1
SY-FDPOS
0
SY-LSIND
0
SY-PAGNO
0
SY-LINNO
1
SY-COLNO
1
SY-PFKEY
SY-UCOMM
SY-TITLE
Flow Quantity Test
SY-MSGTY
S
SY-MSGID
/SAPAPO/OM_TEST
SY-MSGNO
001
SY-MSGV1
Create transSim
SY-MSGV2
SY-MSGV3
SY-MSGV4
Active Calls/Events
No. Ty. Program Include Line
Name
3 FUNCTION /SAPAPO/SAPLOM_PLANNING /SAPAPO/LOM_PLANNINGU08 91
/SAPAPO/OM_ORDER_CHANGE
2 FORM /SAPAPO/OM_TB_FLOW_QUANTITY /SAPAPO/OM_TB_FLOW_QUANTITY 802
CHANGE_DATA
1 EVENT /SAPAPO/OM_TB_FLOW_QUANTITY /SAPAPO/OM_TB_FLOW_QUANTITY 11
START-OF-SELECTION
Chosen variables
Name
Val.
No. 3 Ty. FUNCTION
Name /SAPAPO/OM_ORDER_CHANGE
IS_ATP_INFO
01ATP0000001~CGRAULSXX##
334553333333744545455500
011400000001E37215C38800
000000000000000000000000
000000000000000000000000
IS_CONTROLPARAMETERS
霁က#ం̂⍱㔒鲔#####
2222222222222222222222001007190000022
0000000000000000000000100221240000100
0000000000000000000000910002390000000
0000000000000000000000700C335C000C000
IS_GEN_PARAMS
01PLV0000001~CGRAULS
3354533333337445454522222
010C60000001E37215C300000
0000000000000000000000000
0000000000000000000000000
IS_GET_CHANGED_OPTIONS
2222222
0000000
0000000
0000000
IT_ACTIVITIES
Table IT_274[1x256]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ACTIVITIES
Table reference: 41
TABH+ 0(20) = 5087FFDF00000000000000002900000012010000
TABH+ 20(20) = 0100000000010000FFFFFFFF0487000000290000
TABH+ 40( 8) = 10000000C1308000
store = 0x5087FFDF
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 41 (0x29000000)
label = 274 (0x12010000)
fill = 1 (0x01000000)
leng = 256 (0x00010000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000205
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x180112E0
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
store_id = 126 (0x7E000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_CAP_REQS
Table IT_276[1x112]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_CAP_REQS
Table reference: 39
TABH+ 0(20) = 48BB06E000000000000000002700000014010000
TABH+ 20(20) = 0100000070000000FFFFFFFF04870000C0290000
TABH+ 40( 8) = 10000000C1308000
store = 0x48BB06E0
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 39 (0x27000000)
label = 276 (0x14010000)
fill = 1 (0x01000000)
leng = 112 (0x70000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000209
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x188D04E0
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
store_id = 124 (0x7C000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_CHARACT_REQ_INPNODE
Table IT_418[0x140]
FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_REQ_INPNODE
Table reference: 32
TABH+ 0(20) = 00000000000000000000000020000000A2010000
TABH+ 20(20) = 000000008C000000FFFFFFFF04870000301D0000
TABH+ 40( 8) = 10000000C1308000
store = 0x00000000
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 32 (0x20000000)
label = 418 (0xA2010000)
fill = 0 (0x00000000)
leng = 140 (0x8C000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000142
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_CHARACT_VAL_ACTS
Table IT_417[0x156]
FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_VAL_ACTS
Table reference: 50
TABH+ 0(20) = 00000000000000000000000032000000A1010000
TABH+ 20(20) = 000000009C000000FFFFFFFF04870000901D0000
TABH+ 40( 8) = 10000000C1308000
store = 0x00000000
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 50 (0x32000000)
label = 417 (0xA1010000)
fill = 0 (0x00000000)
leng = 156 (0x9C000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000144
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_CHARACT_VAL_OUTNODE
Table IT_419[0x156]
FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_VAL_OUTNODE
Table reference: 60
TABH+ 0(20) = 0000000000000000000000003C000000A3010000
TABH+ 20(20) = 000000009C000000FFFFFFFF04870000901D0000
TABH+ 40( 8) = 10000000C1308000
store = 0x00000000
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 60 (0x3C000000)
label = 419 (0xA3010000)
fill = 0 (0x00000000)
leng = 156 (0x9C000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000144
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_EXTERN_CONSTRAINTS
Table IT_416[0x124]
FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_EXTERN_CONSTRAINTS
Table reference: 71
TABH+ 0(20) = 00000000000000000000000047000000A0010000
TABH+ 20(20) = 000000007C000000FFFFFFFF04870000E02A0000
TABH+ 40( 8) = 10000000C1308000
store = 0x00000000
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 71 (0x47000000)
label = 416 (0xA0010000)
fill = 0 (0x00000000)
leng = 124 (0x7C000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000215
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_INPUTS
Table IT_278[1x420]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_INPUTS
Table reference: 63
TABH+ 0(20) = 087400E0C0E303E0000000003F00000016010000
TABH+ 20(20) = 01000000A4010000FFFFFFFF04870000202A0000
TABH+ 40( 8) = 10000000C1308000
store = 0x087400E0
ext1 = 0xC0E303E0
shmId = 0 (0x00000000)
id = 63 (0x3F000000)
label = 278 (0x16010000)
fill = 1 (0x01000000)
leng = 420 (0xA4010000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000211
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x78DC11E0
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
store_id = 123 (0x7B000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = 0x2029FFDF
hsdir = 0x00000000
ext2 = 0x00000000
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_INTERN_CONSTRAINTS
Table IT_415[0x124]
FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_INTERN_CONSTRAINTS
Table reference: 49
TABH+ 0(20) = 000000000000000000000000310000009F010000
TABH+ 20(20) = 000000007C000000FFFFFFFF04870000E02A0000
TABH+ 40( 8) = 10000000C1308000
store = 0x00000000
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 49 (0x31000000)
label = 415 (0x9F010000)
fill = 0 (0x00000000)
leng = 124 (0x7C000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000215
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = Not allocated
pghook = Not allocated
idxPtr = Not allocated
refCount = Not allocated
tstRefCount = Not allocated
lineAdmin = Not allocated
lineAlloc = Not allocated
store_id = Not allocated
shmIsReadOnly = Not allocated
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_MODE
Table IT_275[1x164]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_MODES
Table reference: 52
TABH+ 0(20) = A03C00E000000000000000003400000013010000
TABH+ 20(20) = 01000000A4000000FFFFFFFF0487000060290000
TABH+ 40( 8) = 10000000C1308000
store = 0xA03C00E0
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 52 (0x34000000)
label = 275 (0x13010000)
fill = 1 (0x01000000)
leng = 164 (0xA4000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000207
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0xC8F611E0
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
store_id = 125 (0x7D000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_ORDERS
Table IT_293[1x320]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDERS1
Table reference: 47
TABH+ 0(20) = 20B403E000000000000000002F00000025010000
TABH+ 20(20) = 0100000040010000FFFFFFFF0400000030380000
TABH+ 40( 8) = 01000000C1308000
store = 0x20B403E0
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 47 (0x2F000000)
label = 293 (0x25010000)
fill = 1 (0x01000000)
leng = 320 (0x40010000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000286
occu = 1 (0x01000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x9080FFDF
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 1 (0x01000000)
lineAlloc = 1 (0x01000000)
store_id = 130 (0x82000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_ORDER_METHOD
Table IT_268[2x62]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDER_METHOD
Table reference: 51
TABH+ 0(20) = 8882FFDF0000000000000000330000000C010000
TABH+ 20(20) = 020000003E000000FFFFFFFF04000000B0360000
TABH+ 40( 8) = 10000000C1248000
store = 0x8882FFDF
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 51 (0x33000000)
label = 268 (0x0C010000)
fill = 2 (0x02000000)
leng = 62 (0x3E000000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000278
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 2 (cmpSingleMcmpR)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0
isShmLockId = 0
gcKind = 0
isUsed = 1
>>>>> Shareable Table Header Data <<<<<
tabi = 0x0868FFDF
pghook = 0x00000000
idxPtr = 0x00000000
refCount = 0 (0x00000000)
tstRefCount = 0 (0x00000000)
lineAdmin = 16 (0x10000000)
lineAlloc = 16 (0x10000000)
store_id = 122 (0x7A000000)
shmIsReadOnly = 0 (0x00000000)
>>>>> 1st level extension part <<<<<
regHook = Not allocated
hsdir = Not allocated
ext2 = Not allocated
>>>>> 2nd level extension part <<<<<
tabhBack = Not allocated
delta_head = Not allocated
pb_func = Not allocated
pb_handle = Not allocated
IT_ORDKEYS
Table IT_271[1x332]
PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDKEYS
Table reference: 29
TABH+ 0(20) = 80E303E000000000000000001D0000000F010000
TABH+ 20(20) = 010000004C010000FFFFFFFF04870000E0270000
TABH+ 40( 8) = 10000000C1308000
store = 0x80E303E0
ext1 = 0x00000000
shmId = 0 (0x00000000)
id = 29 (0x1D000000)
label = 271 (0x0F010000)
fill = 1 (0x01000000)
leng = 332 (0x4C010000)
loop = -1 (0xFFFFFFFF)
xtyp = TYPE#000199
occu = 16 (0x10000000)
access = 1 (ItAccessStandard)
idxKind = 0 (ItIndexNone)
uniKind = 2 (ItUniqueNon)
keyKind = 1 (default)
cmpMode = 8 (cmpManyEq)
occu0 = 1
collHash = 0
groupCntl = 0
rfc = 0
unShareable = 0
mightBeShared = 0
sharedWithShmTab = 0Hi,
the error DbpError -28814 denotes that an object cannot be found.
Can you maybe tell me your exact liveCache version (incl. Build level) and LCA Build?
Additionally, please copy the relevant error information from the file (/sapdb/data/wrk/<SID>/)knldiag.err into this thread.
Which exact 'liveCache test program' are your referring to (which of the /SAPAPO/... transactions)?
Kind regards,
Roland -
Rep-1401: formula name : Fatal Pl/SQL error occured
Hi,
I am using report builder 6.0 and recently came across a error while running the report. Rep-1401:<formula name> : Fatal Pl/SQL error occured.
I created a formula column in the report. In that i have three local variable.
f_val number := 0;
s_val number := 0;
t_val number := 0;
t_val := f_val/s_val ; --> this gives the above fatal error.
t_val := (f_val + 1)/s_val; --> this gives the above fatal error
t_val := f_val/(s_val + 1); ---> no error
if i change the value of s_val
s_val := 1;
t_val := f_val/(s_val - 1) ; ----> this gives the above fatal error.
Can anyone help me to solve this problem or is it report builder bug.
Please help me, as i desperately need help.
ThanksThanks for ur reply.
I used nvl too, but the same error occurred.
For the information in my question I by mistake typed
t_val := (f_val + 1)/s_val; --> this gives the above fatal error.
but when the value of f_val = zero and s_val is zero why it gives fatal error when i divide, i used nvl on both the variable while dividing but still got the same error.
but if s_val is greater than zero then no error occurs.
please help me, I feel it is a bug. -
Rep-1401 : Fatal PL/SQL error occured
Hi,
I am using report builder 6.0 and recently came across a error while running the report. Rep-1401:<formula name> : Fatal Pl/SQL error occured.
I created a formula column in the report. In that i have three local variable.
f_val number := 0;
s_val number := 0;
t_val number := 0;
t_val := f_val/s_val ; --> this gives the above fatal error.
t_val := (f_val + 1)/s_val; --> this gives the above fatal error
t_val := f_val/(s_val + 1); ---> no error
if i change the value of s_val
s_val := 1;
t_val := f_val/(s_val - 1) ; ----> this gives the above fatal error.
Can anyone help me to solve this problem or is it report builder bug.
Please help me, as i desperately need help.
ThanksThe best way to handle this is to just add an exception handler that handles a zero divide.
EX:
function...blah
var3:=var/var2...
EXCEPTION
when zero_divide then
var3:= 0;Zero Divide is a built-in exception to handle cases just like this - so if you run into it, you can set it to whatever you want -
REP-1401 'beforereport' Fatal PL/SQL error occurred. ORA 00000 normal.
Hi,
I am running the report Journals - General (132 char)- file name GLRGNJ.rdf from
Oracle Report Builder 6.0.8.11.3.
I have commented all the (srw.user_exit) in the Before Report trigger but i still
get the message:
REP-1401 'beforereport' Fatal PL/SQL error occurred. ORA 00000 normal,
successful completion.
Can anyone suggest a solution please?
Thanks,
FarisDear sir, i am created one formula column in Reports6i and the following error has come. Could u please find out a solution. Thanks in advance.
my function is below
function CF_Branch_NameFormula return Char is
lc_branch_name varchar2(100);
begin
SELECT rtrim(substr(FVT.DESCRIPTION
,instr(FVT.DESCRIPTION,'-',1)+1
,100)) INTO lc_branch_name
FROM FND_FLEX_VALUES FFV, FND_FLEX_VALUES_TL FVT
WHERE FFV.flex_value_Set_id = 1007956
AND FFV.FLEX_VALUE_ID = FVT.FLEX_VALUE_ID
AND FFV.FLEX_VALUE = FVT.FLEX_VALUE_MEANING
AND FVT.DESCRIPTION <> 'xxx'
and rownum<=1
AND SUBSTR(FVT.FLEX_VALUE_MEANING,3,2) = :P_BRANCH;
return (lc_branch_name);
end; -
REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found
Hi guys,
I am getting error 'REP-1401: Fatal PL/SQL error occurred. ORA-01403: no data found ' when run the report
and i m also use formula column in my report.
can any body help me why it's coming.
following code is used in formula column plz check and verify:
function CF_3Formula return Char is
T1 VARCHAR2(100);
begin
SELECT
VAT_REG_NO INTO T1
FROM
JA_IN_HR_ORGANIZATION_UNITS JIHOU,
HR_LOCATIONS HL--,
--MTL_TXN_REQUEST_HEADERS MTLH
WHERE
JIHOU.ORGANIZATION_ID=HL.INVENTORY_ORGANIZATION_ID AND
JIHOU.LOCATION_ID=HL.LOCATION_ID AND
--Jihou.ORGANIZATION_ID = Mtlh.Organization_Id AND
-- Hl.INVENTORY_ORGANIZATION_ID =Mtlh.Organization_Id AND
-- MTLH.ATTRIBUTE10=SUBSTR(HL.LOCATION_CODE,1,3) AND
SUBSTR(HL.LOCATION_CODE,1,3)= :TO_ORG1 ;
RETURN (T1);
end;
plz help me out.Hi;
What is EBS version? Is it custom report or not?
See below which is mention similar errors
Autoinvoice Error: ORA-1403: no data found [ID 1209403.1]
APXIIMPT - Payable Open Interface Import Fails on "REP-1401: 'cf_source_nameformula': Fatal PL/SQL error occurred. ORA-01403: no data found" [ID 222058.1]
Regard
Helios -
Hi Team,
I am running one conc programme.
After running I am getting below error. I checked the issue on metalink and other, seems that it is an size related issue. I have increased the size of formula columns and placeholdder too.
But still getting issue.
My requirement is to get comma seperated values using SQL query itself. Neither i wanted to create layout of the report , since it is a XML publisher report and nor I am including it on RTF template.
I want the CF_10 formula column to be populated with comma seperated values.
MSG-00187: From Date 01-Sep-2014
REP-1401: 'cf_10formula': Fatal PL/SQL error occurred.
ORA-06502: PL/SQL: numeric or value error
And Here is my code for CF_10
function CF_10Formula return Number is
begin
SELECT NVL(TO_CHAR(sum(Amount),'99,99,99,999'),0) into :CP_5 --NVL(ROUND(sum(Amount)),0) into :CP_5
-- xxhw_Coll_cat(category) "Intercat Catg"
FROM hhxw_Region_col_v
WHERE Category IN ('Intercompany - CATV')
AND trunc(gl_date) BETWEEN TO_DATE(:P_FROM_DATE, 'DD/MM/RRRR') AND TO_DATE(:P_TO_DATE, 'DD/MM/RRRR');
RETURN ROUND(:CP_5);
end;
Anyone please suggest me.
Regards,
SachinHi,
1)Why are you selecting the value into a report item? Select into a local variable and return that
RETURN :CP_5 --> This one!!
2)And you should avoid applying functions to DB columns in where clauses wherever possible, so oracle can use indexes on them if applicable:
AND gl_date >= To_date(:P_FROM_DATE, 'DD/MM/RRRR')
AND gl_date < To_date( :P_TO_DATE, 'DD/MM/RRRR') + 1;
I think you are taking 2 column in the Layout CF_10 and CP_5 right? if so, then use below Query.
FUNCTION cf_10formula
RETURN NUMBER
IS
v_amount NUMBER:null;
IS
BEGIN
BEGIN
SELECT nvl(round(SUM(amount)), 0)
INTO v_amount --> Retruns the value for CF_10 column
FROM hhxw_region_col_v
WHERE category IN ( 'Intercompany - CATV' )
AND gl_date >= to_date(:P_FROM_DATE, 'DD/MM/RRRR')
AND gl_date < to_date( :P_TO_DATE, 'DD/MM/RRRR') + 1;
:CP_5 := nvl(trunc(v_amount),0); --> Retruns the value for CP_5 column
EXCEPTION
WHEN OTHERS THEN
v_amount := 0;
srw.message(1003,'Error in Getting :' ||p_from_date);
END;
END;
And
If you've got a number function returning into a number field then all you should need to do to make the comma appear is to change the number format mask in field.
From 40000 to 40,000 -
See this error in report REP-1401: cf_1formula: Fatal PL/SQL errir occurred
hi mater
sir i use oracel reprot 6i
i try to use formula for calculation see
function avggFormula return Number is begin
:cp_1 := (:bugamt-nvl(:totexp,0)/:bugamt)*100 ;
return(:cp_1);
end;
this formula complie rightly no error
but when i run my report
that give me this error
REP-1401: 'cf_1formula': Fatal PL/SQL errir occurred.
ORA-01476: divisor is equal to zero
please give me idea how i solve my this error
thank;
aamirHi Aamir,
The problem is that divisor by 0 (zero) is not possible.
So you need to make sure that in your calculation there's no division by zero.
In your case :bugamt is equal to zero then you will get this error.
So just make sure that :bugamt is not equal to zero.
You can do this as follows:
function avggFormula return Number is begin
IF :bugamt != 0 THEN
:cp_1 := (:bugamt-nvl(:totexp,0)/:bugamt)*100 ;
END IF;
return(:cp_1);
end;
Regards
Arif -
REP-1401: 'cf_1formula': Fatal PL/SQL error occurred.
Hi all,
I am using the barcodes example which is on otn.
I am getting the result on the development side which is my local set-up. (windows-2000) and i am using Report Builder 9.0.4.0.21.
I am able to see the barcode.
If i try the same thing on my deployment side which on my AS(Application server) which on UNIX platform .
I am getting the below error....
REP-1401: 'CF_1FORMULA0031': Fatal PL/SQL error occurred.
ORA-39565: Message 39565 not found; product=RDBMS; facility=ORA
I had gone thru metalinks and i found few docks saying change of width of file_name
I am enclosing the details
the below is the change i did in rep_<server>.conf
<engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="1" minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="60000" classPath="$ORACLE_HOME/reports/jlib/oraclebarcode.jar">
and i had made an entry in reports.sh as mentioned in one of the docs in metalinks.
and i had changed the width of
myfilename varchar2(20);
to
myfilename varchar2(256);
and CF_1 width to same
The code in
function CF_1FORMULA0031 return Char is
myfilename varchar2(256);
result varchar2(20);
barcodeData VarChar2(50) := :order_ID;
begin
myFileName := srw.create_temporary_filename;
barcodemaker.setBarWidthInch(globals.bcobj, 0.005);
barcodemaker.setBaseCodeData(globals.bcobj,barcodeData);
barcodemaker.setBarCodeType(globals.bcobj,globals.barcode_to_use);
myfilename := barcodeData;
barcodemaker.setFullPath(globals.bcobj, myFileName);
barcodemaker.renderBarCode(globals.bcobj);
return(myfilename);
end;
and i had opened the trace on and my trace says the below....
[2004/4/9 8:10:50:171] Debug 50103 (EngineManager:spawnEngine): Start engine command line = $ORACLE_HOME/bin/rwengine.sh -server -cp $ORACLE_HOME/reports/jlib/oraclebarcode.jar:$ORACLE_HOME/j2ee/home/lib/ojsp.jar:$ORACLE_HOME/reports/jlib/rwrun.jar:$ORACLE_HOME/jlib/zrclient.jar -Xbootclasspath/p:$ORACLE_HOME/vbroker4/lib/vbjboot.jar -Duser.language=en -Duser.region=US -Xmx256M oracle.reports.engine.RWEngine name=rwEng-0 server=rep ORACLE_HOME=/ora10g engineimplclass=oracle.reports.engine.EngineImpl traceopts=trace_all tracefile=$ORACLE_HOME/reports/logs/rep/rwEng-0.trc tracemode=trace_replace cacheDir=$ORACLE_HOME/reports/cache
which means the server is picking the jar files....
can any one tell me what can be the issue......
Advise me at the earliest................
cheers,
ALIHi Aamir,
The problem is that divisor by 0 (zero) is not possible.
So you need to make sure that in your calculation there's no division by zero.
In your case :bugamt is equal to zero then you will get this error.
So just make sure that :bugamt is not equal to zero.
You can do this as follows:
function avggFormula return Number is begin
IF :bugamt != 0 THEN
:cp_1 := (:bugamt-nvl(:totexp,0)/:bugamt)*100 ;
END IF;
return(:cp_1);
end;
Regards
Arif -
REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.
The program is finding no data in some place and is erroring out.
when i run the report i get the following error
REP-3000: Internal error starting Oracle Toolkit.
MSG-00010: EC installation status I
MSG-00003: Calling the archiving routine with parameters PO, STANDARD, 6677
REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.
ORA-01403: no data found
The following is the program
function CF_ChangeTotalFormula return Number is
v_maxrev number:=0;
v_result_final number :=0;
v_changes_to_curr varchar2(2000);
v_changes_to_prev varchar2(2000);
v_OriginalPOAmount varchar2(2000);
v_changes_from varchar2(2000);
v_changes_to varchar2(2000);
v_seq number ;
v_rev_num number ;
v_para varchar2(100);
begin
select icx_po_history_details_s.nextval into v_seq from dual;
select max(revision_num) into v_rev_num from apps.po_lines_archive where po_header_id =:poh_po_header_id;
for i in 1 .. v_rev_num loop
if v_rev_num >1 then
v_para := null;
else
v_para := 'ORIGINAL';
end if;
begin
pos_revision_differences.compare_headers(:poh_po_header_id,null,i,v_para,v_seq);
exception
when others then
return 0;
end;
end loop;
Select sum(pol.unit_price*pol.quantity) OriginalPOAmount
into v_OriginalPOAmount
from apps.po_lines_archive pol
where pol.revision_num = 0
and po_header_id = :poh_po_header_id
group by pol.po_header_id;
select max(revision_num)
into v_maxrev
from apps.po_lines_archive
where po_header_id = :poh_po_header_id;
if v_maxrev > 1 then
select distinct a.changes_to
into v_changes_to_curr
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = v_maxrev
and a.changes_from <> v_OriginalPOAmount;
if v_maxrev-1 <> 1 then
select distinct a.changes_to
into v_changes_to_prev
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = v_maxrev-1
and a.changes_from <> v_OriginalPOAmount;
else
select distinct a.changes_to
into v_changes_to_prev
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = 1;
end if;
v_result_final := v_changes_to_curr - v_changes_to_prev;
else
select distinct a.changes_from,a.changes_to
into v_changes_from,v_changes_to
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = 1;
v_result_final := v_changes_to - v_changes_from ;
end if;
return v_result_final;
/* exception
when others then
return 0; */
end;
Can anyone shed a light on this.
thanks
kalpanaThe program is finding no data in some place and is erroring out.
when i run the report i get the following error
REP-3000: Internal error starting Oracle Toolkit.
MSG-00010: EC installation status I
MSG-00003: Calling the archiving routine with parameters PO, STANDARD, 6677
REP-1401: 'cf_changetotalformula': Fatal PL/SQL error occurred.
ORA-01403: no data found
The following is the program
function CF_ChangeTotalFormula return Number is
v_maxrev number:=0;
v_result_final number :=0;
v_changes_to_curr varchar2(2000);
v_changes_to_prev varchar2(2000);
v_OriginalPOAmount varchar2(2000);
v_changes_from varchar2(2000);
v_changes_to varchar2(2000);
v_seq number ;
v_rev_num number ;
v_para varchar2(100);
begin
select icx_po_history_details_s.nextval into v_seq from dual;
select max(revision_num) into v_rev_num from apps.po_lines_archive where po_header_id =:poh_po_header_id;
for i in 1 .. v_rev_num loop
if v_rev_num >1 then
v_para := null;
else
v_para := 'ORIGINAL';
end if;
begin
pos_revision_differences.compare_headers(:poh_po_header_id,null,i,v_para,v_seq);
exception
when others then
return 0;
end;
end loop;
Select sum(pol.unit_price*pol.quantity) OriginalPOAmount
into v_OriginalPOAmount
from apps.po_lines_archive pol
where pol.revision_num = 0
and po_header_id = :poh_po_header_id
group by pol.po_header_id;
select max(revision_num)
into v_maxrev
from apps.po_lines_archive
where po_header_id = :poh_po_header_id;
if v_maxrev > 1 then
select distinct a.changes_to
into v_changes_to_curr
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = v_maxrev
and a.changes_from <> v_OriginalPOAmount;
if v_maxrev-1 <> 1 then
select distinct a.changes_to
into v_changes_to_prev
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = v_maxrev-1
and a.changes_from <> v_OriginalPOAmount;
else
select distinct a.changes_to
into v_changes_to_prev
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = 1;
end if;
v_result_final := v_changes_to_curr - v_changes_to_prev;
else
select distinct a.changes_from,a.changes_to
into v_changes_from,v_changes_to
from icx_po_revisions_temp_v a
where a.header_id = :poh_po_header_id
and a.field_altered = 'Amount'
and a.revision_num = 1;
v_result_final := v_changes_to - v_changes_from ;
end if;
return v_result_final;
/* exception
when others then
return 0; */
end;
Can anyone shed a light on this.
thanks
kalpana -
REP-1401:'afterpform': Fatal PL/SQL error occurred.
Hello. I have a report that receive 3 parameters (2 Date parameters and a Char parameter) and a lexical parameter P_Where.
In the after_parameter_form trigger I wrote this code:
function AfterPForm return boolean is
begin
:P_Where := NULL;
if (:P_DESDE_FECHA is not null) then
:P_Where := add_AND(:P_Where) | | 'FECPAGO >= :P_DESDE_FECHA';
end if;
if (:P_HASTA_FECHA is not null) then
:P_Where := add_AND(:P_Where) | | 'FECPAGO <= :P_HASTA_FECHA';
end if;
if (Upper(:P_OPCION) = 'O') then
:P_Where := add_AND(:P_Where) | | 'MARCA = ' | | '''OR''';
elsif (Upper(:P_OPCION) = 'P') then
:P_Where := add_AND(:P_Where) | | 'MARCA in (' | | '''PR''' | | ',' | | '''PH''' | | ',' | | '''PF''' | | ')';
end if;
if :P_Where is not null then
:P_Where := 'WHERE ' | | :P_Where;
end if;
return (TRUE);
end;
This is the function add_AND:
function add_AND ( pWhere IN varchar2) return varchar2 is
begin
if (nvl( length(pWhere),0)!=0) then
return (pWhere | | ' AND ');
else
return (pWhere);
end if;
end;
Sometimes when I try to run the report I receive the following message:
REP-1401:'afterpform': Fatal PL/SQL error occurred.
In the Report's Help I find the follow explanation:
Sometimes you may encounter an error that is known as an abnormal condition, which may arise from one of the following causes:
Someone has done something that prevented Developer/2000 from completing the requested task. For example, if someone bypassed the user interface and changed data in one of the Developer/2000 tables, they might have typed an invalid value.
A bug in Developer/2000 prevented the requested task from completing.
Action: First contact your system administrator to determine if the message was caused by something other than Developer/2000. If you determine that the message was not the result of user error or a system problem, then contact Oracle Customer Support.
Please I need some help.
Thank you
nullfunction AfterPForm return boolean is
begin
if :P_REP_NAME='Material' then
:rep:='union SELECT SUBSTR(ppa.segment1,1,10),SUBSTR(ppa.segment1,5,6),TO_CHAR(pha.creation_date,'||''''||'FMMonth YYYY'||''''||'),ppa.name ,msi.segment1,NVL((pla.quantity*pla.unit_price),0) ,NVL((pda.nonrecoverable_tax+pda.recoverable_tax),0) FROM pa_projects_all ppa ,mtl_system_items_b msi ,po_lines_all pla ,po_distributions_all pda ,po_headers_all pha WHERE ppa.project_id=NVL(pda.project_id,0)AND pda.po_line_id=pla.po_line_id AND pla.item_id=msi.inventory_item_id(+) AND pha.po_header_id=pla.po_header_id AND pda.po_header_id=pha.po_header_id AND msi.organization_id(+)=25 AND ppa.org_id=pda.org_id AND ppa.name=:p_project_name AND TO_CHAR(pha.creation_date,'||''''||'MON-YYYY'||''''||')=:P_creation_date';
elsif :P_REP_NAME='Material Purchase Year to Date' then
:rep:='union SELECT SUBSTR(ppa.segment1,1,10) site ,SUBSTR(ppa.segment1,5,6) cost_center,to_char(pha.creation_date,'||''''||'FMMonth YYYY'||''''||') Month_Year,TO_CHAR(pha.creation_date,'||''''||'YYYY'||''''||') Year,ppa.name,msi.segment1 material_code,nvl( (pla.quantity*pla.unit_price),0) item_amt,nvl((pda.nonrecoverable_tax+pda.recoverable_tax),0) GST_Amount FROM pa_projects_all ppa,mtl_system_items_b msi,po_lines_all pla,po_distributions_all pda,po_headers_all pha,hr_operating_units hou WHERE ppa.project_id=pda.project_id AND pda.po_line_id =pla.po_line_id AND pla.item_id =msi.inventory_item_id(+) AND pha.po_header_id=pla.po_header_id AND pda.po_header_id=pha.po_header_id and pha.org_id=hou.organization_id and msi.organization_id(+)=25 and ppa.name=:p_project_name';
end if;
return (TRUE);
end;
Maybe you are looking for
-
Smartforms problem ? intersection of template boundaries
hi, in my smartform project; i am using several templates.and many of them have intersection with each other.the question is;some boundaries which are intersected with each other are visible but some of them are not.do u have any ideas?
-
Is it advisable to turn off my iPod regularly to avoid it breaking down over time?
Hi everyone, I keep my iPod on all the time, 24/7/365. I've had it for a good couple of years now and have only ever turned it off a handful of times. I'm afraid that it might be starting to malfunction due to being on all the time, so is it a good i
-
Need specs for Satellite C50-A-1DV
Been all over, and have had nothing but frustration from trying to use the cumbersome and largely useless Toshiba 'help' services. If anyone can help, I need specs for the Satellite i3 C50-A-1DV. I have looked for an hour now and I can find nothing.
-
New MacBook Display is Horrible
I just got my new Aluminum MacBook last night, and it's going right back for refund this morning. The LCD is far inferior to my 1st generation MacBook display, and it's actually one of the worst displays I've seen on a modern notebook computer. I've
-
Transfer SQL Server Objects Timeout
Hello I have created a Transfer SQL Server Objects Task with the following settings: DropObjectsFirst = True CopyData = True CopySchema = True CopyAllObjects = False TablesList = (1 table in collection) CopyIndexes = True It copies a large table (13