Convert package to function..
can anyone convert this package to function so that we can use it in sql command..
{color:#993300}create or replace package metaphone
is
function generate(s varchar2) return varchar2;
end metaphone;
show errors;{color}
{color:#993300}create or replace package body metaphone
is
type rule_rec is record
f_off integer,
f_match varchar2(10),
f_result varchar2(10)
type rule_tab is table of rule_rec index by binary_integer;
g_rules rule_tab;
g_vowels constant varchar2(5) := 'AEIOU';
function cmp_rule
p_rule rule_rec,
p_off pls_integer,
p_str varchar2
) return boolean;
function generate(s varchar2) return varchar2
is
l_s varchar2(32767);
l_r varchar2(32767);
begin
-- get rid of non-alpha characters
for i in 1..length(s) loop
if upper(substr(s,i,1)) between 'A' and 'Z' then
l_s := l_s || upper(substr(s,i,1));
end if;
end loop;
if l_s is null then
return null;
end if;
-- clean up the word a bit
if l_s like 'AE%' or l_s like 'GN%' or l_s like 'KN%'
or l_s like 'PN%' or l_s like 'WR%'
then
l_s := substr(l_s,2); -- drop first letter
elsif l_s like 'X%' then
l_s := 'S' || substr(l_s,2); -- change to S
elsif l_s like 'WH%' then
l_s := 'W' || substr(l_s,2); -- change to W
end if;
for i in 1..length(l_s) loop
if i > 1 and substr(l_s,i-1,1) = substr(l_s,i,1)
and substr(l_s,i,1) != 'C'
then
-- drop the second of doubled letter except C
null;
elsif instr(g_vowels,substr(l_s,i,1)) > 0 then
-- ignore all except initial vowels
if i = 1 then
l_r := l_r || substr(l_s,i,1);
end if;
elsif substr(l_s,i,2) = 'GH'
and i < length(l_s)-2
and instr(g_vowels,substr(l_s,i+1,1)) = 0
then
-- a difficult rule:
-- silent if in "gh" and not at end or before a vowel
null;
else
-- scan for word patterns
for r in 1..g_rules.count loop
if cmp_rule(g_rules(r),i,l_s) then
l_r := l_r || g_rules(r).f_result;
exit;
end if;
end loop;
end if;
end loop;
return l_r;
end generate;
procedure add_rule(p_off integer,p_match varchar2,p_result varchar2)
is
l_rule_rec rule_rec;
begin
l_rule_rec.f_off := p_off;
l_rule_rec.f_match := p_match;
l_rule_rec.f_result := p_result;
g_rules(g_rules.count+1) := l_rule_rec;
end add_rule;
function cmp_rule
p_rule rule_rec,
p_off pls_integer,
p_str varchar2
) return Boolean
is
ch1 char;
ch2 char;
begin
if p_rule.f_match like '%c%' or p_rule.f_match like '%v%' then
for i in 1..length(p_rule.f_match) loop
ch1 := substr(p_rule.f_match,i,1);
ch2 := substr(p_str,p_off+p_rule.f_off+i,1);
if ch2 is null then
return false;
end if;
if ch1 = 'v' then
if instr(g_vowels,ch2) = 0 then
return false;
end if;
elsif ch1 = 'c' then
if instr(g_vowels,ch2) != 0 then
return false;
end if;
elsif ch1 != ch2 then
return false;
end if;
end loop;
return true;
end if;
if p_off <= -p_rule.f_off then
return false;
end if;
return p_rule.f_match
= substr(p_str,p_off+p_rule.f_off,length(p_rule.f_match));
end cmp_rule;
begin
-- initialize the rules table
-- order is important
add_rule(-1,'MB',null);
add_rule(0,'B','B');
add_rule(0,'CIA','X');
add_rule(0,'CH','X');
add_rule(0,'CI','S');
add_rule(0,'CE','S');
add_rule(0,'CY','S');
add_rule(0,'C','K');
add_rule(0,'DGE','J');
add_rule(0,'DGY','J');
add_rule(0,'DGI','J');
add_rule(0,'D','T');
add_rule(0,'F','F');
add_rule(0,'GN',null);
add_rule(0,'GNED',null);
add_rule(0,'GI','J');
add_rule(0,'GE','J');
add_rule(0,'GY','J');
add_rule(0,'G','K');
add_rule(-1,'vHc',null);
add_rule(-1,'CH',null);
add_rule(-1,'PH',null);
add_rule(-1,'SH',null);
add_rule(-1,'TH',null);
add_rule(0,'H','H');
add_rule(0,'J','J');
add_rule(-1,'CK',null);
add_rule(0,'K','K');
add_rule(0,'L','L');
add_rule(0,'M','M');
add_rule(0,'N','N');
add_rule(0,'PH','F');
add_rule(0,'P','P');
add_rule(0,'Q','K');
add_rule(0,'R','R');
add_rule(0,'SH','X');
add_rule(0,'SIO','X');
add_rule(0,'SIA','X');
add_rule(0,'S','S');
add_rule(0,'TIA','X');
add_rule(0,'TIO','X');
add_rule(0,'TH','0');
add_rule(0,'TCH',null);
add_rule(0,'T','T');
add_rule(0,'V','F');
add_rule(0,'Wv','W');
add_rule(0,'W',null);
add_rule(0,'X','KS');
add_rule(0,'Yv','Y');
add_rule(0,'Y',null);
add_rule(0,'Z','S');
end metaphone;
show errors;{color}
{color:#993300}source
http://www.zdnetasia.com/builder/architect/db/0,39044553,39200579,00.htm
Regards
venkat...
{color}
Its already a function. Only thing is that its within a package. So you can just use it in SQL like this.
SELECT package_name.function_name FROM dual;See below...
SQL> create or replace package metaphone
2 is
3 function generate(s varchar2) return varchar2;
4 end metaphone;
5 /
Package created.
SQL> show errors;
No errors.
SQL>
SQL> create or replace package body metaphone
2 is
3 type rule_rec is record
4 (
5 f_off integer,
6 f_match varchar2(10),
7 f_result varchar2(10)
8 );
9 type rule_tab is table of rule_rec index by binary_integer;
10 g_rules rule_tab;
11 g_vowels constant varchar2(5) := 'AEIOU';
12 --
13 function cmp_rule
14 (
15 p_rule rule_rec,
16 p_off pls_integer,
17 p_str varchar2
18 ) return boolean;
19 --
20 function generate(s varchar2) return varchar2
21 is
22 l_s varchar2(32767);
23 l_r varchar2(32767);
24 begin
25 -- get rid of non-alpha characters
26 for i in 1..length(s) loop
27 if upper(substr(s,i,1)) between 'A' and 'Z' then
28 l_s := l_s || upper(substr(s,i,1));
29 end if;
30 end loop;
31 if l_s is null then
32 return null;
33 end if;
34 -- clean up the word a bit
35 if l_s like 'AE%' or l_s like 'GN%' or l_s like 'KN%'
36 or l_s like 'PN%' or l_s like 'WR%'
37 then
38 l_s := substr(l_s,2); -- drop first letter
39 elsif l_s like 'X%' then
40 l_s := 'S' || substr(l_s,2); -- change to S
41 elsif l_s like 'WH%' then
42 l_s := 'W' || substr(l_s,2); -- change to W
43 end if;
44 for i in 1..length(l_s) loop
45 if i > 1 and substr(l_s,i-1,1) = substr(l_s,i,1)
46 and substr(l_s,i,1) != 'C'
47 then
48 -- drop the second of doubled letter except C
49 null;
50 elsif instr(g_vowels,substr(l_s,i,1)) > 0 then
51 -- ignore all except initial vowels
52 if i = 1 then
53 l_r := l_r || substr(l_s,i,1);
54 end if;
55 elsif substr(l_s,i,2) = 'GH'
56 and i < length(l_s)-2
57 and instr(g_vowels,substr(l_s,i+1,1)) = 0
58 then
59 -- a difficult rule:
60 -- silent if in "gh" and not at end or before a vowel
61 null;
62 else
63 -- scan for word patterns
64 for r in 1..g_rules.count loop
65 if cmp_rule(g_rules(r),i,l_s) then
66 l_r := l_r || g_rules(r).f_result;
67 exit;
68 end if;
69 end loop;
70 end if;
71 end loop;
72 return l_r;
73 end generate;
74 --
75 procedure add_rule(p_off integer,p_match varchar2,p_result varchar2)
76 is
77 l_rule_rec rule_rec;
78 begin
79 l_rule_rec.f_off := p_off;
80 l_rule_rec.f_match := p_match;
81 l_rule_rec.f_result := p_result;
82 g_rules(g_rules.count+1) := l_rule_rec;
83 end add_rule;
84 --
85 function cmp_rule
86 (
87 p_rule rule_rec,
88 p_off pls_integer,
89 p_str varchar2
90 ) return Boolean
91 is
92 ch1 char;
93 ch2 char;
94 begin
95 if p_rule.f_match like '%c%' or p_rule.f_match like '%v%' then
96 for i in 1..length(p_rule.f_match) loop
97 ch1 := substr(p_rule.f_match,i,1);
98 ch2 := substr(p_str,p_off+p_rule.f_off+i,1);
99 if ch2 is null then
100 return false;
101 end if;
102 if ch1 = 'v' then
103 if instr(g_vowels,ch2) = 0 then
104 return false;
105 end if;
106 elsif ch1 = 'c' then
107 if instr(g_vowels,ch2) != 0 then
108 return false;
109 end if;
110 elsif ch1 != ch2 then
111 return false;
112 end if;
113 end loop;
114 return true;
115 end if;
116 if p_off <= -p_rule.f_off then
117 return false;
118 end if;
119 return p_rule.f_match
120 = substr(p_str,p_off+p_rule.f_off,length(p_rule.f_match));
121 end cmp_rule;
122 begin
123 -- initialize the rules table
124 -- order is important
125 add_rule(-1,'MB',null);
126 add_rule(0,'B','B');
127 add_rule(0,'CIA','X');
128 add_rule(0,'CH','X');
129 add_rule(0,'CI','S');
130 add_rule(0,'CE','S');
131 add_rule(0,'CY','S');
132 add_rule(0,'C','K');
133 add_rule(0,'DGE','J');
134 add_rule(0,'DGY','J');
135 add_rule(0,'DGI','J');
136 add_rule(0,'D','T');
137 add_rule(0,'F','F');
138 add_rule(0,'GN',null);
139 add_rule(0,'GNED',null);
140 add_rule(0,'GI','J');
141 add_rule(0,'GE','J');
142 add_rule(0,'GY','J');
143 add_rule(0,'G','K');
144 add_rule(-1,'vHc',null);
145 add_rule(-1,'CH',null);
146 add_rule(-1,'PH',null);
147 add_rule(-1,'SH',null);
148 add_rule(-1,'TH',null);
149 add_rule(0,'H','H');
150 add_rule(0,'J','J');
151 add_rule(-1,'CK',null);
152 add_rule(0,'K','K');
153 add_rule(0,'L','L');
154 add_rule(0,'M','M');
155 add_rule(0,'N','N');
156 add_rule(0,'PH','F');
157 add_rule(0,'P','P');
158 add_rule(0,'Q','K');
159 add_rule(0,'R','R');
160 add_rule(0,'SH','X');
161 add_rule(0,'SIO','X');
162 add_rule(0,'SIA','X');
163 add_rule(0,'S','S');
164 add_rule(0,'TIA','X');
165 add_rule(0,'TIO','X');
166 add_rule(0,'TH','0');
167 add_rule(0,'TCH',null);
168 add_rule(0,'T','T');
169 add_rule(0,'V','F');
170 add_rule(0,'Wv','W');
171 add_rule(0,'W',null);
172 add_rule(0,'X','KS');
173 add_rule(0,'Yv','Y');
174 add_rule(0,'Y',null);
175 add_rule(0,'Z','S');
176 end metaphone;
177 /
Package body created.
SQL> select metaphone.generate('stephens') from dual
2 /
METAPHONE.GENERATE('STEPHENS')
STFNSEdited by: Karthick_Arp on Jan 14, 2009 11:29 PM
Similar Messages
-
Encryption of pl/sql package/procedures/function code
Is it possible to make the code inside a package/procedure/function un readable to other users.
As is some of the api package body code in portal ?
thanks in anticipation.
SD,PL/SQL Wrap Utilityhttp://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/c_wrap.htm#LNPLS016
Note, however that you cannot revert back to original un-wrapped code from a code that has been wrapped. You would need access to the original source files to get the original source code. -
Package/procedure/function calls done with in a package
Hi Experts,
Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
It would be great if we can provide a tree like structure of the objects being called/used.
btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
Appreciate your time..
Thanks
Manjumanjukn wrote:
Hi Experts,
Can anybody suggest me the table/ a query to find the package/procedure/function calls (with in the same db or remote) done with in a package.
It would be great if we can provide a tree like structure of the objects being called/used.
btw.. dba_dependencies will provide me the info about the global procedures only not the local ones used with in the package body.
Appreciate your time..What database version do you have?
11g I think provides some sort of fine grained dependency information which can detail packages, but prior to 11g you can only get dependencies on the database objects themselves of which functions/procedures within a package are not, as the package itself is the object.
I don't think there's any easy way to find out from any tables or views and I think third party tools would have to parse the code to determine such things themselves, so that may be one of your only options. -
How can I create packages procedure & function in user-define Library
hi.
i am already created packages procedure & function in database and use so on.
now i would like to create these in library file.
please anyone give me example of any procedure or function to store in library.
thanks
Ali<FONT FACE="Arial" size=2 color="2D0000">> please send me one simple example for create library
then create any function in library.
2nd is any package can be create in library or not??
Thanks S.K
AliHave you checked the link?
A simple example is provided.
I think What I understood from your post is that, you want to put function/ Proc and want to call that as Library ..
Which is not possible.
For exampel an external routine is a third-generation language procedure stored in a
dynamic link library (DLL), registered with PL/SQL, and called by the DBA to perform
special-purpose processing.
In Unix a dynamic link library is known as a shared object (so).
At run time, PL/SQL loads the library dynamically, then calls the routine as if it were a
PL/SQL subprogram. To safeguard our database, the routine runs in a separate address
space, but it participates fully in the current transaction. Furthermore, the routine can
make a call back to the database to perform SQL operations.
To identify a DLL we have to use CREATE LIBRARY command.
The CREATE LIBRARY command is used to create a schema object, library, which
represents an operating-system shared library, from which SQL and PL/SQL can call
external third-generation-language (3GL) functions and procedures.
Learn something more on External Procedures
-SK
</FONT> -
Fitting Package (Fit Function) - Please help!
Hey I'm a noob and I want someone to explain or give me links or just any info regarding:
Fitting Package (Fit Function) - If anyone knows anything about thise please tell me!
Thanks in advance!Hello,
I am not sure what Fitting Package you are referring to. In general, if you are looking for resources to study curve fitting (which I presume is the functionality underlying the Fitting Package you mention), you may want to look at the following site:
http://mathworld.wolfram.com/search/index.cgi?num=&q=curve+fitting
Google is bound to return some useful results by searching relevant keywords as well!
I hope this helps and best of luck!
Best Regards,
JLS
Best,
JLS
Sixclear -
Content Exchange -- Package Upload function not work.
I try to upload a zip file from my computer into the repository by using package upload function in portal. The file size export by ice is 1.09 GB is not work it has error The page cannot be displayed but small file size is work. How can i do?
Hi folks,
same problem here while trying to transport a large KM package (28GB à 2GB volumes) from EP 7.0 to EP 7.31 SP6. The package upload iView in my target system EP 7.31 crashs with "This page cannot be displayed". I cant find any appropriate exceptions in NWA.
I guess ICE transport isnt an option at all for transporting KM content from 7.0 to 7.31 (http://scn.sap.com/thread/3249426), but i tryed it also, without any success, same behaviour. As i stringent need all metadata (ACL's for example), WebDAV is probably also not reasonable, as far i know you cant transport KM metadata with this method.
Unfortunately Detlev`s link dont works, so i cant get any clues from there. I also tryed to split one KMC archive in volumes à 100MB, but it dont works, because the following volumes are not uploaded and i cant see any KM packages at all.
So, i know i can create smaller KM packages manually, but regarding the data amount its extremly time-consuming. I cant imagine our colleagues from SAP AG are regarding the case of a KM import of large files as realistic, but dont give us a working option to import them. Does anybody have any idea how to handle this issue? Thank you in advance,
best regards -
After migrating Data from one 11g server to a new one, restart SOA EM, error persists background:
background server is still reporting: "<Warning> <oracle.integration.platform.blocks.event.saq> <SOA-31013> <Error handling message (rolling back).
java.sql.SQLException: ORA-06575: Package or function EDN_DEQUEUE_OAOO_DELIVERY is in an invalid state
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:74)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:135)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:210)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:473)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:423)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1095)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:201)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1036)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1379)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3568)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3739)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:8150)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1535)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.readOAOODelivery(SAQBusinessEventBus.java:1302)
at
oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.handleSingleOAOODelivery(SAQBusinessEventBus.java:750)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.handleQueueEvents(SAQBusinessEventBus.java:669)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus.access$000(SAQBusinessEventBus.java:71)
at oracle.integration.platform.blocks.event.saq.SAQBusinessEventBus$1.run(SAQBusinessEventBus.java:319)
at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)"
===================================================
We found the EDN_DEQUEUE_OAOO_DELIVERY is a storage process, it failed after re-complied, details as below:
SQL> alter procedure DEV_SOAINFRA.EDN_DEQUEUE_OAOO_DELIVERY compile;
Warning: Procedure altered with compilation errors.
SQL> show error;
Errors for PROCEDURE DEV_SOAINFRA.EDN_DEQUEUE_OAOO_DELIVERY:
LINE/COL ERROR
2/9 PL/SQL: Item ignored
2/9 PLS-00201: identifier 'DBMS_AQ' must be declared
3/10 PL/SQL: Item ignored
3/10 PLS-00201: identifier 'DBMS_AQ' must be declared
8/3 PL/SQL: Statement ignored
8/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
9/3 PL/SQL: Statement ignored
9/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
LINE/COL ERROR
10/3 PL/SQL: Statement ignored
10/3 PLS-00320: the declaration of the type of this expression is
incomplete or malformed
12/3 PL/SQL: Statement ignored
12/59 PLS-00320: the declaration of the type of this expression is
Anybody have any suggestion will be highly appreciated.
Thanks,
KatherineI did what could be the reason?Did it compile successfully? Do you still get the same error?
What is the status of the package now?
SQL> select owner, object_type, status
from dba_objects
where object_name = '<PACKAGE NAME>';The package may have been invalidated for different reasons (like editing the code without compiling it, one of more the objects referenced in the package became invalid, new columns added to tables/views which are used by the package, ..etc).
Thanks,
Hussein -
Package,procedure,functions
Iam having one requirement. i.e. i want know which package,procedure,function is calling....?
for ex:
procedure a
-- p1
call_procedure_b;
-- p2
call_procedure_c;
at p1,p2 i want to know which is being called?
is there any possibiliyt like that?
can anybody help me on this?user632359 wrote:
can u please provide me with an example?Here's some code someone posted a while back (can't remember who), but I saved it for a rainy day...
create or replace procedure who_called_me( owner out varchar2,
name out varchar2,
lineno out number,
caller_t out varchar2 )
as
call_stack varchar2(4096) default dbms_utility.format_call_stack;
n number;
found_stack BOOLEAN default FALSE;
line varchar2(255);
cnt number := 0;
begin
loop
n := instr( call_stack, chr(10) );
exit when ( cnt = 3 or n is NULL or n = 0 );
line := substr( call_stack, 1, n-1 );
call_stack := substr( call_stack, n+1 );
if ( NOT found_stack ) then
if ( line like '%handle%number%name%' ) then
found_stack := TRUE;
end if;
else
cnt := cnt + 1;
-- cnt = 1 is ME
-- cnt = 2 is MY Caller
-- cnt = 3 is Their Caller
if ( cnt = 3 ) then
lineno := to_number(substr( line, 13, 6 ));
line := substr( line, 21 );
if ( line like 'pr%' ) then
n := length( 'procedure ' );
elsif ( line like 'fun%' ) then
n := length( 'function ' );
elsif ( line like 'package body%' ) then
n := length( 'package body ' );
elsif ( line like 'pack%' ) then
n := length( 'package ' );
elsif ( line like 'anonymous%' ) then
n := length( 'anonymous block ' );
else
n := null;
end if;
if ( n is not null ) then
caller_t := ltrim(rtrim(upper(substr( line, 1, n-1 ))));
else
caller_t := 'TRIGGER';
end if;
line := substr( line, nvl(n,1) );
n := instr( line, '.' );
owner := ltrim(rtrim(substr( line, 1, n-1 )));
name := ltrim(rtrim(substr( line, n+1 )));
end if;
end if;
end loop;
end;
create or replace function who_am_i return varchar2
is
l_owner varchar2(30);
l_name varchar2(30);
l_lineno number;
l_type varchar2(30);
begin
who_called_me( l_owner, l_name, l_lineno, l_type );
return l_owner || '.' || l_name;
end;
/ -
Idea for package/procedure/function distribution ??
Hi all
We have multilple databases (10.2.0.3). And we have a lot of "utility" packages for both appl. util and for DBA utils.
We have created a XXXUTIL schema on each database.
How do we keep those schemas in sync automatically - apart from doing export/import? We will name on "master" and all other should be in sync with this one schema (packages/procedures/functions/views)
Is there a smarter way of doing this, a pull or push replication solotiuon. We are on the 10g Enterprise verison.
Ideas appreciated
best regards
MetteHi,
As you said you got a lot of utility Packages, I think you can directly compile those scripts one you changed in the master DB, there won't be any thing to Sync the Procedures from One DB to another DB.
If it is a data then, you might gone for DB Link, Streams etc., for replicating the data.
In order to automate your need to write a script for logging into DB and running set of scripts and disconnecting - a shell script.
Just think is that your requirement.!!
Pavan Kumar N -
Instantiation order: package , class , function
hello;
I have a document class, booger.as:
package
trace( "package " );
import flash.display.Sprite;
public class booger extends Sprite
trace( "class " );
public function booger ()
{ trace( "function " );
I would expect the firing order to be:
package
class
function
but the output says otherwise:
class
package
function
any thoughts?
thanks
dsdsdsdsdSweet! Thanks. I am not used to creating an instance of a
class since my background is from mostly VBA programming. I had the
import statement, but not the variable creating an instance of my
timer class. I kept trying to simply call the function by using its
name in the click event of a button. It all makes sense now. -
BI 7.0 Bex Analyzer Workbook - Convert to formula function features
Hello,
when using the convert to formula function in a BI 7.0 Bex Analyzer Workbook (WB) the result area becomes completely static.
1.) Is there a possibility to add drill downs / across into an already converted to formula WB?
2.) I inserted drop down boxes to allow F4 like selections, however those are pointless if several characteristics are being used i.e. the keyfigure results get blanked out. Is there another way to do this at all?
3.) Could someone provide me with a real live example / whitepaper how the convert to formula function can be used?
Many thanks for any feedback on this.
Regards
Christian>
ChrisAC wrote:
>
> 3.) Could someone provide me with a real live example / whitepaper how the convert to formula function can be used?
>
> Many thanks for any feedback on this.
>
> Regards
>
> Christian
It does become static and all the workbook gets all the excel property.
The key figures are now calulated on the basis of your data provider from the server as a formula in each cell..
I had used to populate my key figure only for the required values of a characteristic. -
When I click the button Subscribe now, it return: "Sorry, this Adobe product is currently not available for sale in your country."
That means I cannot Convert to DOC function??Adobe Reader is free; there is no trial.
Regarding the ExportPDF service; see https://forums.adobe.com/docs/DOC-2596
If ExportPDF is not available in your country, you will need to use Acrobat to convert; there is a 30-day trial available for Acrobat.
If you do have the Acrobat trial install, make sure you open the PDF to convert in Acrobat, not Adobe Reader. -
API/package/procedure/function for updating physical attributes in Org/Mast
I need some kind of procedure or function for updating the weight, volume, and dimensions in the organization and master items forms. We have almost 350,000 items and I want to update them in batch. Is there an API of some kind for this? I would do a simple update but I want to make sure there's no additional logic necessary (other tables that are updated during the process of updating those fields, etc).
Thanks!here is for API's you need to check...
You can use Decimal & UOM Quantity API
These APIs are used to handle item decimal quantities:
Convert from one UOM to another
Validate quantities at input time
Validate quantities at display/output time
Quantity Comparison
Get UOM information
For your convenience, I am giving you the API as below:
/*===========================================================================+
| Copyright (c) 1999 Oracle Corporation |
| Redwood Shores, California, USA |
| All rights reserved. |
+===========================================================================*/
/*-----------------------------------------------------------------------+
|This package contains procedures relevent to item decimal quantity |
|processing. This package contains routines to: |
|(1)validate item quantities based on UOM and decimal precision rules |
|(2)validate whether the UOM controls and decimal precision rules |
| themselves are correct based on functionality planned. For reviewing|
| UOM and decimal quantity functional design details, please visit the|
| following URL: |
| "http//apps-us.oracle.com/inv/development/designs_120/ |
| decimal_precision/decimal_precision.html" |
|But here are a few basics to give background context: |
| |
| "Item Quantity" -- The item's quantity is described by the item |
| identifier, the unit of measure (e.g. grams, kilos, etc), and a |
| number value to indicate the amount in that unit of measure. |
| |
| "Unit of Measure" -- Units of measure belong to unit of measure |
| classes(e.g. weight, volume, length, etc). Each unit of measure class|
| has actual units of measure that belong to that class (e.g. the |
| weight class may have units of measures like, "grams", "kilos", etc).|
| |
| "UOM Conversion" --Users can set up conversion rates between UOMs in |
| them same UOM class, by defining conversions to the base UOM. These |
| are standard conversions. Item-level intra-class conversions may also|
| be defined. When doing intra-class conversions, item-level |
| intra-class conversions are used first if defined, and then standard |
| conversions are used. |
| Users can define inter-class conversions. Inter-class Conversions may|
| also be defined at the lot/sublot levels. For inter-class conversions|
| sublot, lot, and then item inter-class conversions will be used in |
| in order. If lot-lvel conversion is not defined, then item-level |
| conversion is used. A strict hierarchy is imposed. |
| |
| "TU" -- Trasactable Unit.A UOM may have a TU. This implies |
| that when transacting in this UOM, any item's quantities will be |
| forced to be integer multiples of this TU quantity. The TU may also |
| be declared at the item level. The TU quantity at the item level may |
| be different from the UOM level TU, and if defined, item level TU |
| takes precedance. |
| |
| "Decimal Precision"--Users have a choice of setting decimal precision|
| at the base UOM for each UOM class. All other UOMs in that class get |
| get their decimal precisions derived from the base UOM decimal |
| precision, the converison rate, and TUs, if they are |
| being used. |
| |
| |
| "Conversion Rate Tolerance" -- This is a tolerance that may be set |
| when conversion rate cannot be not strictly fixed. Example: |
| 1 Chicken = 2 pounds (plus or minus 0.7 pounds). This 0.7 pounds is |
| the conversion rate tolerance. Conversion rate tolerance is only |
| definable at inter-class UOM conversions, at item or lot/sublot level|
| |
| History |
| 04/08/99 Mansoor Jafri Created Package Spec |
| 04/26/99 Mansoor Jafri Updated with TU at 3 levels as |
| opposed to MTU at 2 and atomic at|
| UOM class level. |
| 04/29/99 Mansoor Jafri Updated document with lot/sublot |
| conversions. Also, removed |
| "atomic" as a separate control, |
| since this can |
| implemented as a TU at base UOM |
| level with an integer quantity. |
| 05/03/99 Mansoor Jafri Updated the package with sublot |
| level control. Also, changed name|
| of DTU to TU, so that it fits |
| better in the "process" market. |
| Also, conformed to BOI API stds. |
+-----------------------------------------------------------------------*/
SET VERIFY OFF
WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
CREATE OR REPLACE PACKAGE inv_decimals_pub AS
/* $Header: INVDECPS.pls 118.3 99/05/03 18:12:27 mjafri noship $ */
/*--------------------------------------------------------------------------+
|Procedure validate_compare_quantities(..)
|Returns the quantity converted from the first UOM in the second UOM.
|If quantities in 2 UOMs are already available, then this procedure will
|compare and validate these quantities based on conversion rates
|and UOM and decimal qty controls. This procedure may be used to validate
|scenarios where quatities are entered in dual UOMs. We want to make sure
|quantities are valid based on conversion, TUs, and conversion
|rate tolerances.
|
|Procedure validate_and_compare(
|p_api_version_number IN NUMBER, -- version # of API
|p_init_msg_list IN VARCHAR2, -- whether to initialize list
|p_inventory_item_id IN NUMBER, -- inventory_item_id
|p_organization_id IN NUMBER, -- organization_id
|p_lot_control_code IN NUMBER, -- item's lot control code
|p_lot_number IN VARCHAR2, -- lot number
|p_sub_lot_control_code IN NUMBER, --sub lot control code
|p_sublot_number IN VARCHAR2, -- sublot number
|p_from_quantity IN NUMBER, -- qty in first UOM
|p_from_uom_code IN VARCHAR2, -- UOM of fisrt qty
|p_to_uom_code IN VARCHAR2, -- UOM of second qty
|p_to_quantity_to_check IN NUMBER, -- qty in second UOM
|x_resultant_to_quantity OUT NUMBER, -- calculated qty in second UOM
|x_comparison OUT NUMBER,--Possible values are 1,0,-1,-99
|x_msg_count OUT NUMBER, -- number of messages
|x_msg_data OUT VARCHAR2, -- populated,if msg count = 1
|x_return_status OUT VARCHAR2) -- return status
|
|Note: The comparisons are done in base UOM
| of the UOM class to which the first UOM belongs. x_comparison returns:
|-1 if from_quantity is less than to_quantity (A < B)
| 0 if from_quantity is equal to to_quantity (A = B)
| 1 if from_quantity is greater than to_quantity (A > B)
| -99 if the validations for the first/second quantity failed
| If the UOMs belong to different classes, then users can specify whether
| they want to use the effective interclass UOM conversion tolerance, say, T.
| CASE: p_use_interclass_tolerance = 1
| ------
| Q1 > Q2 if (Q1 - Q2) >= T
| Q1 = Q2 if ABS(Q1 - Q2) < T
| Q1 < Q2 if (Q1 - Q2 ) <= -T
|
|The output variable x_resultant_to_quantity will contain the converted
|quantity
|in the second UOM, using effective conversion rates.
|Usage: In a dual UOM scenario, this api will confirm whether quantities in
|the two UOMs are equal or not, based on x_comparison output variable.
+--------------------------------------------------------------------------*/
Procedure validate_compare_quantities(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCHAR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
p_from_quantity IN NUMBER,
p_from_uom_code IN VARCHAR2,
p_to_uom_code IN VARCHAR2,
p_to_quantity_to_check IN NUMBER,
x_resultant_to_quantity OUT NUMBER,
x_valid_conversion OUT NUMBER,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2);
/*--------------------------------------------------------------------------+
|Function convert_UOM(..) return NUMBER ;
|Returns the quantity converted from the first unit into the second unit.
|If conversion is not possible, return status is failure.
|Function convert(
|p_api_version_number IN NUMBER,
|p_init_msg_list IN VARCHAR2, -- whether to initialize list
|p_inventory_item_id IN NUMBER, -- inventory_item_id
|p_organization_id IN NUMBER, -- organization_id
|p_lot_control_code IN NUMBER, -- item's lot control code
|p_lot_number IN VARCHAR2, -- lot number
|p_sub_lot_control_code IN NUMBER,
|p_sublot_number IN VARCHAR2,
|p_from_quantity IN NUMBER, -- qty in first UOM
|p_from_uom_code IN VARCHAR2, -- UOM of fisrt qty
|p_to_uom_code IN VARCHAR2, -- UOM of second qty
|x_msg_count OUT NUMBER,
|x_msg_data OUT VARCHAR2,
|x_return_status OUT VARCHAR2)
| return NUMBER ;
|If there is an error, then -99 is returned.
|1) From_quantity must be an absolute value.
|2) From_quantity will be truncated to decimal precision in the from UOM, then
| converted to base UOM in the class,
|3) Then converted to base UOM of the
| to_UOM class,
|4) Then converted to the quantity in to_UOM,
|5) Then truncated to decimal precision of the to_UOM.
+--------------------------------------------------------------------------*/
Function convert_UOM(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCHAR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
p_from_quantity IN NUMBER,
p_from_uom_code IN VARCHAR2,
p_to_uom_code IN VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2) return NUMBER ;
/*--------------------------------------------------------------------------+
| get_uom_properties(..)
| This procedure is used to interrogate the UOM.
| It returns:
| (1) decimal precision at the UOM level
| (2) TU, if defined, at the UOM level
| (3) Atomicity, if defined for the class that this UOM belongs to
| If some of the controls are not defined, null values are returned.
| if the UOM is not found, the return status indicates this.
| Procedure get_uom_properties(
| p_api_version_number IN NUMBER,
| p_init_msg_list IN VARCHAR2,
| p_uom_code IN VARCHAR2,
| x_decimal_precision OUT NUMBER,
| x_uom_TU OUT NUMBER,
| x_uom_class OUT VARCHAR2,
| x_msg_count OUT NUMBER,
| x_msg_data OUT VARCHAR2,
| x_return_status OUT VARCAHR2);
+--------------------------------------------------------------------------*/
Procedure get_uom_properties(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_uom_code IN VARCHAR2,
x_decimal_precision OUT NUMBER,
x_uom_TU OUT NUMBER,
x_uom_class OUT VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCAHR2);
/*-------------------------------------------------------------------------+
| get_item_uom_properties(..)
| This procedure returns a specific item's primary UOM, TU, and tolerance
| Procedure get_item_uom_properties(
| p_api_version_number IN NUMBER,
| p_init_msg_list IN VARCHAR2,
| p_inventory_item_id IN NUMBER,
| p_organization_id IN NUMBER,
| p_lot_control_code IN NUMBER, -- item's lot control code
| p_lot_number IN VARCHAR2,
| p_sub_lot_control_code IN NUMBER,
| p_sublot_number IN VARCHAR2,
| x_primary_uom_code OUT VARCHAR2,
| x_uom_class OUT VARCHAR2,
| x_decimal_precision OUT NUMBER,
| x_item_TU OUT NUMBER,
| x_uom_TU OUT NUMBER,
| x_effective_TU OUT NUMBER,
| x_msg_count OUT NUMBER,
| x_msg_data OUT VARCHAR2,
| x_return_status OUT VARCHAR2 );
| If the item is not a valid one, then this is reflected through the
| return status.
+-------------------------------------------------------------------------*/
Procedure get_item_uom_properties(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCHAR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
x_primary_uom_code OUT VARCHAR2,
x_uom_class OUT VARCHAR2,
x_decimal_precision OUT NUMBER,
x_item_TU OUT NUMBER,
x_class_TU OUT NUMBER,
x_uom_TU OUT NUMBER,
x_effective_TU OUT NUMBER,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2 );
/*-------------------------------------------------------------------------+
| Procedure compare_quantities(..)
| Procedure compare_quantities(
| p_api_version_number IN NUMBER,
| p_init_msg_list IN VARCHAR2,
| p_inventory_item_id IN NUMBER,
| p_organization_id IN NUMBER,
| p_lot_control_code IN NUMBER,
| p_lot_number IN VARCHAR2,
| p_sub_lot_control_code IN NUMBER,
| p_sublot_number IN VARCHAR2,
| p_fisrt_qauantity IN NUMBER,
| p_first_uom IN VARCHAR2,
| p_second_quantity IN NUMBER,
| p_second_uom IN VARCHAR2,
| p_use_interclass_tolerance IN VARCHAR2, -- Yes = 1, 2 = No
| x_comaprison_result OUT NUMBER,
| x_msg_count OUT NUMBER,
| x_msg_data OUT VARCHAR2,
| x_return_status OUT VARCHAR2);
|
| This procedure compares the quantities A and B and returns result in the
| output variable x_comparison_result. The comparisons are done in base UOM
| of the UOM class to which the first UOM belongs:
|-1 if quantity A is less than quantity B (A < B)
| 0 if quantity A is equal to quantity B (A = B)
| 1 if quantity A is greater than quantity B (A > B)
| If the UOMs belong to different classes, then users can specify whether
| they want to use interclass UOM conversion tolerance, say, T.
| CASE: p_use_interclass_tolerance = 1
| ------
| Q1 > Q2 if (Q1 - Q2) >= T
| Q1 = Q2 if ABS(Q1 - Q2) < T
| Q1 < Q2 if (Q1 - Q2 ) <= -T
+------------------------------------------------------------------------*/
Procedure compare_quantities(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCAHR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
p_fisrt_qauantity IN NUMBER,
p_first_uom IN VARCHAR2,
p_second_quantity IN NUMBER,
p_second_uom IN VARCHAR2,
p_use_interclass_tolerance IN VARCHAR2,
x_comaprison_result OUT NUMBER,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2);
/*-----------------------------------------------------------------------+
| Procedure Validate_Quantity(
| p_api_version_number IN NUMBER,
| p_init_msg_list IN VARCHAR2,
| p_inventory_item_id IN NUMBER,
| p_organization_id IN NUMBER,
| p_lot_control_code IN NUMBER,
| p_lot_number IN VARCHAR2,
| p_sub_lot_control_code IN NUMBER,
| p_sublot_number IN VARCHAR2,
| p_input_quantity IN NUMBER,
| p_UOM_code IN VARCHAR2,
| x_msg_count OUT NUMBER,
| x_msg_data OUT VARCHAR2,
| x_return_status OUT VARCHAR2);
|
| Validates and returns the quantity in this manner (the caller does not need
| to adjust the result):
| 0. Truncate to and validate decimal precision
| 1. Validate quantity with respect to TU controls.
+-------------------------------------------------------------------------*/
Procedure Validate_Quantity(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCAHR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
p_input_quantity IN NUMBER,
p_UOM_code IN VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2);
/*------------------------------------------------------------------------+
| Function Truncate_Quantity(
| p_api_version_number IN NUMBER,
| p_init_msg_list IN VARCHAR2,
| p_inventory_item_id IN NUMBER,
| p_organization_id IN NUMBER,
| p_lot_control_code IN NUMBER,
| p_lot_number IN VARCHAR2,
| p_sub_lot_control_code IN NUMBER,
| p_sublot_number IN VARCHAR2,
| p_input_quantity IN NUMBER,
| p_UOM_code IN VARCHAR2,
| x_msg_count OUT NUMBER,
| x_msg_data OUT VARCHAR2,
| x_return_status OUT VARCHAR2) return NUMBER;
|
| Truncates the quantity to decimal precision of the UOM.
| In case of error conditions, -99 is returned.
+------------------------------------------------------------------------*/
Function Truncate_Quantity(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
p_inventory_item_id IN NUMBER,
p_organization_id IN NUMBER,
p_lot_control_code IN NUMBER,
p_lot_number IN VARCHAR2,
p_sub_lot_control_code IN NUMBER,
p_sublot_number IN VARCHAR2,
p_input_quantity IN NUMBER,
p_UOM_code IN VARCHAR2,
x_msg_count OUT NUMBER,
x_msg_data OUT VARCHAR2,
x_return_status OUT VARCHAR2) return NUMBER;
* show errors package INV_DECIMALS_PUB
* SELECT to_date('SQLERROR') FROM user_errors
* WHERE name = 'INV_DECIMALS_PUB'
* AND type = 'PACKAGE';
commit;
exit; -
How to find out Unused Packages/Procedures/Functions/Triggers
Hi,
I have one database. This database is with 7 schemas. Around 1000 triggers are associated with each schema. But the application is using only some triggers.
How to find out the used triggers? Apllications is developed in J2EE.
Same way I want to find out the for Packages/Procedures and Functions.
Any easy way is available?
Please help me.
regards
MathewHi,
>Audit the execution event on the objects by access.
Kindly explain how to enable this auditing.
regards
Mathew -
Business packages, Business Functions and Business Components
Dear All,
I am new to ESS/MSS.
We are going to implement the following applications. (Company is Indian based).
Version : EHP6 and Portal 7.3
1. Employee Search
2. Personal Information
2. Working Time
3. Benefits and Payments (Reimbursements, Salary Advance, URL iviews have to create for PF and ESI)
4.Travel Management (No 3rd party integration for booking tickets)
5. Performance Management Systems (360* Degree Appraisal)
6. E- Separation
7. Corporate Information
8. E- Recruitment
9. MSS
What are the Business Packages have to deploy?
What are the Business Functions have to deploy?
What are the Business Components have to deploy?
Regards
SomuWhat are the Business Packages have to deploy?
In portal side you need to deploy the below packages.
-> BP ERP05 ESS 1.41
-> BP ERP05 MSS 1.51
-> BP ERP05 COMMON PARTS 1.51
-> BPERPESSWDA1.50
-> BP MSS ADDON 1.0
-> BP Recruiter
-> BP Recruiter Administrator
If you want implement TMS applications then you required below BP's
-> BP ERP TMS 1.51
-> BP ERP05 TALENT DEV 1.01
And the components should be SP level compatibility with SAP ECC system
-> SAP ESS
-> SAP MSS
-> SAP PCUI_GP
What are the Business Functions have to deploy?
You need to activate the below BF's in ECC HR system
HCM_ESS_CI_1
HCM_ESS_WDA_1
HCM_ESS_WDA_2
HCM_MSS_WDA_1
HCM_MSS_WDA_2
FIN_TRAVEL_1
FIN_TRAVEL_2
FIN_TRAVEL_3
HCM_ASR_CI_1
HCM_ASR_CI_2
HCM_ASR_CI_3
HCM_ECM_CI_1
HCM_ECM_CI_2
HCM_LSO_CI_1
HCM_LSO_CI_2
HCM_LSO_CI_3
HCM_OSA_CI_1
HCM_OSA_CI_2
HCM_PD_UI_1
HCM_TMC_CI_1
HCM_TMC_CI_2
CA_HAP_CI_1
HCM_OSA_CI_1
HCM_OSA_CI_2
HCM_TMC_CI_1
HCM_TMC_CI_2
HCM_HCP_CI_1
HCM_ECM_CI_2
HCM_ERC_CI_4
HCM_PD_UI_1
FIN_CO_MSSBUA_NWBC
FIN_REP_SIMPL_1
ERP_ENTERPRISESEARCH
What are the Business Components have to deploy?
In ECC side import the addon components based on your system component levels.
MSS Addon 1.0
ERECRUTIMENT
Maybe you are looking for
-
Multiple choice question in intractive pdf?
Hi, I have a question about Multiple option question. How to create Multiple option single answer question with explanation popup in interactive PDF. Please guide me. Regards Anil
-
HI All, I have two output types NEU and ZMK1 defined for PO.I maintain condition record for ZMK1 which has only got purchasing org(0010) in the access sequence for a particular vendor XYZ. I also maintain condition record for NEU with access sequence
-
Adobe Flash crashes almost instantly. it is upto date and enabled. Help
I have uninstalled it and reinstalled it with no change. I send a crash report every time. Don't know what to do! Help please.
-
What Version of Flash should I use for XP Version 2002???
I have an older PC with base XP on it and I am having trouble installing/running flash. Can anyone tell me what version of Flash that will support my old PC running Windows XP Professional Version 2002??? Everything else is working fine except for Fl
-
HT4859 my Itunes is not working?
What should I do when I don't know my passcode on my Ipod touch and my Itunes is not working?