Issue converting with function ToNumber
Hi
I have in one infocube a ratio with datatype Quantity [QUAN] and it's an attribute from a Z infoobject when i create the universe was datatype char and it's qualification = detail.
When i list in a webi reports appears like 0.125L, 0.175L because the unit of measure is Liters i create a variable with the following formula =ToNumber(Replace([Factor Convertir Litros];"L";""))
And shows in the cell #ERROR
When i try only =Replace([Factor Convertir Litros];"L";"") appears 01.25 and 0.175 but the ToNumber not works and i need this variable with datatype number in order to do some calculations.
In Bex Analyzer exists the function NODIM to eliminate the unit of measure, also i try to create in the universe as datatype number but also i get errors.
Somebody can help me please
Regards Marvin
Hi Marvin,
Try to convert it as:
ToNumber(Substr([Quan];1;Pos([Quan];"L")-1))
Assuming Quan to be of String data type
Regards,
Rohit
Similar Messages
-
Convert %rowtype function return into sys_refcursor
I have an interesting problem. We have created a standard pattern for all of our "get" functions for returning data to always return a sys_refcursor to our JAVA application as it is very easy to deal with cursors and convert them to Java Collection objects (i.e. List). I'm having an issue though with the fact that some of our lower level (DML layer) pl sql code returns [TABLE_NAME]%rowtype types. I haven't found a way for jdbc to handle this type of structure, and have found some people saying that is just can't (which makes sense).
What I would like to pose is if anyone has a clever way to manually create a cursor and insert the %rowtype object into it. It sounds simple enough, but I've tried a few approaches and nothing works. Maybe I'm just too tired or it's simply not possible.
Any help would be greatly appreciated.You could use pipelined functions, something like that:
create table testtable
pk number,
col2 varchar2(10)
insert into testtable values(1, 'ABC');
create or replace package testpack
as
type tabtype_testtable is table of testtable%rowtype;
function f_get_row return testtable%rowtype;
function f_pipe_row return tabtype_testtable pipelined;
function f_ret_refcur return sys_refcursor;
end testpack;
create or replace package body testpack
as
function f_get_row return testtable%rowtype
is
r_testtable testtable%rowtype;
begin
select pk,
col2
into r_testtable
from testtable
where rownum = 1
return(r_testtable);
end f_get_row;
function f_pipe_row return tabtype_testtable pipelined
is
begin
pipe row(f_get_row);
return;
end f_pipe_row;
function f_ret_refcur return sys_refcursor
is
r_refcur sys_refcursor;
begin
open r_refcur for
select * from table(f_pipe_row);
return(r_refcur);
close r_refcur;
end f_ret_refcur;
end;
/Regards,
Gerd
Message was edited by:
gerd_99
Forgot to close the cursor in f_ret_refcur. -
Converting Decode function in OBIEE
Hi Guru's
we are converting some BO reports to OBIEE and need to convert Decode function
Below is the Decode function they are using:
Decode ( sign(nvl(BOOKINGS_DATA_UDTC.qty_shipped,0)), 0,decode(BOOKINGS_DATA_UDTC.DELIVERY_NUMBER, 0,decode(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk,to_date('1/1/1990','mm/dd/yyyy'),'Next Month Backlog',decode(sign(nvl(BOOKINGS_DATA_UDTC.Schd_Ship_date_fk, '01-JAN-90') -PAR.PAR_DATE), 1, 'Next Month Backlog', 'Current month will ship')) ,'Awaiting for collection') ,'MTD Shipped')
i have tried converting into case :
case when sign(IFNULL("BOOKINGS_DATA_UDTC"."Qty Shipped",0)) = 0 then (case when "BOOKINGS_DATA_UDTC"."Delivery Number" = 0 then (case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" = '01-JAN-1990' then 'Next Month Backlog' else (case when Timestampdiff(SQL_TSI_DAY, cast('@{ParDate}{28-DEC-2012}' as Date),(case when "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" IS NULL then CAst('01-JAN-1990' as DATE) else "BOOKINGS_DATA_UDTC"."SCHD_SHIP_DATE_FK" end)) > 1 then 'Next Month Backlog' else 'Current Month Will Ship' end) end) else 'Awaiting For Collection' end) else 'MTD Shipped' end
But it is not workign as expected.
Can some one please help me with this.
Thanks,you can achieve it by using CASE WHEN condition END function in obiee. nested case also supported by obiee.
check the below link Decode Join Condition in OBIEE RPD
Thanks
Jay.
Edited by: Jay on Apr 3, 2012 12:56 PM -
Hi Friends
I am having performance issue for this function-module(HR_TIM_REPORT_ABSENCE_DATA) and one my client got over 8 thousend employees . This function-module taking forever to read the data. is there any other function-module to read the absences data IT2001 .
I did use like this .if i take out this F.M 'HR_TIM_REPORT_ABSENCE_DATA_INI' its not working other Function-module.please Suggest me .
call function 'HR_TIM_REPORT_ABSENCE_DATA_INI'
exporting "Publishing to global memory
option_string = option_s "string of sel org fields
trig_string = trig_s "string of req data
alemp_flag = sw_alemp "all employee req
infot_flag = space "split per IT neccessary
sel_modus = sw_apa
importing
org_num = fdpos_lines "number of sel org fields
tables
fieldtab = fdtab "all org fields
field_sel = fieldnametab_m. "sel org fields
To Read all infotypes from Absences type.
RP_READ_ALL_TIME_ITY PN-BEGDA PN-ENDDA.
central function unit to provide internal tables: abse orgs empl
call function 'HR_TIM_REPORT_ABSENCE_DATA'
exporting
pernr = pernr-pernr
begda = pn-begda
endda = pn-endda
IMPORTING
SUBRC = SUBRC_RTA
tables
absences = absences_01
org_fields = orgs
emp_fields = empl
REFTAB =
APLTAB =
awart_sel_p = awart_s[]
awart_sel_a = awart_s[]
abstp_sel = abstp_s[]
i0000 = p0000
i0001 = p0001
i0002 = p0002
i0007 = p0007
i2001 = p2001
i2002 = p2002
i2003 = p2003.
Thanks & Regards
Reddyguessing will not help you much, check with SE30 to get a better insight
SE30
The ABAP Runtime Trace (SE30) - Quick and Easy
what is the total time, what are the Top 10 in the hitlist.
Siegfried -
PDF Documents with Functional Buttons - Works for IE and FireFox but not for Chrome and Safari
To all,
Good morning. Our institution developed a PDF document with functional buttons for printing and e-mailing. When the document is viewed via Internet Explorer and Firefox, the functional buttons work as expected. However if the document is viewed via Chrome and Safari, the functional buttons do not work. The workaround for those who are using Chrome and Safari, the PDF document needs to be saved to their local drive before the functional buttons work.
Has anyone experienced this issue before? If yes, what was your solution other than the workaround.
Thanks.
Babylon5Here's how to configure your browser to run Adobe Reader: http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
-
Media Converter with 802.1q support
hey guys
have u ever heard of a optical to UTP media converter which supports .1q trunking, as we tried b4 but didnt work out , what we want is to have a trunk link which is via a converter (utp to fiber).
thanx a ton in advance
shukky
Indiahi amit
i personally appreciate ur input, just a thought , i tried trunking between 2 cisco 2950s with a media converter in between , it didnt work out, i mean , is it a must to have a converter with trunk functionality for the links to work and have trnking , as a converter is just a passive device which connects two ports, the links come up, but no trunking, any specific config i need to make in order to achive trunking with a converter in between with no trunk features on the converter itself.
lastly can i have ur email id, just in case if i need more queries.
mine is :
[email protected] -
Scaleability with Functions in SQL queries
Hi,
In one of our applications we have many views that use a packaged function in the where clause to filter data. This function uses a SYS_CONTEXT() to set and get values. There are couple of issues while using this approach:
1/ The deterministic function doesn't allow any scability with PQ-server.
2/ Another issue with this function and also the SYS_CONTEXT-function, they manuipulate the estimated CBO-statistics.
CREATE TABLE TAB_I
COLUMN1 NUMBER(16, 0) NOT NULL
, COLUMN2 VARCHAR2(20)
, CONSTRAINT TAB_I_PK PRIMARY KEY
COLUMN1
ENABLE
CREATE TABLE TAB_V
I_COL1 NUMBER(16,0) NOT NULL ENABLE,
VERSION_ID NUMBER(16,0) NOT NULL ENABLE,
CRE_DATIM TIMESTAMP (6) NOT NULL ENABLE,
TERM_DATIM TIMESTAMP (6) NOT NULL ENABLE,
VERSION_VALID_FROM DATE NOT NULL ENABLE,
VERSION_VALID_TILL DATE NOT NULL ENABLE,
CONSTRAINT TAB_V_PK PRIMARY KEY (I_COL1, VERSION_ID) USING INDEX NOCOMPRESS LOGGING ENABLE,
CONSTRAINT COL1_FK FOREIGN KEY (I_COL1) REFERENCES TAB_I (COLUMN1) ENABLE
CREATE OR REPLACE
PACKAGE app_bitemporal_rules IS
FUNCTION f_knowledge_time RETURN TIMESTAMP DETERMINISTIC;
END app_bitemporal_rules;
create or replace
PACKAGE BODY app_bitemporal_rules IS
FUNCTION f_knowledge_time RETURN TIMESTAMP DETERMINISTIC IS
BEGIN
RETURN TO_TIMESTAMP(SYS_CONTEXT ('APP_USR_CTX', 'KNOWLEDGE_TIME'),'DD.MM.YYYY HH24.MI.SSXFF');
END f_knowledge_time;
END app_bitemporal_rules;
explain plan for select *
FROM tab_i
JOIN tab_v
ON tab_i.column1 = tab_v.i_col1
AND app_bitemporal_rules.f_knowledge_time BETWEEN tab_v.CRE_DATIM AND tab_v.TERM_DATIM
where tab_i.column1 = 11111;
select * from table(dbms_xplan.display);
Plan hash value: 621902595
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 95 | 5 (0)| 00:00:06 |
| 1 | NESTED LOOPS | | 1 | 95 | 5 (0)| 00:00:06 |
| 2 | TABLE ACCESS BY INDEX ROWID| TAB_I | 1 | 25 | 1 (0)| 00:00:02 |
|* 3 | INDEX UNIQUE SCAN | TAB_I_PK | 1 | | 1 (0)| 00:00:02 |
|* 4 | TABLE ACCESS FULL | TAB_V | 1 | 70 | 4 (0)| 00:00:05 |
Predicate Information (identified by operation id):
3 - access("TAB_I"."COLUMN1"=11111)
4 - filter("TAB_V"."I_COL1"=11111 AND
"TAB_V"."CRE_DATIM"<="APP_BITEMPORAL_RULES"."F_KNOWLEDGE_TIME"() AND
"TAB_V"."TERM_DATIM">="APP_BITEMPORAL_RULES"."F_KNOWLEDGE_TIME"())
Note
- 'PLAN_TABLE' is old version
- dynamic sampling used for this statement (level=2)
explain plan for select *
FROM tab_i
JOIN tab_v
ON tab_i.column1 = tab_v.i_col1
AND '10-OCT-2011' BETWEEN tab_v.CRE_DATIM AND tab_v.TERM_DATIM
where tab_i.column1 = 11111;
select * from table(dbms_xplan.display);
Plan hash value: 621902595
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 256 | 24320 | 5 (0)| 00:00:06 |
| 1 | NESTED LOOPS | | 256 | 24320 | 5 (0)| 00:00:06 |
| 2 | TABLE ACCESS BY INDEX ROWID| TAB_I | 1 | 25 | 1 (0)| 00:00:02 |
|* 3 | INDEX UNIQUE SCAN | TAB_I_PK | 1 | | 1 (0)| 00:00:02 |
|* 4 | TABLE ACCESS FULL | TAB_V | 256 | 17920 | 4 (0)| 00:00:05 |
Predicate Information (identified by operation id):
3 - access("TAB_I"."COLUMN1"=11111)
4 - filter("TAB_V"."I_COL1"=11111 AND "TAB_V"."CRE_DATIM"<=TIMESTAMP'
2011-10-10 00:00:00.000000000' AND "TAB_V"."TERM_DATIM">=TIMESTAMP' 2011-10-10
00:00:00.000000000')
Note
- 'PLAN_TABLE' is old version
- dynamic sampling used for this statement (level=2) As can be seen in the second plan the cardinality has been guessed correctly, but not in the first case.
I have also tried with:
ASSOCIATE STATISTICS WITH packages app_bitemporal_rules DEFAULT COST (1000000/*246919*/,1000,0) DEFAULT SELECTIVITY 50;
But, this just leads to a increased cost, but no change in cardinality.
The (1) problem gets solved if I directly use "TO_TIMESTAMP(SYS_CONTEXT ('APP_USR_CTX', 'KNOWLEDGE_TIME'),'DD.MM.YYYY HH24.MI.SSXFF')" in the where clause. But am not able to find a solution for the (2) issue.
Can you please help.
Regards,
Vikram RHi Vikram,
On the subject of using [url http://download.oracle.com/docs/cd/E11882_01/server.112/e26088/statements_4006.htm#i2115932]ASSOCIATE STATISTICS, having done a little investigation on 11.2.0.2, I'm having trouble adjusting selectivity via "associate statististics ... default selectivity" but no problems with adjusting default cost.
I've also tried to do the same using an interface type and am running into other issues.
It's not functionality that I'm overly familiar with as I try to avoid/eliminate using functions in predicates.
Further analysis/investigation required.
Including test case of what I've done so far in case anyone else wants to chip in.
SQL> select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
PL/SQL Release 11.2.0.2.0 - Production
CORE 11.2.0.2.0 Production
TNS for Linux: Version 11.2.0.2.0 - Production
NLSRTL Version 11.2.0.2.0 - Production
SQL> drop table t1;
Table dropped.
SQL>
SQL> create table t1
2 as
3 select rownum col1
4 from dual
5 connect by rownum <= 100000;
Table created.
SQL>
SQL> exec dbms_stats.gather_table_stats(USER,'T1');
PL/SQL procedure successfully completed.
SQL>
SQL> create or replace function f1
2 return number
3 as
4 begin
5 return 1;
6 end;
7 /
Function created.
SQL>
SQL> create or replace function f2 (
2 i_col1 in number
3 )
4 return number
5 as
6 begin
7 return 1;
8 end;
9 /
Function created.
SQL> Created one table with 100000 rows.
Two functions - one without arguments, one with (for later).
With no associations:
SQL> select * from user_associations;
no rows selected
SQL> Run a statement that uses the function:
SQL> select count(*) from t1 where col1 >= f1;
COUNT(*)
100000
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID gm7ppkbzut114, child number 0
select count(*) from t1 where col1 >= f1
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 139 (100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 139 (62)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F1"())
19 rows selected.
SQL> Shows that default selectivity of 5% for an equality predicate against function.
Let's try to adjust the selectivity using associate statistics - the argument for selectivity should be a percentage between 0 and 100:
(turning off cardinality feedback for clarity/simplicity)
SQL> alter session set "_optimizer_use_feedback" = false;
Session altered.
SQL>
SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 default selectivity 100;
Statistics associated.
SQL> select count(*) from t1 where col1 >= f1;
COUNT(*)
100000
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID gm7ppkbzut114, child number 1
select count(*) from t1 where col1 >= f1
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 139 (100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 139 (62)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F1"())
19 rows selected.
SQL> Didn't make any difference to selectivity.
An excerpt from a 10053 trace file had the following:
** Performing dynamic sampling initial checks. **
** Dynamic sampling initial checks returning FALSE.
No statistics type defined for function F1
No default cost defined for function F1So, crucially what's missing here is a clause saying:
No default selectivity defined for function F1But there's no other information that I could see to indicate why it should be discarded.
Moving on, adjusting the cost does happen:
SQL>exec spflush;
PL/SQL procedure successfully completed.
SQL> disassociate statistics from functions f1;
Statistics disassociated.
SQL>
SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 default selectivity 100 default cost (100,5,0);
Statistics associated.
SQL> select count(*) from t1 where col1 >= f1;
COUNT(*)
100000
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID gm7ppkbzut114, child number 0
select count(*) from t1 where col1 >= f1
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 500K(100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 500K (1)| 00:41:41 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F1"())
19 rows selected.
SQL> And we see the following in a 10053:
No statistics type defined for function F1
Default costs for function F1 CPU: 100, I/O: 5So, confirmation that default costs for function were found and applied but nothing else about selectivity again.
I wondered whether the lack of arguments for function F1 made any difference, hence function F2.
Didn't seem to:
Vanilla:
SQL> select count(*) from t1 where col1 >= f2(col1);
COUNT(*)
100000
SQL>
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID 2wxw32wadgc1v, child number 0
select count(*) from t1 where col1 >= f2(col1)
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 139 (100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 139 (62)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F2"("COL1"))
19 rows selected.
SQL> Plus association:
SQL>exec spflush;
PL/SQL procedure successfully completed.
SQL>
SQL> associate statistics with functions f2 default selectivity 90 default cost (100,5,0);
Statistics associated.
SQL> select count(*) from t1 where col1 >= f2(col1);
COUNT(*)
100000
SQL>
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID 2wxw32wadgc1v, child number 0
select count(*) from t1 where col1 >= f2(col1)
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 500K(100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 500K (1)| 00:41:41 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F2"("COL1"))
19 rows selected.
SQL> Just to confirm associations:
SQL> select * from user_associations;
OBJECT_OWNER OBJECT_NAME COLUMN_NAME OBJECT_TY
STATSTYPE_SCHEMA STATSTYPE_NAME DEF_SELECTIVITY DEF_CPU_COST DEF_IO_COST DEF_NET_COST
INTERFACE_VERSION MAINTENANCE_TY
RIMS F2 FUNCTION
90 100 5
0 USER_MANAGED
RIMS F1 FUNCTION
100 100 5
0 USER_MANAGED
SQL> So.... started thinking about whether using an interface type would help?
SQL> CREATE OR REPLACE TYPE test_stats_ot AS OBJECT
2 (dummy_attribute NUMBER
3 ,STATIC FUNCTION ODCIGetInterfaces (
4 ifclist OUT SYS.ODCIObjectList
5 ) RETURN NUMBER
6 ,STATIC FUNCTION ODCIStatsSelectivity (
7 pred IN SYS.ODCIPredInfo,
8 sel OUT NUMBER,
9 args IN SYS.ODCIArgDescList,
10 strt IN NUMBER,
11 stop IN NUMBER,
12 --i_col1 in NUMBER,
13 env IN SYS.ODCIEnv
14 ) RETURN NUMBER
15 --,STATIC FUNCTION ODCIStatsFunctionCost (
16 -- func IN SYS.ODCIPredInfo,
17 -- cost OUT SYS.ODCICost,
18 -- args IN SYS.ODCIArgDescList,
19 -- i_col1 in NUMBER,
20 -- env IN SYS.ODCIEnv
21 -- ) RETURN NUMBER
22 );
23 /
Type created.
SQL> CREATE OR REPLACE TYPE BODY test_stats_ot
2 AS
3 STATIC FUNCTION ODCIGetInterfaces (
4 ifclist OUT SYS.ODCIObjectList
5 ) RETURN NUMBER
6 IS
7 BEGIN
8 ifclist := sys.odciobjectlist(sys.odciobject('SYS','ODCISTATS2'));
9 RETURN odciconst.success;
10 END;
11 STATIC FUNCTION ODCIStatsSelectivity
12 (pred IN SYS.ODCIPredInfo,
13 sel OUT NUMBER,
14 args IN SYS.ODCIArgDescList,
15 strt IN NUMBER,
16 stop IN NUMBER,
17 --i_col1 in NUMBER,
18 env IN SYS.ODCIEnv)
19 RETURN NUMBER
20 IS
21 BEGIN
22 sel := 90;
23 RETURN odciconst.success;
24 END;
25 -- STATIC FUNCTION ODCIStatsFunctionCost (
26 -- func IN SYS.ODCIPredInfo,
27 -- cost OUT SYS.ODCICost,
28 -- args IN SYS.ODCIArgDescList,
29 -- i_col1 in NUMBER,
30 -- env IN SYS.ODCIEnv
31 -- ) RETURN NUMBER
32 -- IS
33 -- BEGIN
34 -- cost := sys.ODCICost(10000,5,0,0);
35 -- RETURN odciconst.success;
36 -- END;
37 END;
38 /
Type body created.
SQL> But this approach is not happy - perhaps not liking the function with no arguments?
SQL> disassociate statistics from functions f1;
Statistics disassociated.
SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f1 USING test_stats_ot;
Statistics associated.
SQL> select count(*) from t1 where col1 >= f1;
select count(*) from t1 where col1 >= f1
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-06550: line 12, column 22:
PLS-00103: Encountered the symbol "ÀÄ" when expecting one of the following:
) , * & = - + < / > at in is mod remainder not rem =>
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || multiset member submultiset
SQL> So, back to F2 again (uncommenting argument i_col1 in ODCIStatsSelectivity):
SQL> disassociate statistics from functions f1;
Statistics disassociated.
SQL> disassociate statistics from functions f2;
Statistics disassociated.
SQL> ASSOCIATE STATISTICS WITH FUNCTIONS f2 USING test_stats_ot;
Statistics associated.
SQL> select count(*) from t1 where col1 >= f2(col1);
COUNT(*)
100000
SQL> select * from table(dbms_xplan.display_cursor);
PLAN_TABLE_OUTPUT
SQL_ID 2wxw32wadgc1v, child number 0
select count(*) from t1 where col1 >= f2(col1)
Plan hash value: 3724264953
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | | | 139 (100)| |
| 1 | SORT AGGREGATE | | 1 | 5 | | |
|* 2 | TABLE ACCESS FULL| T1 | 5000 | 25000 | 139 (62)| 00:00:01 |
Predicate Information (identified by operation id):
2 - filter("COL1">="F2"("COL1"))
19 rows selected.
SQL> Nothing obviously happening.
You'll note also in my interface type implementation that I commented out a declaration of ODCIStatsFunctionCost.
This post is probably already too long already so I've skipped some of the detail.
But when ODCIStatsFunctionCost was used with function F2, I presume I've made a mistake in the implementation because I had an error in the 10053 trace as follows:
Calling user-defined function cost function...
predicate: "RIMS"."F2"("T1"."COL1")
declare
cost sys.ODCICost := sys.ODCICost(NULL, NULL, NULL, NULL);
arg0 NUMBER := null;
begin
:1 := "RIMS"."TEST_STATS_OT".ODCIStatsFunctionCost(
sys.ODCIFuncInfo('RIMS',
'F2',
NULL,
1),
cost,
sys.ODCIARGDESCLIST(sys.ODCIARGDESC(2, 'T1', 'RIMS', '"COL1"', NULL, NULL, NULL))
, arg0,
sys.ODCIENV(:5,:6,:7,:8));
if cost.CPUCost IS NULL then
:2 := -1.0;
else
:2 := cost.CPUCost;
end if;
if cost.IOCost IS NULL then
:3 := -1.0;
else
:3 := cost.IOCost;
end if;
if cost.NetworkCost IS NULL then
:4 := -1.0;
else
:4 := cost.NetworkCost;
end if;
exception
when others then
raise;
end;
ODCIEnv Bind :5 Value 0
ODCIEnv Bind :6 Value 0
ODCIEnv Bind :7 Value 0
ODCIEnv Bind :8 Value 4
ORA-6550 received when calling RIMS.TEST_STATS_OT.ODCIStatsFunctionCost -- method ignoredThere was never any such feedback about ODCIStatsSelectivity.
So, in summary, more questions than answers.
I'll try to have another look later. -
HI,
We are facing an issue in COPY function in IP. Few Time characteristics are not copying from Actual to plan cube. We have Three Actual cubes and one plan cube. We are using COPY function and changing Info provider , currency and version Characteristics.
We have tried with FOX code also but Time characteristics 0CALMONTH2, 0CALQUART1 are not getting copied, They are displaying as # but we have data in all the actual cubes. These chars in Multiprovider are mapped with all the infoprovider.
Kindly Provide your valuable inputs.
Thanks & RegardsHi Pratyush and Cornelia,
We are not using derivations.
Following is the sample data as it is stored in actual cube
0CAlMONTH = 1
0CALQUART1 = 1
0FISCPER = 2006001
0FISCPER3 = 1
0FISCVARNT = K4
0FISCYEAR = 2006
We have some planning sequences which get excuted through a portal based on a planning template. The planning sequences are failing as they are not getting the input parameters when we run them on portal. We ran the sequences individually through the modeller with the necessary input parameters. The actual cube data is read succesfully but the 2 time characteristic are showing # values.On trying to save the data in the plan cube we get this error "Access via Null object reference not possible.error key: RFC_ERROR_SYSTEM_FAILURE". Please suggest.
Thanks & Regards,
Saurav
Edited by: Saurav Chetry on Jun 6, 2011 4:10 PM -
Queuename cannot be build with function(while creating invoice VF01) IDoc
Hi all,
I had a problem while posting an invoice with reference to the delivery document . we had configured partner profile with INVOIC02 and extension for that. and maintained Transfer IDocs immediately. queue processing is enabled . before implementing OSS notes it is working fine. after implementing these notes we are getting update termination message and the invoice document is not getting saved. the notes are 0001019483 and 0001280898 .
After implementing notes rule is enabled and in that rule we had given IDOC_QUEUE_SUS_MM. and we had done cofig for that in we85.
the message is like this.
Update was terminated
System ID.... R1Q
Client....... 100
User..... ABOSE
Transaction.. VF01
Update key... 4DF9276AC53F16E6E100800082180442
Generated.... 16.06.2011, 12:43:49
Completed.... 16.06.2011, 12:43:50
Error Info... B1 519: Queuename cannot be build with function:
Please helpme out
Thanks & regards
sreehari pDear Reddy,
This may due to two reasons
1.Itemcategory settings
2.Copy control settings at item level between your sales document type and your billing type ZF3.So fallow these steps you can rectify the issue.
-->You go to the VOV7 transaction then select item category ZAPT TAP then go in to the details of that here you can find the field Billing Relevance maintain this field "B" or "C" if you are doing order related billing.
-->Go to VTFA transaction click on change icon (Top Left Corner)then select your billing type ZF3 and sales order type then click on the item here you select the itemcategory ZAPT TAP then go in to the details screen here you need to enter the copying requirement routines.
Standard routine is 002-item/order related in the Copying requirements field.
Standard routine is 001-Inv.split (sample) in the Data VBRK/VBRP field.
And also check the Header level copy control settings
Maintain these settings then try
I hope it will help you
Regards,
Murali. -
Is there a way to convert JCO.Function to IDoc.DocumentList?
Hi, dear All!
I am implementing a JCo IDoc listener in our application deployed in SAP WebAS (JCoIDocServer use is not recommended there). It's supposed to receive IDocs from SAP R/3 system.
As per documentation, I created an EJB with JNDI name IDOC_INBOUND_ASYNCHRONOUS which has a method processFunction(JCO.Function).
The problem is that I am sending IDocs from SAP and I need to work with IDoc.DocumentList instead.
As a last resort I can try converting JCO.Function parameters into IDoc.Documents manually myself, however, I'd prefer to use some standard API to do this.
So the question is: Is there a better way to get IDocs out of this JCO.Function object?
I would really appreciate any help.
Best Regards,
-YuriI solved this problem by using JCoIDoc.Server.dispatch protected method to process the JCO.Function.
-
I'M HAVING PROBLEM WITH FUNCTION KEY, I'M HAVING PROBLEM WITH FUNCTION KEY
Hello everybody
Recently i'm having problem with function key of iphone4, now its working assistive touch key board , between these days i had restored and update then it work for next 12 hour after that it again stoped..
pls help me from this isssue,
thanking you.There are no function keys on the iPhone.
Please clearly state the issue that is occurring. -
Converting Stuff function from SQLServer to Oracle
Anyone out there found an Oracle counterpart for the SQL Server "stuff" function.
It is being used following an ascii(substr(variable)) locating all nonprintable characters and replacing with null.anjali5 wrote:
I am very new to oracle. I am trying to convert this function to oracle, but keep getting errors
USE [REF]
GO
/****** Object: UserDefinedFunction [dbo].[fnc_get_home] Script Date: 10/21/2011 17:50:10 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date, ,>
-- Description: <Description, ,>
-- =============================================
ALTER FUNCTION [dbo].[fnc_get_home]
@p_ui nvarchar(50), @p_dt datetime
RETURNS NVARCHAR(50)
AS
BEGIN
declare @v_home NVARCHAR(50);
select top 1 @v_home = HOME_CODE from dbo.activity_home_b
where UI = @p_ui
order by HOME_END_DT desc;
RETURN @v_home;
ENDI am very new to Volkwagen cars, but here is a picture of my old Toyota
My new car won't go
Tell me how to make my car go.
You refer to Oracle, but I wonder if this has anything to do with ACCESS.
post complete CREATE TABLE statement of Oracle Table
post INSERT for sample test date & expected/desired results -
Generic Data Source with Function Module data mismatch in BI
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.the datasource frame work starts the function module several times.
1. the initialization
2. the serval times, until you "raise no_more_data".
check you coding: have you refreshed necessary internal tables.
Sven -
Generic Data Source with Function Module data mismatch
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.HI rkiranbi,
1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means you need to
check coding logic in function module.
2. if your are getting wrong values in BI System then check with
1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
if you find any mistake you need change the coding in function module according to client requirement.
2. compare data with RSA3 and bi report data or data target data.
check it properly above steps, you will get solution.
thanks and regards,
malli -
VirtualProvider with Function module problem !
I implemented virtualprovider with function module. Unfortunately when I run query i get message error :
u201CFunction call of ZT0X failed; the obligatory parameter CHARACTERISTICS
An exception with the type CX_SY_DYN_CALL_PARAM_MISSING occurred, but was
I>> Row: 67 Inc: READ_DATA Prog: CL_RSDRV_VPROV_LOC_NOSIDu201D
Any suggestions ?
Below source code:
u201CFUNCTION ZT0X.
""Lokalny interfejs:
*" IMPORTING
*" VALUE(INFOCUBE) LIKE BAPI6200-INFOCUBE DEFAULT 'ZT03'
*" VALUE(KEYDATE) LIKE BAPI6200-KEYDATE OPTIONAL
*" EXPORTING
*" VALUE(RETURN) LIKE BAPIRET2 STRUCTURE BAPIRET2
*" TABLES
*" SELECTION STRUCTURE BAPI6200SL
*" CHARACTERISTICS STRUCTURE BAPI6200FD
*" KEYFIGURES STRUCTURE BAPI6200FD
*" DATA STRUCTURE BAPI6100DA
DATA:
l_r_srv TYPE ref to CL_RSDRV_REMOTE_IPROV_SRV,
l_th_mapping TYPE CL_RSDRV_REMOTE_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
* break-point ID ZRSDRV_RC1.
* break DEVELOPER.
perform build_mapping_table
changing l_th_mapping.
create object l_r_srv
exporting
i_tablnm = '/BIC/PZPRD_ID'
i_th_iobj_fld_mapping = l_th_mapping.
l_r_srv->open_cursor(
i_t_characteristics = characteristics[]
i_t_keyfigures = keyfigures[]
i_t_selection = selection[] ).
l_r_srv->fetch_pack_data(
importing
e_t_data = data[] ).
return-type = 'S'.
ENDFUNCTION.
&---- <
*& Form build_mapping_table
&---- <
Form build_mapping_table
changing
c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
DATA:
l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
l_s_map-iobjnm = 'ZPRD_ID'.
l_s_map-fldnm = '/BIC/ZPRD_ID'.
insert l_s_map into table c_th_mapping.
l_s_map-iobjnm = 'ZWARTOSC'.
l_s_map-fldnm = '/BIC/Z_CEN_W'.
insert l_s_map into table c_th_mapping.
+endform.u201DHello
I experienced the same issue. Were u able to solve it? If yes , kindly ask you to make posting here so that others can benefit as well.
Huge thanks
Maybe you are looking for
-
A word document was emailed to me. I can open the document without a problem on my iPad 2. Is there a way for me to type on the document.... to fill out the form? When I click the fields, the virtual keyboard does not appear.
-
Wrong Input Parameter in Job Details
Hi, i start a OWB10.2.0.1 mapping by calling its main-Procedure including the default-parameters and a individual plant location-parameter 'B' as MappingInput (used later as filter), f.e.: declare p varchar2(4000); begin fact_map.main(p, 'B', NULL, N
-
My code to "select" an element in the Tree UI element is not consistently working
Hi, I created a Web Dynpro component that does many things. One feature is do display information in a Tree UI element. I use the TreeNodeType and recursive context node to build a nice tree representing what the customer wants. Since this tree co
-
Good Morning! I'm fairly new to Dreamweaver and I'm trying to cut through the fog and get a project completed. I am working on an email blast for my company and I need several links over top of the image that I designed in Illustrator and Photoshop.
-
Help add music to slideshow please
In previous version of iWeb I had music in my slideshows by editing the 'slideshow.html' file and using AC_QuickTime.js Javascript. In version 08 the slideshow.html file is gone and replaced with iWPopUpSlideshow.css Does antone know a way I can get