Register PL/SQL functions

Hi,
I want to use the EXTRACT function in Discoverer. I went through the Help for the «Import PL/SQL function» without success....
When I click the «Import» button, I see a HUGE list of functions, and I don't recognize which is the one I want.
I use that EXTRACT in the same database with PL/SQL developer and it works fine, but I get a «Function EXTRACT has not been registered with the EUL» message when I try to use it in Discoverer.
Any one knows how to «bring» the right function in the EUL ??
Thanks.

I was able to import a Oracle standard package function SYS_CONTEXT and view it in Discoverer Desktop/Plus.
However when I create my own package function in a schema "xxdev" and then import via Disco Admin, I cannot view this function in Discoverer Desktop/Plus. These are the steps that I followed to implement it:
1. create package in xxdev schema
2. grant execute on package to noetix_sys & noetix_eul
3. register the function in Disco Admin
4. login to Disco Desktop/Plus and try creating a calculation field and lookup functions.
The function is not visible. I followed the exact same steps for STANDARD.SYS_CONTEXT function and it was visible. Is something missing in my steps to do?
Thanks in advance.

Similar Messages

  • How to register PL/SQL function with Varchar2 argument in Discoverer

    Hi,
    I have registered a PL/SQL function in Discoverer Administrator 10.1.2.1. Function has two arguments with data type varchar2. In discoverer I've selected varchar as it doesn't have varchar2.
    When i use this function in report using discoverer desktop it gives an error "One of the function argument has an incorrect datatype.
    I would appreciate if somebody can help
    Regards
    BA

    Hi,
    First, do not wait to use it in order to check it.
    In the discoverer admin you can "Validate" the function on after registering it.
    there are couple of things you should know about registering the function:
    1. the "Varchar" option you selected is correct (there is no varchar2 in the admin definition).
    2. check the database function to verify that you indeed registered all its arguments and they match the names and types of the db function.
    3. during the registration, type everything in UPPER CASE.
    the other way to register the function (and you will not need to deal with the definition of it) is to search for the function in a list.
    in order to do that, on the register function screen press the "Import" button (on the bottom right side of screen).
    then search by the owner (db user / schema) that the function / package is registered.
    Tamir

  • Exporting pl/sql functions

    Hi,
    I know how to register PL/SQL functions in discoverer Admin and also how to export a folder or entire EUL from discoverer Admin and then also how to import them back.
    But can someone please tell me how can i export existing pl/sql functions which are registered in Disc Admin to another instance of Disc Admin?
    Thanks in advance.
    --Kumar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Great!!!
    Thanks, I think i missed the Step2.
    --Kumar                                                                                                                                                                                                       

  • Totals of calculated field w/ PL/SQL function

    I have a worksheet with a numeric field that is calculated using
    a registered PL/SQL function. When I add totals to the sheet, no
    total appears for this column. Is this a known issue, or is
    there something else going on?
    Thanks,
    Charles

    I have the same problem. I used to work with Discoverer 4 and all the totals were there, but after the upgrade to 9.0.4 the totals for the calculated items that are based on stored procedures are gone. It has something to do with the procedures because the calculated items that do not call procedures do have the totals.
    What is meant by the default setting of "Data point"? I cannot find anything like it in the administrator.....

  • How to use PL/SQL Function after registering

    Hi,
    I have successfully registered a PL/SQL Function within Discw Admin. But i don't know how to use it further??? Please let me know the steps to use it in folders (admin) or in plus.
    Actually i have a stored procedure which fetches the records from the base tables and i have to develop a report based on that data.
    Please reply ASAP.
    Thanks,
    Jay

    Hi Jay,
    If this function is a stored procedure in the right schema, you can access this function in your custom SQL like any other database functions (e.g. SUM, AVG, MAX, etc).
    If you are not using a custom folder (ie. your own SQL), you can access this function in the workbook (Tools --> Calculations --> New Button --> Select Function Radio Button --> All Functions or Database Folders.). This calculation wil become a new column in the workbook.
    Regards,
    John

  • Passing Multiple Values from a worksheet to PL/SQL function.

    Hi All,
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    I will try to explain the scenario:
    We have a crosstab report that showing all the customer details, deposit sum of a customer in each date in a date range selected. With the customer details we are showing the Rank of a customer based on the deposit in the latest date selected. Filtering is based on the rank, ie Top50 or Top60 etc.( As I said rank is calculating based on the deposit in the latest date).This is working fine.
    Now the new requirement is to : For example, in Top50 report, list all the customers, who were in the Top50 list, in any of the dates selected. We are able to display the daywise rank, but when giving a condition like daywiserank <= 50, the result becomes uncertain. Some blank lines, wrong amounts etc..
    As a work around we tried to find out the rank in a PL/SQL function. But the issue there is : we have some multiple value parameters used in the worksheet.
    Is there any way to pass multiple values selected in a worksheet to a PL/SQL function ?
    Or any other work arounds for the scenario explained?
    Reagrds,
    Jeneesh

    Hi Russ,
    Thanks for the response.
    Russ Proudman wrote:
    1. I thought there was an analytical function similar to rank - or maybe an option of rank - that if there are duplicate records to have them all considered the same rank. So if you had 3 records all the same as rank=2 then a condition saying where rank=2 would return the 3 records. You could check into this.
    We are already using DENSE_RANK. But the issue is the output contains incorrect null values nd repeated rows.
    We got it solved as I explained in the previous post. But will that AGGREGATION MODE setting ( Which discoverer says - not recommended) have any issue? I mean side effects?
    Russ Proudman wrote:
    2. Another thought is that you can create a PL/SQL routine - that's called from a SQL function registered in Discoverer - where a table is created that does the first part of your query. Then a worksheet is created to use the data from that table. So, in essence, the table would have your top50 ranked customers. Then you can write any kind of worksheet against that table. However, DBAs are loath to allow tables - that they didn't create! - many times in a PROD environment.
    Here also the same problem will occur: as the top 50 will depend upon the parameters. I cannot pass those parameters to PL/SQL Function.And storing the top50 ( itmay be top100 or to 150 also) for all combinations of the parameters is impossible
    Russ Proudman wrote:
    3. Finally, are you sure you're rank function is correct in that if you're getting blank lines, maybe the 'over' part is not considering all columns needed to determine the rank?
    Yes the query we are using is correct. The output QUERY of discoverer gives correct results in Sqlplus.
    Regards,
    Jeneesh

  • Is it possible to retrieve RAD's extended variables with a pl/sql function?

    Good morning everyone,
    We have our forms and reports(10g) application, SSO enabled and we are using OID on 10g app server. some of our users use smart card to log in to the system and some who do not have smart cards provide their database userid, password and SID.
    In the case of users who login with smart card, as a one time effort, they have to register their smart card. At that point OID presents a form prompting for their username, password, sid and then a RAD record is created for that particular user.
    And from then on when the user enters the system using his smart card(12345@mil), forms servlet, does the look up of dbusername,dbpswd,sid which belong to the 12345@mil and user's database credentials are passed to the application. The entire application logic is based on that userid which is also an internal userid in the application. Everything is working fine.
    I have read the documentation and found that 12345@mil is stored in the "cn" parameter and the orclownerguid and orclusernameattribute are stored under "cn"=extended properties in the oid. I am able to see this from the oid console.
    But now I need some help. If I only know the id of the user as "12345@mil" , is it possible to manually query the RAD and retrieve the orclusername from a pl/sql function?
    Any help is greatly appreciated.
    Regards,
    Suma.

    Please can anyone help me????
    Regards,
    Suma.

  • How to find out PL/SQL function usage in Discoverer workbooks?

    We have to make changes to one PL/SQL function that has been registered in Administrator. Is it possible to find out in which reports the function is used? The function is called in calculations and it returns certain time information. We have to add one argument to the function and therefore have to change calculations where the function is called. We have too many workbooks to manually check them all.
    I am aware how to find out which folders and items are used in workbooks but can't find the same information about functions. We are using Discoverer 10.1.2.2
    Thanks in advance!

    Hi,
    If you calculation is in the EUL you can look at the item dependencies, but if your calculation is in the workbook there is no way other than using the workbook dump (d51wkdmp.exe) utility or opening the workbook and manually checking.
    You might want to consider overlaying the PL/SQL function definition so that there are 2 variants of the function. You can then add the extra parameter as an optional parameter in Discoverer. The correct variant will be called depending on how many parameters are used.
    Hope that helps,
    Rod West

  • Importing PL/SQL function in Discoverer Admin

    Gents
    I'm trying to import a PL/SQL function. In fact this functions is in a package.
    When I try to import in Discoverer Admin, I'm not able to see this package and the function.
    It's possible import a function from a package in Discoverer?
    Must a grant some privilege in package or create a synonym?
    Regards
    Honorio

    Hey,
    I have a similar problem.
    I created a PL/SQL Function which i registered in my EUL. Bun when I'm using this function on an item in a custom folder, this custom folder disappeared from my Discoverer Plus list of folders? When I delete the item which uses this function the folder shows up in my Discoverer Plus list of folders.

  • XMLType schema detail lost in pl/sql function for a jdeveloper webservice

    If I write a very simple pl/sql procedure to wrap as a web service to return the XML from an XMLtype table column, the jdeveloper (11.1.1.3) web service generation process seems to ignore the detail
    of the registered XMLTypes' schema, and converts the 'output' to an xsd:string in the generated WSDL file, which has knock on effect that generated data controls are 'dumb' in only seeing output as a string, and providing no real data functionality at XML schema level. Since I know web service data controls work fine when provided with the correct level of detail in the WSDL, what am I missing in terms of pursuading jdeveloper to generate wsdl's with full xsd schema info for the return XMLType?
    This is my table:
    ID NOT NULL NUMBER(12)
    SPEC SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/public/demo
    /xsd/sample2.xsd" Element "b
    ooks") STORAGE BINARY
    PRD_ID NOT NULL NUMBER(10)
    ISSUE NOT NULL NUMBER(6)
    EDIT_NO NOT NULL NUMBER(6)
    PUBLISHED_BY_PEO_ID NUMBER(10)
    PUBLISHED_ON_DT DATE
    EFFECTIVE_FROM_DT NOT NULL DATE
    EFFECTIVE_TO_DT DATE
    =======================================================
    This is the XML Schema:
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:books"
    xmlns:bks="urn:books">
    <xsd:element name="books" type="bks:BooksForm"/>
    <xsd:complexType name="BooksForm">
    <xsd:sequence>
    <xsd:element name="book"
    type="bks:BookForm"
    minOccurs="0"
    maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="BookForm">
    <xsd:sequence>
    <xsd:element name="author" type="xsd:string"/>
    <xsd:element name="title" type="xsd:string"/>
    <xsd:element name="genre" type="xsd:string"/>
    <xsd:element name="price" type="xsd:float" />
    <xsd:element name="pub_date" type="xsd:date" />
    <xsd:element name="review" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:string"/>
    </xsd:complexType>
    </xsd:schema>
    =================================================
    This is the pl/sql:
    function GetSpecificationById (p_spec_id in NUMBER) return XMLType
    IS
    l_specification sys.XMLType;
    BEGIN
    select specification
    into l_specification
    from specifications
    where id = p_spec_id;
    return l_specification;
    EXCEPTION
    WHEN OTHERS THEN -- handles all other errors
    ROLLBACK;
    END GetSpecificationById;
    ==============================================
    And this is the generated WSDL:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="MyWebService1"
    targetNamespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://devsafetrytrailcom/MyWebService1.wsdl"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    </wsdl:types>
    <wsdl:message name="MyWebService1_getspecificationbyid">
    <wsdl:part name="pSpecId" type="xsd:decimal"/>
    </wsdl:message>
    <wsdl:message name="MyWebService1_getspecificationbyidResponse">
    *<wsdl:part name="result" type="xsd:string"/>*
    </wsdl:message>
    <wsdl:portType name="MyWebService1">
    <wsdl:operation name="getspecificationbyid" parameterOrder="pSpecId">
    <wsdl:input message="tns:MyWebService1_getspecificationbyid"/>
    <wsdl:output message="tns:MyWebService1_getspecificationbyidResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="MyWebService1" type="tns:MyWebService1">
    <soap:binding style="rpc"
    transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getspecificationbyid">
    <soap:operation soapAction="http://devsafetrytrailcom/MyWebService1.wsdl/getspecificationbyid"/>
    <wsdl:input>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="pSpecId"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"
    namespace="http://devsafetrytrailcom/MyWebService1.wsdl"
    parts="result"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="MyWebService1">
    <wsdl:port name="MyWebService1Port" binding="tns:MyWebService1">
    <soap:address location="http://localhost:7101/SafetyTrail-Model-context-root/MyWebService1Port"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Edited by: user592403 on Jul 26, 2010 9:57 AM

    Anyone seen this problem before??

  • Display a register in a function

    Hi,
    I have a PL/SQL function compiled succesfully, but it doesn't works as I wish, and I don't know why. So I tried to display a register of a table but there are errors. Here is the code:
    create or replace
    PACKAGE BODY "SML_ACUMULADOS" as
    -- Para que el usuario actualice los stocks erróneos de una clave desde Discoverer
    FUNCTION actualizar_acumulados(p_counipro in VARCHAR2,
    p_cjclmapr in VARCHAR2,
    p_nuprovee in VARCHAR2,
    p_caextrap in NUMBER,
    p_caextran in NUMBER,
    p_caexexpl in NUMBER,
    p_caexalma in NUMBER)
    RETURN NUMBER
    IS
    CURSOR c_acumulados is
    SELECT counipro,
    cjclmapr,
    nuprovee,
    caextrap,
    caextran,
    caexexpl,
    caexalma
    FROM sml_movimientos_2009
    WHERE COUNIPRO = p_counipro
    AND CJCLMAPR = p_cjclmapr
    AND NUPROVEE = p_nuprovee;
    --SET VERYFY OFF
    SET SERVEROUTPUT ON SIZE 20000; --error
    BEGIN
    OPEN c_acumulados;
    FOR i in c_acumulados LOOP
    IF p_caexalma IS NOT NULL AND p_caexalma != i.caexalma THEN
    UPDATE sml_movimientos_2009
    SET CAEXALMA = p_caexalma
    WHERE COUNIPRO = p_counipro
    AND CJCLMAPR = p_cjclmapr
    AND NUPROVEE = p_nuprovee;
    DBMS_OUTPUT_LINE(i.caexalma); --Error
    RETURN 1;
    ELSE RETURN 0;
    END IF;
    END LOOP;
    RETURN p_caexalma;
    CLOSE c_acumulados;
    END;
    END;
    The error I display is:
    Error(29,21): PLS-00103: Encountered the symbol "ON" when expecting one of the following: := . ( @ % ; not null range default character The symbol "; was inserted before "ON" to continue.
    How can I display the caexalma value?
    Thanks.

    Although what you told me works, the problem it's not fixed. Because I'm trying to display the value inside the table, that is, i_caexalma, not the parameter I type in the function. That's why I typed in the code:
    DBMS_OUTPUT_LINE(i.caexalma); --Error
    The important code is:
    IF p_caexalma IS NOT NULL AND p_caexalma != i.caexalma THEN
    UPDATE sml_movimientos_2009
    SET CAEXALMA = p_caexalma
    WHERE COUNIPRO = p_counipro
    AND CJCLMAPR = p_cjclmapr
    AND NUPROVEE = p_nuprovee;
    --DBMS_OUTPUT_LINE(i.caexalma);
    RETURN c_acumulados.i_caexalma;
    p_caexalma is the parameter of the function and it's possible to display it. But is it possible to display i.caexalma value? I want to check if this conditional is OK and the table sml_movimientos is updated. Now I know that this table is not updated and I want to know why.
    Thanks.

  • Bg_absence_duration sql function not working in Self Services

    I Have SQl Function registered and used in formula BG_ABSENCE_DURATION, it is working fine in the professional forms, but in "Leave management" form in self services it gives error:
    PER_EMP_NUMBER not found at line 231 of bg_absence_duration Cause: a sql select statement obtained from application dictionary return no rows when executed.
    Edited by: Elrefai on May 29, 2013 10:11 PM

    Hi Jay,
    were you finally able to access DFF in BG_ABSENCE_DURATION , did the following piece of code worked ?
    IF ABS_INFORMATION_CATEGORY = 'CA'
    THEN
    (If ABS_INFORMATION3 = 'Half Day'
    THEN
    ( IF date_start = date_end THEN
    (deduct_days = 0.5
    days_between = days_between - deduct_days
    duration = to_char(days_between) return duration, invalid_msg
    ELSE
    ( duration = 'FAILED'
    invalid_msg = 'Half day leave can be applied only for a day'
    return duration, invalid_msg

  • Parameter passing to custom SQL query using PL/SQL FUNCTION

    Hi
    In order to pass a parameter to the query in custom folder of a business area I created a function and mapped it to the Custome query using Discoverer Desktop. There is no error in mapping as the system does not throw any error. When I am inputting the Parameter for the input values everytime the query doesnot return any rows.
    Can anybody help in this regard

    Hi,
    I need to take the request Id as input from the user and then fetch only the data pertaining to that requet Id. As a lot of complex joins are involved I need to pass request id as parameter to the custome folder.
    The package i greated:
    CREATE OR REPLACE PACKAGE SETPARAM
    AS
    param1 varchar2(25);
    param2 varchar2(25);
    FUNCTION SET_PARAM1(p1 IN varchar2) RETURN NUMBER ;
    FUNCTION GET_PARAM1 RETURN varchar2;
    END SETPARAM;
    CREATE OR REPLACE PACKAGE BODY SETPARAM AS
    FUNCTION SET_PARAM1(p1 IN varchar2) RETURN NUMBER IS
    BEGIN
    fnd_client_info.set_org_context('138');
    param1 := p1;
    dbms_output.put_line(param1);
    RETURN 1;
    END;
    FUNCTION GET_PARAM1 RETURN varchar2 AS
    BEGIN
    RETURN param1;
    END;
    END SETPARAM;
    I registered the set_param1 function as a pl/sql function in discoverer admin.
    This function is called on the condition associated with the parameter in Discoverer Desktop when i run the report.
    In the custom folder query i have this piece in the where clause
    WHERE tnfo.request_id = NVL(APPS.SETPARAM.GET_PARAM1,7383588)
    And everytime i get the data pertaining to request id =7383588,
    Please suggest where i went wrong
    thanks
    Ashwini

  • Discoverer - Import PL/SQL Function - Function Not Appears

    Hi,
    I´m trying to import 15 PL/SQL Funtions inside a custom package into the discoverer administrator, but they do not appear in the list, when trying to do an automatic import.
    Also, when I press the Import Button, it takes aproximately one hour to display the list.
    I´m using discoverer with Applications.
    Do you know what schemes are listed in there ? Because my package is in a CUSTOM Scheme, not the APPS, but it has a Public Synonym.
    I need to automatically import these functions in order to not having to do it manually, becasuse it takes to much time.
    Also, do you know if there is any way to export the BA and include this functions in there, so I won´t need to register them again in another instance after migration ?
    I´m using Discoverer 4.
    Thanks in advance.
    Nicolas.

    Hi Nicolas
    When you use the import capability you can import from a named schema so if you have your functions in a schema other than APPS or SYS, which have hundreds if not 1000s of functions, the list should populate quicker.
    I'm afraid I don't know of a way to automate the importation of PL/SQL functions. However, if you know the definition of the function rather than importing it why not try creating it manually using the New button? It takes a little getting used to, particularly in getting all of the pointers and arguments correct, but after a while it becomes second nature. This will be quicker than waiting an hour for the list of functions to popuklate.
    As for your third question, do you know if there is any way to export the BA and include this functions in there, so I won´t need to register them again in another instance after migration ? the answer is no. PL/SQL functions cannot be exported using Discoverer Administrator and need to be manually imported in the other EUL. You could take screen shots of your existing definitions and manually create them in the new environment using the New button. Once again this will be quicker.
    I'm so sorry all of the answers appear negative and please don't shoot the messenger.
    Best wishes
    Michael

  • PL/SQL function debugging in NetBeans

    Hello.
    I have a PL/SQL function which I call from my JDBC code (the Java application is being developed using NetBeans). My function takes many arguments of different types. When I test it using SQL*Plus it works fine. When I call the function from the java code -- it does not work.
    What is the right way to debug my PL/SQL function once it is called from the Java application?
    Thank you!
    Mark.

    Make sure your parameters for the callable statement are registered correctly. Here is an example of a call made to an oracle function called "my_function" that returns a cursor:
    CallableStatement callst = conn.prepareCall("{call ? := my_function(?)}");
    callst.registerOutParameter(1, OracleTypes.CURSOR);
    callst.setInt(2,999);  //999 is the value being passed in
    callst.executeUpdate(); Post the error message you are getting in java, if it works fine from the SQL prompt then it must be java.

Maybe you are looking for

  • E-mail threading no longer working in iOS 7

    Worked fine in iOS 6, not experiencing any other bad effects from the upgrade except for the occasional notification on the lock screen when tapping on and sliding to unlock not going to the app/article/e-mail being notified about but that doesn't ha

  • When i send tex messagets, my Name is not showing up on the reciepient's phone

    Even if these people are in my contacts - how do I set up my phone so that calls and texts show the recipent who is calling/texting

  • Relentless nagging and misinformation about updating Firefox

    Hello. This is a general letter to Mozilla. I've been a faithful supporter of Mozilla products for a very long time now, but as of late, with Firefox and Thunderbird trying to force me to buy a new Mac Intel computer I neither want, need nor can affo

  • Adobe CS5 Design Standard - Some updates failed to install

    I am tying to find a solution to this problem, and am unable to find a way to contact Adobe directly for customer assistance. When I click on the Customer Support link at the bottom, the page that loads says, "Error 'This serial number is not for a q

  • INCLUDE report "%_HR9920" not found

    Hi. I'm having að problem with an old ABAP report which I wrote. After I and my company upgrated SAP from 4.6C to 4.7, I get the error "INCLUDE report "%_HR9920" not found". This infotype 9920 is some custom made infotype I think and it looks like I