Help regarding function
hi all ,
i have created function
CREATE OR REPLACE FUNCTION Strsplit (
str IN VARCHAR2
, start IN PLS_INTEGER
, end IN PLS_INTEGER
, inclusive_in IN BOOLEAN
RETURN VARCHAR2
ISand cal this fun as
SELECT Strsplit('abcdefgh',1,6,FALSE) FROM dual
but it gives me error : ora00904 - FALSE invalid identifier.
please help
And we're supposed to guess where the exception occurs?...how about posting the function?....
Similar Messages
-
ABAP Programing help regarding function modules coding
Hi,
i'm currently creating a function module that retrieve a number from a table and add one to it and return back the value to the table.
the codes are as follow:
FUNCTION ZFM_NUMBER
" * " Local Interface:
" EXPORTING
" VALUE (ZZNUMBER) TYPE ZNUMBER
" VALUE (ZENUMBER) TYPE ZNUMBER
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
END FUNCTION.
this function module works finely, but now i need to concatenate the number with the year to store it into another table.
i know something about the sysdatum where i select only the first 4 characters...but i'm not sure how could i do that?
do i need to create another function module to call the above function module and concatenate it with the year?
or i just need to continue the codes in the same function module?
and how should i code it?
i'm very new to abap coding and i could'nt get help from anyone in my team. your help is very much appreciated!!!
Thanks,
leesyyhi you can do it in the same function module.
SELECT ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
END SELECT.
instead of the above statement use the following statement, it improves performance of your program
SELECT single ZNUMBER FROM ZTAB_NUM into ZZNUMBER.
in the above statement you can also specify some where condition
ZENUMBER = ZZNUMBER + 1.
UPDATE ZTAB_NUM SET ZNUMBER = ZENUMBER WHERE ZNUMBER = ZZNUMBER.
data: var_date type sy-datum,
var_yyyy(4) type c,
var_numyear(10) type c.
var_date = sy-datum.
var_yyyy = var_date+0(4).
concatenate ZENUMBER var_yyyy into var_numyear.
UPDATE ZTAB_NUMyear SET ZNUMyear = var_numyear WHERE ZNUMBER = ZZNUMBER.
Regards
Sajid
Edited by: shaik sajid on Jan 14, 2010 5:08 AM
Edited by: shaik sajid on Jan 14, 2010 5:09 AM -
Please Help regard function that will return values of each JComboBox items
I'd like to create a function that will return values of each item on the JComboBox at a time when
I click on each item of a comboBox. I had this following codes, but didn't work.
Please help me !!!Please correct it... thanks a million
String wp;
String text;
String A[] = {"WARNIGNS","CAUTIONS","NOTES"};
JComboBox ABC = new JComboBox();
for (int i=0;i<A.length;i++) {
ABC.addItem (A);
text = Get_It(); //assigns each value of JComboBox's item to variable text when clicks at each item
//of a comboBOx
private String Get_It(){
ABC.addActionListener(new ActionListener (){
public void actionPerformed(ActionEvent e){
wp = (String)CBweapon.getSelectedItem() ;
return wp;import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class AlertFrame extends JFrame {
String s_alert[] ={"WARNIGNS","CAUTIONS","NOTES"};
JComboBox CBweapon;
String wpText;
public AlertFrame() {
super("Alerts");
Container contentPane = getContentPane();
contentPane.setLayout(null);
setSize(600,600);
CBweapon = new JComboBox();
for (int i=0;i<s_weapon.length;i++) {
CBweapon.addItem (s_weapon);
contentPane.add(CBweapon);
CBweapon.setActionCommand("");
//set position for components
CBweapon.setBounds(370 + insets.left,295+ insets.top, 150,30);
System.out.println(getit()); //calling getit() function
//this function will be return a String of JcomboBOx value if click on each item of combobox
private String getit(){
CBweapon.addActionListener( new ActionListener (){
public void actionPerformed(ActionEvent e){
wpText = (String)CBweapon.getSelectedItem() ;
return wpText;
public static void main(String args[]) {
AlertFrame af = new AlertFrame();
af.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
**I have no errors on compile or run, but it didn't return a string value to System.out.println(getit());
It maybe because of the "void" of public void actionPerformed(ActionEvent e){
wpText = (String)CBweapon.getSelectedItem() ;
Please help me -
Help regarding MBeanServerConnection queryName function
Hi guys, i recently start using JMX and i need some help regarding queryName function. I want to get a specific set of objectNames, not all of them.
I have the following List of Beans
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=14b69d-eee40f3d6467,name=LoadBalancerServer
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=40-a0b2-f1dfb314406f,name=LoadBalancerServer
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=98-4af4-9147-bf45fb49c044,name=LoadBalancerServer
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers,serverId=c-4bf6-9c42-d5c3acea6662,name=LoadBalancerServer
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,name=LoadBalancerListener
ObjectName = WowzaMediaServerPro:loadBalancer=LoadBalancer,name=LoadBalancerRedirector
ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=IOPerformance
ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=MediaCache
ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=PendingReadAheadRequestTracker
ObjectName = WowzaMediaServerPro:mediaCache=MediaCache,name=PendingWriteRequestTracker
ObjectName = WowzaMediaServerPro:name=Connections
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=Connections
ObjectName = WowzaMediaServerPro:name=HandlerThreadPool
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=HandlerThreadPool
ObjectName = WowzaMediaServerPro:name=IOPerformance
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=IOPerformance
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=IOScheduler
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=chat,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=default,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=file,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=live-record-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-buffer,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-edge-origin,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=liverepeater-origin,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=netconnection,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-buffer-record-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtp-live-record-lowlatency,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=rtpout,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-buffer,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-buffer-record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,streamTypes=StreamTypes,streamTypeName=shoutcast-record,name=Properties
ObjectName = WowzaMediaServerPro:vHosts=VHosts,vHostName=_defaultVHost_,name=Properties
ObjectName = WowzaMediaServerPro:name=Server
ObjectName = WowzaMediaServerPro:name=ServerNotifications
My question is that , how can i get those rows that contains "WowzaMediaServerPro:loadBalancer=LoadBalancer,loadBalancerServers=LoadBalancerServers"?
Please helpHello ,
There should be a number of BRF+ tutorials available in SCN which discuss the FDT APIs. You can have a look at them to get an idea of the various APIs available and their uses.
For your usecase, you should do the following.
lo_fdt_function TYPE REF TO if_fdt_function,
lo_fdt_result TYPE REF TO if_fdt_result,
* Get function handle
CALL METHOD lo_fdt_factory->get_function
EXPORTING
iv_id = lv_function_id
RECEIVING
ro_function = lo_fdt_function.
where lv_function_id is the GUID of the BRF+ function . You can either make it a constant , or you can use a FDT API to get the function GUID from the BRF+ application name and function name.
* Set function context
TRY.
CALL METHOD lo_fdt_context->set_value
EXPORTING
iv_id =
ia_value =
This is one way to set the input context ( pass the input to the BRF+ function to process ). There are other ways to do this as well. Which one you use would depend on the kind of input you want to pass.
* Execute BRFPLUS function
TRY.
CALL METHOD lo_fdt_function->process
EXPORTING
io_context = lo_fdt_context
IMPORTING
eo_result = lo_fdt_result.
* Get result output
TRY.
CALL METHOD lo_fdt_result->get_value
IMPORTING
ea_value =
Another direct way of doing it would be to use the method PROCESS of the class CL_FDT_FUNCTION_PROCESS.
I have not gone into much explaination here , but it should provide you an idea of how you can go about it.Read the SCN docs on the APIs to get a better idea , or better still if you can get hold of a copy of the BRF+ book by Carsten Ziegler , you will get an end to end explaination of all BRF+ APIs in it.
Regards,
Indranil. -
Need help regarding Java decoding of IMAP attachment (IOStream related ques
Hi ,
I need some help regarding the processing of an IMAP attachment , It is a basic IOStream related question I guess.
I have some attachment to a mail , I try to fetch it using javamail and read the content and write it to a file , I was able to do it successfully when I was using stream.read( tempBuffer) function but when I started using stream.read( tempBuffer, 0, m_maxDataSize ); it is giving me following exception
java.io.IOException: Error in encoded stream: needed at least 2 valid base64 characters, but only got 1 before padding character (=), the 10 most recent characters were: "/59PT/eXQ="
at com.sun.mail.util.BASE64DecoderStream.decode(BASE64DecoderStream.java:259)
at com.sun.mail.util.BASE64DecoderStream.read(BASE64DecoderStream.java:148)
***Here is the snippet of code that is running this:***
m_contentObj = m_message.getContent();
if(m_contentObj instanceof InputStream)
System.out.println(" Content is type of InputStream");
InputStream stream = (InputStream) m_contentObj;
byte[] tempBuffer = new byte[m_maxDataSize];
stream.skip( m_currPos );
int bytesRead=stream.read( tempBuffer, 0, m_maxDataSize );
System.out.println(" Read the following no of bytes from the Object::"+bytesRead);
m_currPos+= bytesRead;
Please suggest what to do.
Thanks & Regards
SaurabhBUMP, just incase its been missed by a new board member
-
query regarding function module SPOOL_RQ_READ_BAPI_EXPORTS (EBP-SRM Module)
shopping cart
Hi in FM SPOOL_RQ_READ_BAPI_EXPORTS
i want to relate the internal tables requisition_items and requisition_services.
but in am not getting the key on which they should be joined
here i have to take the quantity and other fields from requisition_services
right now i am using the joining condition as
requisition_items-pckg_no = requisition_services-pckg_no.
any help in this regard is welcome.
Thanks and regards,
VithalprasadHi Kathirvel,
Thank you for reply. I am making changes for standard code only.
" Call FM SPOOL_DPO_READ_BAPI_EXPORTS to read PO data exported to backend.
Use this data to call FM B46B_DPO_TRANSFER and copy errors tab from
' lt_bapi_return ' to ' et_messages' retrun tab in 'doc_check' badi. "
Thank you.
Regards, Sunu -
Need help regarding the dunning form
Hi,
I have to display all the sales and payments of a cusomter for all the periods that are older than the run date in a dunning form. (i.e) if the run date is 04-aug-05 and if the slaes are there in 3 months(april, May, july) then i have to display three line items with sales and payments for that corresponding three months in the line items. As this is a dunning form i cannot change the print program. any table which have all the sales for a period which i can access directly in the script. can anyone suggest how to handle this.
regards,
AshaHi,
You can call a subroutine within a program (your z program)
/: PERFORM ADD_AMOUNT IN PROGRAM SAPLZFTP_F150
/: USING &W_AMOUNT&
/: ENDPERFORM
In the z program create this subroutine.
Form ADD_AMOUNT
-->FT_INVAR Text Symbol table for input variables
-->FT_OUTVAR Text Symbol table for output variables
FORM add_amount TABLES ft_invar STRUCTURE itcsy
ft_outvar STRUCTURE itcsy.
STATICS:
w_value_l TYPE f150d-salfw.
READ TABLE ft_invar INDEX 1.
IF sy-subrc IS INITIAL.
you can check all this part of the code how you want to
process your data whether its numeric or character or
whatever
w_value_l = w_value_l + ft_invar-value.
ENDIF. "IF sy-subrc IS INITIAL.
ENDFORM. " ADD_AMOUNT
TO BESPOKE THE PRINT PROGRAM FOR THE DUNNING
Dunning outputs use the function module FI_DUNNING_PRINT_NOTICE. You can copy this to a Z function module and make some changes to the data selection. You will have to look into the code and decide what changes you need.
The process to use a bespoke program to do the dunning print is as follows:
UNDER FI GLOBAL SETTINGS in the configuration,
There are Business Transaction Events. Within that you can configure the same to enable a Z function module in place of the standard function module (from the FUNCTION GROUP F150)
Create function group ZFTP_F150
Copy standard function module FI_PRINT_DUNNING_NOTICE of function group F150 to ZFTP_FI_PRINT_DUNNING_NOTICE in function group ZFTP_F150
Copy standard function module PRINT_DUNNING_NOTICE of function group F150 to ZFTP_PRINT_DUNNING_NOTICE in function group ZFTP_F150
Within the function module ZFTP_FI_PRINT_DUNNING_NOTICE, change function module call for PRINT_DUNNING_NOTICE to ZFTP_PRINT_DUNNING_NOTICE
Create a new include ZFTPI_ROUTINES within the function group and copy the subroutines LOG_MSG, LOG_MSG_TAB, & LOG_SYMSG from the function group F150 to this include
AS AN ALTERNATE, YOU CAN COPY THE WHOLE FUNCTION GROUP
Maintenance view TBE31 (SM30). Change the function module from FI_PRINT_DUNNING_NOTICE to ZFTP_FI_PRINT_DUNNING_NOTICE against the event 00001720 FI-FI entry
Hope this helps.
regards,
Satya -
Search help,F4 function& matchcode object , give difference
hi guru
i confuse about this 3 functionlity.
search help,F4 function& matchcode object ,
please tell me the differences.
regards.
subhasis.Hi,
Search Help
Use
With this function you can search for objects, thereby defining and linking different selection conditions for the search help.
Prerequisites
You can call this function by:
· Selecting Object ® Search... () in the main menu bar of the Integration Builder
· Placing the cursor on a software component version and selecting Search... () in the context menu (only in the Integration Repository)
In this case the software component version is defined as the search criteria.
Features
Defining the Object Type
You can select the object type in a dropdown list in field Object Type.
In the design (Integration Repository) you can
· Select an object type (for example Message Interface)
· Select a cross-object category (for example Interface Objects)
In the configuration (Integration Directory) you can select types Values Mapping Group and schema in addition to the individual object types.
CHECK THIS LINK TO CREATE A SEARCH HELP.
http://www.sapdevelopment.co.uk/dictionary/shelp/shelp_basic.htm
CHECK THIS LINK TO CREATE A MATCHCODE OBJECT
http://searchsap.techtarget.com/tip/1,289483,sid21_gci553386,00.html
more details...
Regards,
Priyanka. -
Regarding Function Module trace.
Hi,
How are you ?. I need a help for Function Module datasources of how to get info of fields related to tables. I tried ST05 of SQL Trace but not showing complete picture and I heard through ST12 can do Function module trace to obtain table names. Can you kindly walk me through of how to Obtain table names for fields for Function Module Datasources through ST12 or any tcode in detail.
Thanks in advance.
Regards
Srinivas M.Hi Srinivas,
I suggest to first have a look at the SAP Help for Business Content DataSource. You might find information on the source tables here.
As a next step you can have a look in the coding of the Function Module or debug it. You have to look to statements like TABLES and SELECT.
As a last step (and maybe time-consuming) execute an SQL Trace using t/code ST05 during executing t/code RSA3 in the Source System.
Best regards,
Sander -
I need some help regarding data element ZEXPDT. I used it in an infoquery that was transported to QAS and it does not exist in QAS. I thought it might be locked in a transport, but the below screen clip says it is not locked. It was created in 3/2014. Thanks.
Either trick the system, SE11, add a space at end of text desciption and save,
Or call transport workbench (SE01, SE10) create a transport request or use an existing one, then double-click on a task, switch to modify mode, add a line with R3TR DTEL name of the data element, save, then object list, lock in request/task menu.
Or SE80, contextual menu of data element. (other functions, write transport entry)
Regards,
Raymond -
Help Regarding Emoticons....('',) ??
Hello to all experts,
I need some help regarding my Chat program...
Can anybody should tell me how to access Emoticons images from a particular destination or source using a java code....
Or Is there any way to access that emoticons using XML file...so that it will then read from a Java code....??
XML file look like as :-
<root>
<img1>path of the image or emoticon</img1>
<img2>......................... ........................</img2>
</root>By using above file i will read emoticons using Java code....??
Is there any function , Method or a sample code to do that job...
Thanks in Advance.....Thanks DrClap....
One More thing I want to knw from you.....
Actually Other then this Emoticons help....
I had given a post in Java Help System for getting help regarding How to open a HelpSet file from a java code By just putting JH.Jar in my Lib path.
I am using the following program to do so...
public class JavaHelpDemo extends JFrame
private HelpBroker someHelpBroker;
public JavaHelpDemo()
HelpSet hs;
try
File f = new File("Master.hs");
URL url = f.toURL();
hs = new HelpSet (null, url);
HelpBroker hb = hs.createHelpBroker();
new CSH.DisplayHelpFromSource(hb);
hb.setDisplayed(true);
catch (Exception a)
System.out.println("Error is here");
System.out.print(a);
// constructor
public static void main(String[] args)
JavaHelpDemo javaHelpDemo1 = new JavaHelpDemo();
}//classActually my this program is running well and I m getting my helpset only when i insert all my files with htmls in my source path.....
I hav created a Jar or all these files and named it Help.jar
is there any way just to call that helpset using this jar without giving all files into source path.....
Regards,
Daman. -
My iPad mini was working very fine from last 9 months....but suddenly today I found it discharging from 100% to 34% though I didn't use it at all...and also found my mini is slightly heated up at the bottom..any help regarding this would be greatful
Same thing happened to me with my peruvian credit card in the peruvian app store, I want to buy an app, but it says that my credit card is "not supported in the Peruvian app store"
-
Help regarding :Video Segmentation & Summerization
hello friends,
I am doing my project on above topic and I am trying it with Java.
Is it possible doing it in Java.
What Techniques I'm using are:
1.Java(JMF)
2.Oracle 9i(Inter-Media)
3.Matlab
This project concludes of four parts
1.Segmentation (Video to Image conversion)
2.Comparison (Copare frame using algo.)
3.Extraction (remove duplicate frames based on algo)
4 Summarization (Collect frames and form a new content based video)
Is It possible in Java? How?
Seeking for help regarding this .
Thank you.This project concludes of four parts
1.Segmentation (Video to Image conversion)
2.Comparison (Copare frame using algo.)
3.Extraction (remove duplicate frames based on algo)
4 Summarization (Collect frames and form a new content based video)So, compressing that into a simple question instead of a convoluted one... you just want to remove duplicate frames from a video and save it to file? -
Help Regarding Xi integrating with Seibel System.
HI @,
I have to intergrate a seible system with R/3 but I haven't worked on the same before.
I need help regarding seibel inetrgartion scenarions and various adapters that can be used in that conditions.
Documents on Seible Integration will b really helpful.
RegardsIt would be better to go for the iway adapter for this integration requirement. The other documents can be obtained direclty from iway
Regards,
Prateek -
Dilemma regarding function based indexes
Hello,
I have a dilemma regarding function based indexes.
I have read Note:66277.1 on the Metalink discussing thoroughly the subject of “Concepts and Usage of Function Based Indexes”.
This doc was revised on 30-May-2006 so I was sure it referred to 9i and 10g.
This doc as well as other docs on the web claim that in order to use FBI (function based indexes) one must set the following parameters (can be done also at session level)
QUERY_REWRITE_ENABLED = TRUE
QUERY_REWRITE_INTEGRITY = TRUSTED
Also the schema that is owner of the FBI should be granted with QUERY REWRITE sys priv and statistics should be collected since FBI is usable only by CBO (cost based optimizer).
I have tested it and it works, my problem was that it worked
(1) Without granting the QUERY REWRITE to the owning schema.
(2) QUERY_REWRITE_ENABLED was set to false.
(3) QUERY_REWRITE_INTEGRITY was set to enforced.
I have conducted my tests on 9.2.0.6 and found no evidence in the docs (10g) saying the above is required or not.
I found at http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1197786003246 the following:
“Oracle9iR2 relaxed this so that the FBI on the builtin function may be used.”
so I have tested it with my own function:
create or replace function upper2( p_str in varchar2 ) return
varchar2 DETERMINISTIC
as
begin
return upper(p_str);
end;
=>
Also (yes you guessed right), without any privilege granted nor parameter setting the optimizer picked my FBI.
Can anyone refer me to a place documenting this behavior as a correct one?
Other comments?
Regards,
Tal Olier ([email protected])Got an answer from Oracle support:
19-DEC-06 18:04:31 GMT
(Update for record id(s): 101017780,101017796)
QUESTION
========
Questions about the options required in 10g related to Function Based Indexes, and the correct
behaviors associated with them.
ANSWER
======
For 10g:
These requirements are no longer true in 10g. This has already clarified by
development in the Bug 3999326 which is available on metalink.
For 9I:
For the creation of a function-based index in your own schema, you must be
granted the QUERY REWRITE system privileges. To create the index in another
schema or on another schema's tables, you must have the CREATE ANY INDEX
and GLOBAL QUERY REWRITE privileges.
You must have the following initialization parameters defined to create a
function-based index:
QUERY_REWRITE_INTEGRITY set to TRUSTED
QUERY_REWRITE_ENABLED set to TRUE
COMPATIBLE set to 8.1.0.0.0 or a greater value
Additionally, to use a function-based index:
The table must be analyzed after the index is created.
The query must be guaranteed not to need any NULL values from the indexed
expression, since NULL values are not stored in indexes.
However, in 9.2.0.4 patchset, these prerequisites do not apply and one can
create function-based indexes without any of the above to be true. This is not
the case in 9.2.0.3, not in 8.1.7.
Reference: Oracle 9i R2 Administrators Guide
So as mentioned above that is why you didnt have any errors
Please back to us if any further information is need, and we will be pleased to
assist you further.
Thank You,
Best Regards,
Mina Anes
Maybe you are looking for
-
Hello Gurus, I need your help. We are working on ECC 6.0 I want to stock transfer Finished goods to Manufacturing plant to Depot which is also excisable. There will be RG 23D register in depots. I am following process as under: Stock transfer PO - S
-
How to call jsp in PLSQL code (to upload a file in IFS)
Hello, We develop our PORTAL (9.0.2) with PL/SQL way. We want to make a form to upload file in IFS. We create a form like that : htp.formOpen(cmethod =>'post', cenctype => 'multipart/form-data', curl => '/pls/ptlcollab/ptlcollab.GestionDoc_
-
How do you know what ipod generation you have
-
I have not transported process chains before so wanted to check: When transporting process chains do they by default come across inactive and you need to activate them on the receiving system, or are they supposed to be transported in the active stat
-
My biggest mistake today is to update iPhone 4's firmware to iOS 4.2
In this morning, I connected iPhone 4 to my PC and tried update the phone to iOS4.2 through iTunes. But, when iTunes showed "Preparing iPhone for software update" or something which I couldn't remember, this phone seemed disconnected itself from and