Execute Oracle Package Function call from FORTE

Has anyone EVER successfully execute an Oracle Package Function call from FORTE
via " sql execute procedure "?
Here's my question, I am able to execute a stored procedure but hasn't figured
out a way to execute a function which defined in a package. The syntax goes
like this: sql execute procedure <PackageName>.<FunctionName> ( input
input_parm, output output_parm). If anyone EVER successfully execute a
function, please let me know, thanks.

You'll need to provide a column alias for the function call:
select func(val) as alias from dual

Similar Messages

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • How to execute a packaged function from within DML

    Hi
    can someone explain in how many ways can we execute a packaged function from within a DML statement.
    examples will help.
    Thanks

    Hi,
    There's no difference between using functions in DML and using functions in any other SQL statement. Almost any place where a literal is allowed, you can have any kind of expression, including a an expression involving one or more functions.
    For example, in
    UPDATE  table_x
    SET     column_a = 0
    WHERE   column_b > SYSDATE;You could use functions instead of 0, column_b, or SYSDATE. (Actually, SYSDATE is a function.) You can not use functions instead of table_x or column_a (since it is to the left of the "=" sign).

  • An error occurred when executing a REMOTE FUNCTION CALL.

    Dear all,
    We have two syetms called DXD and GRD , we have a remote enabled function module in the DXD system , when i am trying to call this Function module from
    GRD system it is going for the short dump, and giving the follwing error,
    <b>Error analysis
        An error occurred when executing a REMOTE FUNCTION CALL.
        It was logged under the name "RFC_NO_AUTHORITY"
        on the called page.</b>
    But i do have the access for the DXD system also, i am really struggling to solve this problem, if any lights are there to help me , i will be thank full for then,
    some body suggested for me that we need to maintain the Trusted system tables in the target system.
    Thanks & regards
    Satya.

    first u( user id ) have to get the Authorizations to use RFC ?
    object will be  like S_RFC or some thing like this.
    when u get this kind of error just call /NSU53 then u will come to know which Authorization Object is missing from ur User Profile.
    Regards
    Prabhu

  • Advice executing oracle package using shell script.

    Hi,
    I am writing one shell script that accepts several parameters as an input. These parameters are then passed while executing Oracle package procedure. However this procedure has an OUT parameter and I am not aware of how to receive that parameter in shell script.
    Any advice /suggestion is really appreciated.
    Below is the part of code I am using ... (P_OUT is suppose to be an out parameter for package)
    sqlplus -s apps/apps <<endsql
    whenever sqlerror exit failure
    set serveroutput on size 10000
    execute TEST_PKG.GET_COC_REQ ('$P_FROM_DATE','$P_TO_DATE','$P_MONTH_YY', '$P_OUT');
    endsql

    There is more than one way. Here an example :
    SQL> select ename,sal from emp where empno=7902;
    ENAME             SAL
    FORD             3000
    SQL> create or replace procedure extsal (
      2     empnum  in      number,
      3     salout  out     number)
      4  is
      5  begin
      6     select sal into salout
      7     from emp
      8     where empno = empnum;
      9* end;
    SQL> /
    Procedure created.
    SQL> exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.4.0 - Production
    $ EMP=7902
    $ SAL=`sqlplus -s scott/tiger << EOF
    set head off
    var salout number;
    exec extsal ($EMP, :salout);
    print salout
    exit
    EOF
    `$ echo $SAL | awk -F. '{print $2}'
    3000
    $

  • Calling Oracle Package Function from Visual Basic

    Hi,
    Oracle Client 8.04
    Oracle ODBC Driver 8.00.04
    VB 6.0
    Windows 2000
    I'm stumped here. I want to have a Oracle stored procedure run a
    query and return a result set which I can assign to a recordset
    object in VB. Based on things I've read here and on MS's site,
    here's what I've done:
    In the Oracle Schema Manager under the Packages folder I created
    the following package:
    PACKAGE test
    IS
    TYPE test_cur IS REF CURSOR;
    FUNCTION mycur RETURN test_cur;
    END test;
    and under the Package Body folder created:
    PACKAGE BODY test
    IS
    FUNCTION mycur RETURN test_cur
    IS
    c_return test_cur;
    BEGIN
    OPEN c_return FOR
    SELECT * FROM table_A;
    RETURN c_return;
    CLOSE c_return;
    END mycur;
    END test;
    They both compile without errors and in Oracle SQL Worksheet I
    can enter the following:
    variable x refcursor;
    execute :x :=test.mycur;
    print x;
    and the query results are displayed as expected.
    The problem is trying to get the result back into a VB recordset
    object.
    In VB 6.0 I have done this:
    Dim RS As ADODB.Recordset
    Dim Conn As ADODB.Connection
    Dim sConnection As String
    Dim sSQL As String
    sSQL = "{call test.mycur}"
    sConnection = "Provider=MSDASQL;UID=" & sUserID & ";PWD=" &
    sPassword & ";Driver={Microsoft ODBC for Oracle}; Server=" &
    sInstance & ";"
    Conn.Open sConnection
    RS.CursorLocation = adUseClient
    RS.Open sSQL, Conn, adOpenForwardOnly, adLockOptimistic,
    adCmdStoredProc ' or adCmdText
    but get:
    ?err.Number -2147217900
    ?err.Source Microsoft OLE DB Provider for ODBC Drivers
    ?err.Description [Microsoft][ODBC driver for Oracle]Syntax error
    or access violation
    The problem is not with the connection or permissions, since the
    query works fine when I just use the select statement in the
    package function as the string, instead of calling the function
    in the package (eg sSQL = "Select * from table_A") and can
    process the resulting recordset in VB.
    I've also tried variations using:
    Set RS = Conn.Execute("{call test.mycur}")
    or using a Command object something like:
    Dim com As ADODB.Command
    Set com = New ADODB.Command
    With Conn
    .ConnectionString = sConnection
    .CursorLocation = adUseClient
    .Open
    End With
    With com
    .ActiveConnection = Conn
    .CommandText = sSQL
    .CommandType = adCmdText
    End With
    Set RS.Source = com
    RS.Open
    But still get the same errors. Any help is appreciated. Also, in
    my package body, is it necessary to explicitly close the cursor,
    or does the function just exit when it executes the return and
    not ever hit the close statement?
    Thanks,
    Ed Holloman

    Hi
    i don't know if you got your answer, but i work with VB and
    Oracle.
    the procedure in the DB should have the cursor like you writen
    in your mail.
    to call a procedure in Oracle and get the data back
    into a recordset you shuld use a Command object like this:
    Dim conn As ADODB.Connection
    Dim cmd As ADODB.Command
    Dim rs As ADODB.Recordset
    Set conn = CreateObject("adodb.connection")
    Set cmd = CreateObject("adodb.command")
    Set rs = CreateObject("adodb.recordset")
    With conn
    .ConnectionString = ""
    .CursorLocation = adUseClient
    .Open
    End With
    'THE IMPORTENT SECTION IS THIS WHERE YOU SET THE COMMAND TO THE
    STORE PROCEDURE TYPE
    With cmd
    .ActiveConnection = conn
    .CommandText = "proc.fun"
    .CommandType = adCmdStoredProc
    End With
    'Then you set the rs to the command
    Set rs = cmd.Execute
    Set conn = Nothing
    Set rs = Nothing
    Set cmd = Nothing

  • How to make a dynamic function call from within a package procedure

    Hi:
    I need to call a function dynamically (name and parameters determined at run time, but return value is known:always an integer). I can build the call and place it in a dynamic sql using dbms_sql. But the function is inside a package and is not public.
    So, if I issue:
    dbms_sql.parse( cur,'SELECT '||call||' FROM dual', dbms_sql.v7 )
    where call is "DOS(234,'V')"
    I get:
    ORA-00904: "DOS": invalid identifier
    If I make the function ("DOS") public and "call" equals "pack.DOS(234,'V')", it works fine, but I don't want to make it public.
    Is there a solution?
    Thanks in advance
    RuBeck

    Hi, Kamal:
    Calling from outside of the owner package is not possible if it is not public.The calls are from inside the package. It looks like the dynamic select is executed "outside" the package, so the private function is unknown
    Make it available in the package headerLooks like it's the only solution
    How often this will be executed?This is a library for loading files into tables and executing dynamic validation procedures.
    Here's an example of the mechanics:
    create or replace package mypack as
         function one return number ; -- public function
         procedure execute_it( p_name VARCHAR2 ) ;
    end ;
    create or replace package body mypack as
    function one return number is
    begin
    return 1 ;
    end ;
    function two( i number, s varchar2 ) return number is -- private function
    begin
    return 2 ;
    end ;
    procedure execute_it( p_name VARCHAR2 ) is
    select_str VARCHAR2( 1000 ) ;
    v_num NUMBER ;
    cur NUMBER ;
    nf NUMBER ;
    begin
    select_str := 'SELECT '||p_name||' FROM dual' ;
    cur := dbms_sql.open_cursor ;
    dbms_sql.parse( cur,select_str,dbms_sql.v7 ) ;
    dbms_sql.define_column( cur,1, v_num ) ;
    nf := dbms_sql.execute( cur ) ;
    IF dbms_sql.fetch_rows( cur ) = 0 THEN
    RAISE no_data_found ;
    END IF ;
    dbms_sql.column_value( cur, 1, v_numero ) ;
    dbms_output.put_line( p_name||' returns '||v_num ) ;
    dbms_sql.close_cursor( cur ) ;
    end ;
    end ;
    begin
    mypack.execute_it( 'mypack.one' ) ; -- Call public function: Works fine
    mypack.execute_it( 'two(234,''v'')' ) ; -- Call private function: error 0904
    end ;
    Thanks for your hints
    RuBeck
    PS: The indentation is lost when I post the message! I wrote it indented!

  • Oracle Function call from JDBC Adapter

    Hi,
      Is it possible to call Custom Oracle Function from JDBC Adapter? 
    I know we can call stored procedure but I need to call Oracle function. Please explain how?
    Regards,
    Shweta.

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • Oracle function call from XSQL

    Hi, Steve,
    We have trouble to make a function call in XSQL. Here is what we have.
    Function:
    create or replace function VerifyUser (valid in varchar2)
    return varchar2
    is
    begin
    return(valid);
    end;
    XSQL call:
    <PAGE xmlns:xsql="urn:oracle-xsql" connection="demo" istrue="ISTRUE">
    <xsql:query>
    select VerifyUser('{@istrue}') from DUAL
    </xsql:query>
    </PAGE>
    Error message returned:
    <PAGE istrue="ISTRUE">
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Invalid character in name.</ERROR>
    </PAGE>
    Any idea what is wrong here?
    What we want is to get the out variable value onto the XSQL page.
    Thanks for help.
    null

    You'll need to provide a column alias for the function call:
    select func(val) as alias from dual

  • WinSCP not being executed when package is ran from job

    I have a package in the SSIS catalog. It worked fine when it ran in the file system, but like so many others, died when I called it from a job. I ran the problem down to the fact that the account that the job was running under didn't have access to the directories
    that the package was trying to access. That solved half my problem.
    In my package I'm calling WinSCP from a script task. I can tell the executable is not getting called. No errors are being thrown. I gave the account in question full access to the folder where WinSCP resides but that didn't fix the issue. What else do I
    need to look at?

    Arthur, WinSCP has logging functionality. When the executable gets called a log file is created. No log file is being created. I did pull that particular piece of functionality out of the package and unit tested it and it worked fine which has only caused
    me further frustration.
    I am currently getting this series of errors which I only just found:
    The expression for the variable "InitialDirectoryFullPath" failed evaluation. There was an error in the expression.
    The variable "User:RootFileDirectory" was not found in the variables collection.
    Attempt to parse the expression "@[User:RootFileDirectory] + @[InitalDirectory]" failed and returned error code 0xC00470A6. The expression cannot be parsed.
    This makes no sense as it runs just fine in other environments under other accounts. Only when I push this thing to a certain box does it fail like this. RootFileDirectory is being populated by a Windows Environment Variable and I thought the problem was
    there except there are other parts of the package that use that variable and they work just fine.

  • Bapi Function call from Crystal reports 2008. import parameters syntax.

    Dear,
    I have an issue with calling a function directly from Crystal reports (2008) in the R3 system.
    (if this belongs in another thread , please add the link if moved !)
    I try to get data through function "BAPI_CLASS_GET_CLASSIFICATIONS".
    Till now all possible input parameters have no data-result.
    I already read other threads stating that 'for example' the Language key needs to be provided in a single character. 'E' in stead of 'EN'.
    I also already created a Z-wrap-function that fills out all input parameters 'hardcoded'. This works.
    clearly there are som syntax changes in passing the values to R3 when called from Crystal Reports.
    Can someone state which syntax has to be followed for numeric fields, for datefields etc. (so when i make these dynamical, I know which syntax should be the outcome of the formula)
    in my function that doesn't work I use these selections:
    (this function is called in a standard report only calling this function)
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_ISO} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_LANGU_INT} = "E" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSNUM} = "DSWTEST" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_CLASSTYPE} = "001" and
    {BAPI_CLASS_GET_CLASSIFICATIONS_1.I_KEY_DATE} = Date (2011, 08, 05)
    I already tried other languages or the 'EN' as input.
    (I would like to know how the date is passed exaclty to R3.)
    The function is of course RFC enabled.
    when I call the my Z-function with predefined inputparameters in R3 it does give the wanted result.
    FUNCTION ZBAPI_CLASS_GET_CLASSIFICATION.
    ""Local Interface:
    *"  TABLES
    *"      OBJECT_CLASSIFICATION STRUCTURE  BAPI_OBJECT_VALUES
    *"      CLASS_OBJECTS STRUCTURE  BAPI_CLASS_OBJECTS
    data ZOBJECT_CLASSIFICATION type TABLE OF BAPI_OBJECT_VALUES.
    data ZCLASS_OBJECTS  type TABLE OF BAPI_CLASS_OBJECTS WITH HEADER LINE.
    ZCLASS_OBJECTS-OBJECT_KEY = '000000000000000085'.
    ZCLASS_OBJECTS-OBJECT_TYPE = 'MARA'.
    Append ZCLASS_OBJECTS.
    CALL FUNCTION 'BAPI_CLASS_GET_CLASSIFICATIONS'
      EXPORTING
        CLASSTYPE                    = '001'
        CLASSNUM                     = 'DSWTEST'
    *   KEY_DATE                     = SY-DATUM
    *   LANGU_ISO                    =
    *   LANGU_INT                    =
    *   CHARACTS_OF_CLASS_ONLY       =
    * IMPORTING
    *   RETURN                       =
      TABLES
        OBJECT_CLASSIFICATION        = ZOBJECT_CLASSIFICATION
        CLASS_OBJECTS                = ZCLASS_OBJECTS
    OBJECT_CLASSIFICATION[] = ZOBJECT_CLASSIFICATION[].
    ENDFUNCTION.
    please advise.
    once again if this should be moved to another forum , add the link please!

    Dear,
    I just debugged my Z-function, after adding all input parameters as in the standard BAPI function.
    All parameters seems to be passed correctly except from the table parameters from
    CLASS_OBJECTS
    So all I_parameters are passed :
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_INT} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_LANGU_ISO} = "EN" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_KEY_DATE} = Date (2011, 08, 05) and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSNUM} = "DSWTEST" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CLASSTYPE} = "001" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.I_CHARACTS_OF_CLASS_ONLY.BAPIFLAG} = ""
    but the table parameters aren't coming through:
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_TYPE} = "MARA" and
    {ZBAPI_CLASS_GET_CLASSIFICATION.T_CLASS_OBJECTS.OBJECT_KEY} = "000000000000000085" and
    these are 'blanco' in the function.
    also after the function is executed and all data is retrieved, when passing the data back to Crystal reports, once again, the table result isn't passed to Crystal Reports.
    please advise

  • Duration of an Abap Function call from Java using Jco3

    Hi guys!
    I would like to use this discussion to get some refernces of the duration Timespan of an RFC call from Java to SAP. At the moment, i need at last about 200ms to call the Abap function. I'm just using one simple import and export parameter (so no deep structures). I think that the reason for my poor performance is, that the Java Tool and the SAP instance are not in the same network. So, i hope some of you have some data, how fast an RFC call from Java using Jco can be executed.
    greetings, Hannes

    Hi Hannes,
    I think you have already got the answer to your question - the network set-up you have is probably the bottleneck.  Whenever I've worked with Java <-> ABAP and they are in the same network, I've had no performance problems at all.
    Does your RFC contain any complex logic or business processes?  Are you able to try and call something that does nothing, say it just accepts an input string and returns it straight away as an export.  Do you have any scope for testing with your Java tool on the same network as the SAP system?
    Cheers,
    G.

  • Oracle Package Function

    hello,
    I have written a package function but I cannot call it from .net environment correctly.
    I want to ask you that is there anything wrong in the package:
    Specification Part:
    CREATE OR REPLACE PACKAGE SAGECM AS
    TYPE T_CURSOR IS REF CURSOR;
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    RETURN NUMBER;
    END SAGECM;
    Body Part:
    CREATE OR REPLACE PACKAGE BODY SAGECM AS
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    RETURN NUMBER
    IS
    BEGIN
    SELECT count(*) INTO num_of_req FROM SAGECM_REQ WHERE ID=p_ID AND Version=p_version;
    return num_of_req;
    END COUNTREQ;
    END SAGECM;

    is there anything wrong in the packageYes. You are attempting to RETURN an OUT parameter. This is bad. I suspect you don't understand the difference between a procedure and a function....
    CREATE OR REPLACE PACKAGE SAGECM AS
    TYPE T_CURSOR IS REF CURSOR;
    FUNCTION COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2
    RETURN NUMBER;
    PROCEDURE COUNTREQ
    p_ID IN VARCHAR2,
    p_version IN VARCHAR2,
    num_of_req OUT NUMBER
    END SAGECM;
    CREATE OR REPLACE PACKAGE BODY SAGECM AS
      FUNCTION COUNTREQ
          p_ID IN VARCHAR2,
          p_version IN VARCHAR2
        RETURN NUMBER
      IS
        return_value NUMBER;
      BEGIN
        SELECT count(*) INTO return_value
        FROM SAGECM_REQ
        WHERE ID=p_ID AND Version=p_version;
        RETURN return_value;
      END COUNTREQ;
      PROCEDURE COUNTREQ
          p_ID IN VARCHAR2,
          p_version IN VARCHAR2,
          num_of_req OUT NUMBER
        ) IS
      BEGIN
        num_of_req := COUNTREQ(p_ID,p_version);
      END COUNTREQ;
    END SAGECM;
    /Note: the above is for illutrative purposes only and is not intended as an example of good programming practice!
    Find out more in the docs!
    Cheers, APC

  • Help,I am trying to get function calls from a flash file within an embedded SMIL file to work with Netscape.

    Basically, the functions are on the html document in which the SMIL file is embedded and the flash file within the SMIL file calls the function from a button.
    The code on the html doc determines whether the browser is Netscape or IE and then executes the appropriate code. For ex. for Netscape the function is:
    document.radio.SetSource('video.smi')
    and for IE the function is:
    radio.SetSource('video.smi')
    All the function calls work fine in IE but in Netscape it does nothing.

    Basically, the functions are on the html document in which the SMIL file is embedded and the flash file within the SMIL file calls the function from a button.
    The code on the html doc determines whether the browser is Netscape or IE and then executes the appropriate code. For ex. for Netscape the function is:
    document.radio.SetSource('video.smi')
    and for IE the function is:
    radio.SetSource('video.smi')
    All the function calls work fine in IE but in Netscape it does nothing.

  • Applet function call from javascript

    Hi,
    I'm haveing a problem with accesing applet's functions from Javascript in Mozilla. IE works fine but in Mozilla I get the following error:
    Error: document.applets[0] has no properties
    The code used is: document.applets[0].test();
    The applet has the following 2 tags defined, I don't know if they are necessary here but I'm doing the reverse too (applet functions call javascript).
    <PARAM name="MAYSCRIPT" value="Y">
    <PARAM name="SCRIPTABLE" value="Y">
    If you have any ideea please help.
    Thanks

    in javascript try document.getElementById("idOfTheApplet")
    use object tag instead of applet tag:
         <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
                  height="300" width="450" >
            <param name="code" value="appTest.class" />
            <!--[if !IE]> Mozilla/Netscape and its brethren -->
            <object classid="java:appTest.class"
                    height="300" width="450"
                    >
              <param name="mayscript" value=Y" />
            </object>
            <!-- <![endif]-->
          </object>or check out HtmlConverter.exe in the jdk bin dir.

Maybe you are looking for

  • Runtime error in IC_Agent

    Hi, I'm facing an error in IC_AGENT. The error log is : Cannot display view CRMCMP_BPIDENT/BuPaIdentifyCustomer of UI Component CRMCMP_BPIDENT An exception has occurred Exception Class  CX_BSP_WD_RUNTIME_ERROR - Component ICCMP_BP_DETAIL has not been

  • Need advice on recovering metadata

    Let me explain that subject line: I made a completely brain-dead move and accidentally deleted some RAW files (83 to be exact) after they were imported. LR says they're missing and I have not yet deleted them from the LR catalog. I used the lightroom

  • BPM Message Mapping: "Cannot produce target element /ns1:BAPI...."

    Hi, A scenario File - BPM - BAPI call was developed, as described in blog 'RFC scenario using BPM' cfr. link /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit The Mapping is as follows: MT_EDB_MATERIAL_REQ (1:1) --> BAPI_MATERIAL

  • Problem in VA05

    Dear all, I have little problem in VA05, in this report layout save option is not active , can anyone guide how to activate it. Regards, Talwinder

  • ORACLE EQUVALENT OF "EVALUATE" FUNCTION OF FOXPRO? or any other solution

    I have a string (varchar2) holding the following '39 + (25 /3) - 200' ,which is a argument to a function returning the value (numeric) of the expression contained in the string. for eg. Declare varstr varchar2(2000) := '10 + (75/3)*10'; value number;