How to debug PL/SQL functions? Passing parameter and debugger error

Hi,
How to debug a PL/SQL function in JDeveloper? There are two problems with it:
1) Don't see how it's possible to pass parameters required by function call (in the dialog opening after Debug -> Debug FUNCTION_NAME)
2) In a function returning table_name%ROWTYPE (and having a record declaration for table_name%ROWTYPE), debug gives error:
PLS-00103: Encountered symbol "/" when expecting one of ... in line
v_Return PL/SQL RECORD;
Debugging procedures works as expected.
Found a similar question without answer here:
Debugging PL/SQL with parameters

Check
http://www.oracle.com/technology/obe/obe9051jdev/plsqlobe/obeplsql.htm#t2
Frank

Similar Messages

  • How to debug PL/SQL function in Apex

    Hi,
    I have a process in Apex that uses a PL/SQL function. When I compiled it in SQLPlus, it had no errors, yet when running it in Apex, I get an error.
    'Encountered unhandled exception in process type PLSQL' in the debug message. What's the best way to handle this? Thanks.

    Hi -
    Its hard to say without seeing the code of your process, but are you sure you are submitting any required paramaters to your process from the calling apge in Apex?
    Have you checked the Session to see what values it holds, and have you turned on Debug in Apex to see the code executing (or at least the call to your process)?
    Good luck.

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • How to Use the language function for assignment and validation

    Hi All,
    If anyone can explain me in details with example ,how to use the language function for assignments and validations?
    Thanks
    Arnab

    Hi Arnab,
    The expression is checked only for the current MDM session.
    If u login with the ABC language it will always show the ABC language no matter how many times u execute it.
    Try connecting to the DM with the XYZ language.
    It should go to the if part rather than else.
    Hope it helps.
    Thanks,
    Minaz

  • Open Document Method Passing Parameter and Logoon Toke Examples

    I'm looking for Open Document Method Passing Parameter and Logoon Toke Examples. Is it possilbe for a user inside the firewall to click a url link with all the logon token and parameters built in using open document method, i have not bee able examples? Thanks

    Hi,
    Make sure to apply the latest Patch2.11 and retest.
    Also, please state your datasource type. This can influence the syntax (i.e. when passign BEx variable values)
    Finally, have you tried the Web (DHTML) editor (bilaunchpad webi preference)?  it has an OpenDocument 'wizard' to help you build-up the correct syntax . 
    please do the 2 above steps, and get back to us.
    Regards,
    H

  • How to debug a authority check in program and a authorisation object in tco

    Can anyone tell me how to debug a authority check in program and a authorisation object in tcode
    i just want to know the flow of authorisation object in debugging how user is assocaited with authorisation object and roles.
    i know if sy-subrc ne 0 is authorisation failed ,so please help me anyone on this.
    every time when i put breakpoint ,if its program level only, i am able to decide only through sy-subrc but iam unable o view the flow .

    flow cannot be seen, we have to be based on sy-subrc only...
    you cannot see the flow in read table... describe table... transfer...
    the authorization object will be assigned to the data element, that data element has some realtion to the roles given to the users. So if the role of the user and data element value doesnt match the sy-subrc NE 0.

  • How to call PL/SQL function and pass parameter to ODI variable?

    Can I call PL/SQL function and assign a return value to an ODI variable? Also can I assign ODI variable to IN paramter and assign OUT parameter to ODI variable? What ODI doc has that information?
    Thanks

    Hi,
    Refer this http://odiexperts.com/how-to-use-plsql-procedures-and-functions-in-odi
    Thanks,
    Sutirtha

  • How to debug a Package / function in PL SQL developer ??

    How can we debug a Package / function in PL SQL developer ??
    i want to debug a code line by line

    Karthick_Arp wrote:
    This question does not belong to this fourm. We have a {forum:id=260} forum for such question.Not even there Karthick. PL/SQL Developer is a 3rd party tool, not Oracle's SQL Developer, so it doesn't even belong on the Oracle forums.

  • How to call pl/sql function from element values

    EBS 11.5.10.2
    XMLP 5.6.3
    Hello,
    I noticed that the output of the rdf-to-data template conversion process makes use of an undocumented feature of data templates, and I would like to get input from experts as to which situations this feature is usable.
    The closest thing I can find in the documentation is a sample in the user guide. There is a "General Ledger Journals Data Template Example" that has a <dataStructure> section that contains <element> nodes which are NOT children of a <group> node. I can't find any explanation of this in the user guide.
    I've noticed from converted templates that in these un-grouped elements you can make calls to PL/SQL functions in the "value" attribute, like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>Has anyone had any success being able to call PL/SQL functions from grouped elements? Whenever I try, it doesn't seem to work.
    When I try something like this:
    <dataStructure>
      <group name="G_LINES" source="Q_MAIN">
        <element name="Line_Num"           value="Line_Num"/>
        <element name="some_calculation"   value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
        <element name="some_calculation_b" value="XX_CUSTOMPROCS.SOME_FUNCTION_B(:Line_Num)"/>
      </group>
      <element name="C_CALCULATED_VALUE" dataType="number" value="XX_CUSTOMPROCS.SOME_FUNCTION"/>
    </dataStructure>The <SOME_CALCULATION/> and <SOME_CALCULATION_B/> nodes come out empty in the output data xml file, but <C_CALCULATED_VALUE> would have a value as desired.

    ah - perfect. That makes sense. Thank you for the response!
    But what about when we need to pass parameters to those functions whos values are the results of aggregate element values?
    This happens a lot in the converted data templates, where pl/sql package functions are meant to replace formula columns from the original Oracle Report. Take this example from the conversion of ARXAGMW.rdf (Aging Report, 7 Buckets):
    (note the function call in the value of "Set_Percent_Inv_Inv" is using aggregate results from subgroups)
      <group name="G_INV_INV" dataType="varchar2" source="Q_Invoice">
        <element name="Total_Inv_Inv_Amt" function="sum" dataType="number" value="G_Invoice.C_Amt_Due_Rem_Inv"/>
        <element name="Total_Inv_Inv_B0" function="sum" dataType="number" value="G_Invoice.C_Inv_B0"/>
        <element name="Total_Inv_Inv_B1" function="sum" dataType="number" value="G_Invoice.C_Inv_B1"/>
        <element name="Total_Inv_Inv_B2" function="sum" dataType="number" value="G_Invoice.C_Inv_B2"/>
        <element name="Total_Inv_Inv_B3" function="sum" dataType="number" value="G_Invoice.C_Inv_B3"/>
        <element name="Total_Inv_Inv_B4" function="sum" dataType="number" value="G_Invoice.C_Inv_B4"/>
        <element name="Total_Inv_Inv_B5" function="sum" dataType="number" value="G_Invoice.C_Inv_B5"/>
        <element name="Total_Inv_Inv_B6" function="sum" dataType="number" value="G_Invoice.C_Inv_B6"/>
        <element name="Set_Percent_Inv_Inv"  dataType="number"  value="XX_CUSTOMPROCS.XXC_ARXAGMW.set_percent_inv_invformula(:Total_Inv_Inv_Amt, :Total_Inv_Inv_B0, :Total_Inv_Inv_B1, :Total_Inv_Inv_B2, :Total_Inv_Inv_B3, :Total_Inv_Inv_B4, :Total_Inv_Inv_B5, :Total_Inv_Inv_B6)"/>
        <element name="Sum_Percent_B0_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B0_Inv_p"/>
        <element name="Sum_Percent_B1_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B1_Inv_p"/>
        <element name="Sum_Percent_B2_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B2_Inv_p"/>
        <element name="Sum_Percent_B3_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B3_Inv_p"/>
        <element name="Sum_Percent_B4_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B4_Inv_p"/>
        <element name="Sum_Percent_B5_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B5_Inv_p"/>
        <element name="Sum_Percent_B6_Inv" dataType="number" value="XX_CUSTOMPROCS.XXC_ARXAGMW.Sum_Percent_B6_Inv_p"/>
        <group name="G_Cust_Inv" dataType="varchar2" source="Q_Invoice">
          <group name="G_Site_Inv" dataType="varchar2" source="Q_Invoice">
            <group name="G_1" dataType="varchar2" source="Q_Invoice">
              <group name="G_Invoice" dataType="varchar2" source="Q_Invoice">
                <element name="C_Amt_Due_Rem_Inv" dataType="number" value="C_Amt_Due_Rem_Inv"/>
                <element name="C_Inv_B0" dataType="number" value="C_Inv_B0"/>
                <element name="C_Inv_B1" dataType="number" value="C_Inv_B1"/>
                <element name="C_Inv_B2" dataType="number" value="C_Inv_B2"/>
                <element name="C_Inv_B3" dataType="number" value="C_Inv_B3"/>
                <element name="C_Inv_B4" dataType="number" value="C_Inv_B4"/>
                <element name="C_Inv_B5" dataType="number" value="C_Inv_B5"/>
                <element name="C_Inv_B6" dataType="number" value="C_Inv_B6"/>
              </group>
            </group>
          </group>
        </group>
      </group>
      ...All of these groups and sub-groups are based on one single query, so I am not sure how I would move the function call into the query without changing the results of the function.
    In the example above, elements Sum_Percent_B0_Inv through Sum_Percent_B6_Inv grab the results of the calculation done in set_percent_inv_invformula. Here is the essence of that function:
      sum_percent_b0_inv := ROUND ((total_inv_inv_b0 / total_inv_inv_amt) * 100, 2);
      sum_percent_b1_inv := ROUND ((total_inv_inv_b1 / total_inv_inv_amt) * 100, 2);
      sum_percent_b2_inv := ROUND ((total_inv_inv_b2 / total_inv_inv_amt) * 100, 2);
      sum_percent_b3_inv := ROUND ((total_inv_inv_b3 / total_inv_inv_amt) * 100, 2);
      sum_percent_b4_inv := ROUND ((total_inv_inv_b4 / total_inv_inv_amt) * 100, 2);
      sum_percent_b5_inv := ROUND ((total_inv_inv_b5 / total_inv_inv_amt) * 100, 2);
      sum_percent_b6_inv := ROUND ((total_inv_inv_b6 / total_inv_inv_amt) * 100, 2);The only solution I can think of is to have separate queries, one for each subgroup, that do the "sum" in sql; but that seems terribly inefficient.

  • How to use Pl/Sql function in Discoverer report

    Hi Everybody,
    Would you be able to provide a workflow/guidance how to use sql function in Discoverer right from creating the function using PLSQL Developer.
    (I am new to Oracle environment... prev. worked as analyst with Microsoft Access... took PL/Sql class in school a few years ago)
    We are using Discoverer Desktop.
    a) Just emailed dba for permission to create pl/sql function.
    b) Recently got Discoverer Administrator installed on my pc.
    can you pls add to the list:
    c)....
    d)....
    etc.?
    tx for your help, sandra

    Hi Kranthi,
    Thx for your warm words....
    The links you provided are great! Thx soooo much!
    Thanks to you and the rest of forum members, am able to use what you've all taught me
    with other Discoverer reports.... so i was able to do more on my own....
    About a month ago, I got access to Discoverer Admin, and was able to paste SQL to create a custom folder.
    Then i joined the custom folder to an existing baseline folder.
    I have found that sometimes when I use calc within a calc when the calcs use analytic functions, that Discoverer
    just displays null in the column. I thought that maybe instead I could create my own function as a work-around.
    I wrote IT for permissions to create views, functions etc. Hopefully, they'll approve and can move toward learning
    pl/sql functions for Discoverer.
    tx again, sandra

  • How to call PL/SQL function inside column in entity

    Hello,
    How can I do next:
    - Crete entity from existing table in database, but one column in the table gets value from function. Function is written in oracle PL/SQL language and it is located inside some package on database.
    Application should run LCDS3 and tomcat.
    All help is appricitated

    Anil,
    I'm using LCDS3, and here is what I trying to do (for example):
    - I have on Oracle DB table REGION, with columns: Code, State, Population.
    - I want to create entity that contains same columns as table REGION (Code, State, Population) and to have addition column RegionName witch get value from PL/SQL function (loacated in package "common" on DB) "common.fgetRegionName(Code)".
    Can you explain me how to create that entity.
    Thanks
    Almir

  • 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

  • How to Debug PL/SQL in SQL Developer?

    I am not able to debug PL/SQL and i have following error please advice how I can enable privileges and I want to know the steps of debugging.
    Connecting to the database My_connection.
    Executing PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
    Executing PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
    ORA-06512: at line 1
    This session requires DEBUG CONNECT SESSION and DEBUG ANY PROCEDURE user privileges.
    Process exited.
    Disconnecting from the database My_connection.
    Thanks for your time

    You need to get the DBA for the database to grant your account the privileges mentioned in the error message.
    Once that is done it should just work.
    Make sure you compile for debug
    You need some way to stop the debugger from just running through the code to the end
      - either set breakpoints
      - or Use Tools|Preferences|Debugger|Start Debugging Option to Step Into.

  • How to write PL SQL function?

    First of all, whenever i try and put my attempted code for this in a thread it says 'sorry content not allowed'. I have attempted to make the function but i keep getting errors. I think its because my logic is wrong anyway. I am not quite sure how to do it.
    I am a student and this is the first time i have been asked to write a function, i have almost no prior knowledge so please bare with me.
    Could people give me some ideas where to start. It seems i cant even get a simple function to work at the moment! Where is it best to write and test the function? I have been using SQL commands, should i use Script creator instead?
    Any help or feedback would be great.
    Thanks in advance!
    Edited by: Jay on 08-Dec-2010 03:09

    Hi,
    Here's a simple function, and a test of it:
    CREATE OR REPLACE FUNCTION hello
    (     in_txt          IN     VARCHAR2
    RETURN     VARCHAR2
    DETERMINISTIC
    IS
         return_txt     VARCHAR2 (100);     -- Value to be returned
    BEGIN
         return_txt := 'Hello, '
                 || in_txt
                 || '!';
         RETURN     return_txt;
    END     hello
    SHOW ERRORS
    SELECT     dname
    ,     hello (dname)     AS hello_results
    FROM     scott.dept
    ;Output:
    Function created.
    No errors.
    DNAME          HELLO_RESULTS
    ACCOUNTING     Hello, ACCOUNTING!
    RESEARCH       Hello, RESEARCH!
    SALES          Hello, SALES!
    OPERATIONS     Hello, OPERATIONS!I don't know why you can't post your function. Here's how you can find out:
    First, change the subject line of your first message to something like "IN PROGRESS - Please Do Not Reply Yet".
    Copy the hello function I posted into your text editor
    Reply to this message, and post your copy of the function.
    Did you get the error again? If so, it looks like there's some security feature on your system that's keeping you from posting code.
    If you can post my function exactly as it is, then change it a little. Update your latest message, a little bit at a time, to make the function more and more like your function. For example, just change the name of the function to your actual function name. Change the message. If it posts corretly, make another small change, until you get the "content not allowed" message. If you can't figure out what's causing it, then change the subject line back to something meaningful, change the last message back to the last version that did post correctly, and describe what you changed that caused the error.
    You can use SQL*Plus to create and test the function. Write a script (that is, a text file), similar to the one I posted above. If you name the file hello.sql, then you can run the script from the "SQL> " prompt by saying
    @c:\fubar\sql\hellousing the full path name on your system where I used "c:\fubar\sql" above.
    Edited by: Frank Kulash on Dec 8, 2010 9:18 AM

  • How to call PL/SQL function from ODBC

    Greetings (and thanks for reading),
    I am using Oracle 9i (9.2.0.4) database, running on SUN [sparc] Solaris 9. I have created the following types:
    create or replace type NAME_VAL_TYP is object
    (NAME   varchar2(30)
    ,VALUE  varchar2(30))
    create or replace type PARMS_VARRAY_TYP is varray(10) of
    NAME_VAL_TYP
    /and the following PL/SQL function:
    function F0 (P_PARAMS  PARMS_VARRAY_TYP) return numberHow do I call this function from ODBC?
    Thanks (in advance),
    Avi.

    Sorry, this is not mapped in the ODBC driver--none of the object types are. The spec doesn't really account for them.

Maybe you are looking for

  • Problem in billing document

    hi all, i have a problem in billing. i am creating an invoice for a free of charge delivery for which there should not be an accounting document. the document is saved with an error message 'no accounting documents created'. and it is appearing in VF

  • Vendor creation using fm 'Vendor_insert'

    Hi experts, I want to create vendor using the FM 'VENDOR_INSERT'. But the problem is I am unable to know what are the required fields to be given in the import structures (ie LFA1,LFB1,LFM1) . Could you please suggest the way to run this FM with mini

  • Someone elses updates appearing in my app store???

    So today I opened my app store and I had two updates. One for final cut and other for angry birds which i've never installed on my system. I thought what the heck and pressed update on angry birds, but then a window popped up that told me to log in w

  • G5 dual 2.3 or 2.7 w/ 10.3.9

    Hi, does anybody use a Powermac G5 2.3 dual core or 2.7 dual processor with 10.3.9.? I am planning on buying one of the 2 models, but I am bound to 10.3.9. due to several programs,. I intend to use it for audio and video processing (ableton live, ark

  • Dead/stuck/whatever pixel on my screen... unacceptable

    Hey guys. I just bought an iPhone 3G less than 2 weeks ago. I must say that I love it, I think it's a truly great product and so much fun to use. But anyways a few days ago, while navigating the home screen, I noticed a small white speck on my screen