Errror::Illegal number of arguments or types of arguments in XSLT

HI All,
In our scenario we are using XSLT mapping with java enhancement.Its working fine in Stylus studio but when the same is imported into XI its throwing the below mentioned error:
                 javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'Trans:Convert'.
Our requirement is that we are summing up the Field "Grant_Amount" which occurs multiple times in the source structure.PFB the XSL and the source XML:
<
XSL:
===
<Sum>
      <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
</Sum>
XML:
===
<Recordset>
      <DETAILRECORD>
         <Grant_Amount>$100.00</Grant_Amount>
      </DETAILRECORD>
      <DETAILRECORD>
         <Grant_Amount>$200.00</Grant_Amount>
      </DETAILRECORD>
</Recordset>
Java Code:
========
package com.company.group;
  public class String2Number
      public static String Convert(String[] a)
                      double sum=0;
                      String[] temp = new String[100];
                     for(int i=0;i<a.length;i++)
                              temp<i> = (a<i>).replaceAll("[,
$
                                     sum=sum+Double.parseDouble(temp<i>);
                        return sum+"";
>
Please guide me into the right solution.
Thanks and Regards,
Karanam

Thanq for your response,
But my stylesheet is as below
<
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.infosys.com/sap/xi/projects/sce/n1" xmlns:Trans="com.company.group.String2Number">
     <xsl:template match="/">
          <a:MT_TargetXSLJava>
               <Record>
                    <Detailrecord>
                         <Sum>
                              <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
                         </Sum>
                         <Flag>
                              <xsl:value-of select="//DETAILRECORD/Grant_Amount"/>
                         </Flag>
                    </Detailrecord>
               </Record>
          </a:MT_TargetXSLJava>
     </xsl:template>
</xsl:stylesheet>
>

Similar Messages

  • XSTL-JAVA error Illegal number of arguments or types of arguments in a call

    Hi All,
    I get this error when invoking my Java function from XSLT.I am passing Strings with global param defined like this .
    <xsl:param name="inputparam"/>
    <xsl:param name="gid" select="//GENERAL_ID"/>
    <xsl:param name="vtype" select="//VESSEL"/>
    <xsl:template match="/">
    <xsl:call-template name="setfilename">
    </xsl:call-template>
    </xsl:template>
    <xsl:template name="setfilename">
    <xsl:variable name="response"
    select ="javamap:SetTargetFile( $gid , $vtype , 'bol'  , $inputparam)"/>
    </xsl:template>
    java
    public static String SetTargetFile (String id ,String  type, String  ext,Map InputParam){}
    Any idea what is going wrong.
    Thanks in advance,
    Regards,
    Bikram

    Hi Stefan,
    Type casting  $gid and  $vtype to string solved my problem.
    select ="javamap:SetTargetFile( string($gid) , string($vtype) , 'bol' , $inputparam)".
    Thanks for your reply anyway.
    Regards,
    Bikram

  • Error: Illegal number of arguments passsed to the function call

    HI All,
    In our scenario we are using XSLT mapping with java enhancement.Its working fine in Stylus studio but when the same is imported into XI its throwing the below mentioned error:
    javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Illegal number of arguments or types of arguments in a call of function 'Trans:Convert'.
    Our requirement is that we are summing up the field "Grant_Amount" which occurs multiple times in the source structure and the sum is mapped to the field "Sum' on the target side.The stylesheet is working fine in stylus studio but whe  imported into XI the above mentioned error is being thrown.Can any one one please help me solving this issue.
    The XSL, the source XMLand the java class are mentioned below:
    <
    XSL:
    ===
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://www.infosys.com/sap/xi/projects/sce/n1" xmlns:Trans="com.company.group.String2Number">
         <xsl:template match="/">
              <a:MT_TargetXSLJava>
              <Record>
                   <Detailrecord>
                         <Sum>
                      <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
                         </Sum>
                          <Flag>
                     <xsl:text>1</xsl:text>     
                          </Flag>
                  </Detailrecord>
              </Record>
              </a:MT_TargetXSLJava>
         </xsl:template>
    </xsl:stylesheet>
    XML:
    ===
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_SourceXSLJava xmlns:ns0="http://www.infosys.com/sap/xi/projects/sce/n1">
       <Recordset>
          <DETAILRECORD>
             <Grant_Amount>$100.00</Grant_Amount>
          </DETAILRECORD>
          <DETAILRECORD>
             <Grant_Amount>$200.00</Grant_Amount>
          </DETAILRECORD>
          <summary_record>
             <Total>$300.00</Total>
          </summary_record>
       </Recordset>
    </ns0:MT_SourceXSLJava>
    Java Code:
    ========
    package com.company.group;
    public class String2Number
    public static double Convert(String[] a)
    double sum=0;
    String[] temp = new String100;
    for(int i=0;i<a.length;i++)
    temp = (a).replaceAll(",
    $
    sum=sum+Double.parseDouble(temp);
    return sum;
    Please guide me to the right solution.
    Thanks and Regards,
    Karanam

    If you are using below mentioned java code for Convert method, then see you are passing a String Array, but in below statement:
    <xsl:value-of select="Trans:Convert(//Grant_Amount)"/>
    This is just a single value i think, you have to pass an array with values 100,200,300. Pls check it.
    BR,
    Alok

  • PLS-00306: wrong number or types of arguments  help!!!

    Hi,
    I am new to pl/sql programming I am stuck into oracle error for my code. Plz help me with this issue my code is as follow:
    CREATE OR REPLACE PROCEDURE raise_salary
    (emp_id IN employee.employee_nb%TYPE,
    amount IN employee.salary%TYPE,
    emp_name OUT employee.employee_name%TYPE)
    IS
    BEGIN
    UPDATE employee SET salary= salary+amount WHERE employee_nb = emp_id;
    SELECT employee_name INTO emp_name FROM employee WHERE employee_nb=emp_id;
    DBMS_OUTPUT.PUT_LINE('SALARY HAS BEEN UPDATED FOR ' || emp_name);
    END;
    errror:
    Error report:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'RAISE_SALARY'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    There is a problem with emp_name OUT employee.employee_name%TYPE parameter. OUT means WRITE ONLY, IN means READ ONLY. So you can not read from an OUT parameter and you are trying to do that in the line
    DBMS_OUTPUT.PUT_LINE('SALARY HAS BEEN UPDATED FOR ' || emp_name);
    CREATE OR REPLACE PROCEDURE raise_salary(emp_id   IN employee.employee_nb%TYPE,
                                             amount   IN employee.salary%TYPE,
                                             emp_name OUT employee.employee_name%TYPE) IS
    BEGIN
      UPDATE employee SET salary = salary + amount WHERE employee_nb = emp_id;
      SELECT employee_name
        INTO emp_name
        FROM employee
       WHERE employee_nb = emp_id;
    /*** DBMS_OUTPUT.PUT_LINE('SALARY HAS BEEN UPDATED FOR ' || emp_name); ***/
      --Problem in in the above line. emp_name IS Declared AS OUT
      --So it is WRITE ONLY. You can not read from it within the procedure.
    END;What you can do is to declare that parameter as IN OUT like
    CREATE OR REPLACE PROCEDURE raise_salary(emp_id   IN employee.employee_nb%TYPE,
                                             amount   IN employee.salary%TYPE,
                                             emp_name IN OUT employee.employee_name%TYPE)but there is some other more elegant and better way to do this without hitting the table twice (one for update and one for selecting the name) using RETURNING clause.
    SQL> CREATE OR REPLACE PROCEDURE raise_salary(emp_id   IN emp.empno%TYPE,
      2                                           amount   IN emp.sal%TYPE,
      3                                           emp_name IN OUT emp.ename%TYPE) IS
      4  BEGIN
      5    UPDATE emp
      6       SET sal = sal + amount
      7     WHERE empno = emp_id RETURNING ename INTO emp_name;
      8    DBMS_OUTPUT.PUT_LINE('SALARY HAS BEEN UPDATED FOR ' || emp_name);
      9  END raise_salary;
    10  /
    Procedure created.
    SQL> set serverout on
    SQL> DECLARE
      2  v_name emp.ename%TYPE;
      3  BEGIN
      4  raise_salary(7369,100,v_name);
      5  END;
      6  /
    SALARY HAS BEEN UPDATED FOR SMITH
    PL/SQL procedure successfully completed.
    SQL> NOTE: There is no commit or rollback in this (as in your original example). So you have to issue implicit commit or rollback.
    Edited by: Saubhik on Oct 29, 2010 11:44 PM
    Edited by: Saubhik on Oct 29, 2010 11:50 PM

  • PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMI

    I am trying to submit the payables open interface import program using BPEL process. BUT I am unable to submit the concurrent program. The invoke function is failing with below message.
    [2010/08/25 17:06:22] Faulted while invoking operation "OFAPOPIIMPORT" on provider "OFAPOPIIMPORT".less
    -<messages>
    -<input>
    -<Invoke_1_OFAPOPIIMPORT_InputVariable>
    -<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    -<InputParameters xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XX_BPEL_FND_REQUEST_SUBMIT_REQ/FND_REQUEST-24SUBMIT_REQUEST/" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/XX_BPEL_FND_REQUEST_SUBMIT_REQ/FND_REQUEST-24SUBMIT_REQUEST/">
    <db:APPLICATION>200</db:APPLICATION>
    <db:PROGRAM>APXIIMPT</db:PROGRAM>
    <db:DESCRIPTION>Test</db:DESCRIPTION>
    <db:START_TIME/><db:SUB_REQUEST/>
    <db:OperatingUnit>NYSIF</db:OperatingUnit>
    <db:Source>DBL</db:Source>
    <db:Group/>
    <db:BatchName>TESTRAMBPEL1</db:BatchName>
    <db:HoldName/>
    <db:HoldReason/>
    <db:GLDate/>
    <db:Purge>N</db:Purge>
    <db:TraceSwitch>N</db:TraceSwitch>
    <db:DebugSwitch>N</db:DebugSwitch>
    <db:SummarizeReport>N</db:SummarizeReport>
    <db:CommitBatchSize>1000</db:CommitBatchSize>
    <db:UserID>4842</db:UserID>
    <db:LoginID>1683090</db:LoginID>
    </InputParameters>
    </part>
    </Invoke_1_OFAPOPIIMPORT_InputVariable>
    </input>
    -<fault>
    -<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>6550
    </code>
    </part>
    -<part name="summary">
    <summary>
    file:/C:/product/10.1.3.1/OraBPEL_1/bpel/domains/default/tmp/.bpel_APOPIIMPORT_1.0_91d4c6c1050ed25d005bc0d396a9db24.tmp/OFAPOPIIMPORT.wsdl [ OFAPOPIIMPORT_ptt::OFAPOPIIMPORT(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'OFAPOPIIMPORT' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.XX_BPEL_FND_REQUEST_SUBMIT_REQ.FND_REQUEST$SUBMIT_REQUEST API. Cause: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.XX_BPEL_FND_REQUEST_SUBMIT_REQ.FND_REQUEST$SUBMIT_REQUEST API. Cause: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part>
    -<part name="detail">
    <detail>
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    </detail>
    </part>
    </remoteFault>
    </fault>
    </messages>
    [2010/08/25 17:06:22] "{http://schemas.oracle.com/bpel/extension}remoteFault" has been thrown. More...
    -<remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    -<part name="code">
    <code>6550
    </code>
    </part>
    -<part name="summary">
    <summary>
    file:/C:/product/10.1.3.1/OraBPEL_1/bpel/domains/default/tmp/.bpel_APOPIIMPORT_1.0_91d4c6c1050ed25d005bc0d396a9db24.tmp/OFAPOPIIMPORT.wsdl [ OFAPOPIIMPORT_ptt::OFAPOPIIMPORT(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'OFAPOPIIMPORT' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.XX_BPEL_FND_REQUEST_SUBMIT_REQ.FND_REQUEST$SUBMIT_REQUEST API. Cause: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ; nested exception is:
         ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.XX_BPEL_FND_REQUEST_SUBMIT_REQ.FND_REQUEST$SUBMIT_REQUEST API. Cause: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    [Caused by: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    </summary>
    </part>
    -<part name="detail">
    <detail>
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00306: wrong number or types of arguments in call to 'FND_REQUEST$SUBMIT_REQUEST'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    </detail>
    </part>
    </remoteFault>
    I thought I am providing the values for the required parameters. But still I am unable to submit. Could some one help me on fixing this issue?
    Thanks,

    That's probably your problem.
    Look at http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28351/T430238T430241.htm
    Search for "One-time Workaround for Concurrent Programs" in that document.

  • Pl. help debug - PLS-00306: wrong number or types of arguments in call

    Hi,
    I am trying to create a wrapper function to all a procedure in Oracle EBusiness Suite 11i.
    When I compile the following code
    ==========
    CREATE OR REPLACE PROCEDURE gme.KIL_ProcessAlloc IS
    vFileName VARCHAR2(30) := '1006251.csv';
    vLoc VARCHAR2(20) := '/u041/applmgr/opm/opmappl/utllog';
    v_InHandle utl_file.file_type;
    vNewLine VARCHAR2(1000);
    vLineNo PLS_INTEGER;
    c1 PLS_INTEGER;
    c2 PLS_INTEGER;
    c3 PLS_INTEGER;
    c4 PLS_INTEGER;
    c5 PLS_INTEGER;
    c6 PLS_INTEGER;
    c7 PLS_INTEGER;
    c8 PLS_INTEGER;
    c9 PLS_INTEGER;
    c10 PLS_INTEGER;
    c11 PLS_INTEGER;
    c12 PLS_INTEGER;
    c13 PLS_INTEGER;
    c14 PLS_INTEGER;
    c15 PLS_INTEGER;
    c16 PLS_INTEGER;
    c17 PLS_INTEGER;
    c18 PLS_INTEGER;
    c19 PLS_INTEGER;
    c20 PLS_INTEGER;
    c21 PLS_INTEGER;
    c22 PLS_INTEGER;
    c23 PLS_INTEGER;
    c24 PLS_INTEGER;
    c25 PLS_INTEGER;
    c26 PLS_INTEGER;
    c27 PLS_INTEGER;
    c28 PLS_INTEGER;
    c29 PLS_INTEGER;
    c30 PLS_INTEGER;
    c31 PLS_INTEGER;
    c32 PLS_INTEGER;
    c33 PLS_INTEGER;
    c34 PLS_INTEGER;
    TYPE AllocArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
    INDEX BY BINARY_INTEGER;
    l_Allocdata AllocArray;
    TYPE MtlDetailArray IS TABLE OF gme_material_details%ROWTYPE
    INDEX BY BINARY_INTEGER;
    l_MtlDetaildata MtlDetailArray;
    TYPE xTranArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
    INDEX BY BINARY_INTEGER;
    l_xtrandata xTranArray;
    TYPE defTranArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
    INDEX BY BINARY_INTEGER;
    l_deftrandata defTranArray;
    t_messagecount number;
    t_messagelist varchar2(10000);
    t_returnstatus varchar2(1);
    BEGIN
    v_InHandle := utl_file.fopen(vLoc, vFileName, 'r');
    vLineNo := 1;
    LOOP
    BEGIN
    utl_file.get_line(v_InHandle, vNewLine);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    EXIT;
    END;
    vNewLine := TRANSLATE(vNewLine, 'A''', 'A');
    c1 := INSTR(vNewLine, ',', 1,1);
    c2 := INSTR(vNewLine, ',', 1,2);
    c3 := INSTR(vNewLine, ',', 1,3);
    c4 := INSTR(vNewLine, ',', 1,4);
    c5 := INSTR(vNewLine, ',', 1,5);
    c6 := INSTR(vNewLine, ',', 1,6);
    c7 := INSTR(vNewLine, ',', 1,7);
    c8 := INSTR(vNewLine, ',', 1,8);
    c9 := INSTR(vNewLine, ',', 1,9);
    c10 := INSTR(vNewLine, ',', 1,10);
    c11 := INSTR(vNewLine, ',', 1,11);
    c12 := INSTR(vNewLine, ',', 1,12);
    c13 := INSTR(vNewLine, ',', 1,13);
    c14 := INSTR(vNewLine, ',', 1,14);
    c15 := INSTR(vNewLine, ',', 1,15);
    c16 := INSTR(vNewLine, ',', 1,16);
    c17 := INSTR(vNewLine, ',', 1,17);
    c18 := INSTR(vNewLine, ',', 1,18);
    c19 := INSTR(vNewLine, ',', 1,19);
    c20 := INSTR(vNewLine, ',', 1,20);
    c21 := INSTR(vNewLine, ',', 1,21);
    c22 := INSTR(vNewLine, ',', 1,22);
    c23 := INSTR(vNewLine, ',', 1,23);
    c24 := INSTR(vNewLine, ',', 1,24);
    c25 := INSTR(vNewLine, ',', 1,25);
    c26 := INSTR(vNewLine, ',', 1,26);
    c27 := INSTR(vNewLine, ',', 1,27);
    c28 := INSTR(vNewLine, ',', 1,28);
    c29 := INSTR(vNewLine, ',', 1,29);
    c30 := INSTR(vNewLine, ',', 1,30);
    c31 := INSTR(vNewLine, ',', 1,31);
    c32 := INSTR(vNewLine, ',', 1,32);
    c33 := INSTR(vNewLine, ',', 1,33);
    c34 := INSTR(vNewLine, ',', 1,34);
    -- l_allocdata(vLineNo).sourceno := SUBSTR(vNewLine,1,c1-1);
    -- l_allocdata(vLineNo).sizeno := SUBSTR(vNewLine,c1+1,c2-c1-1);
    -- l_allocdata(vLineNo).status := SUBSTR(vNewLine,c2+1,c3-c2-1);
    -- l_allocdata(vLineNo).latitude := SUBSTR(vNewLine,c3+1,c4-c3-1);
    -- l_allocdata(vLineNo).longitude := SUBSTR(vNewLine,c4+1,c5-c4-1);
    -- l_allocdata(vLineNo).testfor := SUBSTR(vNewLine,c5+1);
    l_allocdata(vLineNo).trans_id := SUBSTR(vNewLine,1,c1-1);
    l_allocdata(vLineNo).item_id := SUBSTR(vNewLine,c1+1,c2-c1-1);
    l_allocdata(vLineNo).co_code := SUBSTR(vNewLine,c2+1,c3-c2-1);
    l_allocdata(vLineNo).orgn_code := SUBSTR(vNewLine,c3+1,c4-c3-1);
    l_allocdata(vLineNo).whse_code := SUBSTR(vNewLine,c4+1,c5-c4-1);
    l_allocdata(vLineNo).lot_id := SUBSTR(vNewLine,c5+1,c6-c5-1);
    l_allocdata(vLineNo).location := SUBSTR(vNewLine,c6+1,c7-c6-1);
    l_allocdata(vLineNo).doc_id := SUBSTR(vNewLine,c7+1,c8-c7-1);
    l_allocdata(vLineNo).doc_type := SUBSTR(vNewLine,c8+1,c9-c8-1);
    l_allocdata(vLineNo).doc_line := SUBSTR(vNewLine,c9+1,c10-c9-1);
    l_allocdata(vLineNo).line_type := SUBSTR(vNewLine,c10+1,c11-c10-1);
    l_allocdata(vLineNo).reason_code := SUBSTR(vNewLine,c11+1,c12-c11-1);
    l_allocdata(vLineNo).trans_date := SUBSTR(vNewLine,c12+1,c13-c12-1);
    l_allocdata(vLineNo).trans_qty := SUBSTR(vNewLine,c13+1,c14-c13-1);
    l_allocdata(vLineNo).trans_qty2 := SUBSTR(vNewLine,c14+1,c15-c14-1);
    l_allocdata(vLineNo).qc_grade := SUBSTR(vNewLine,c15+1,c16-c15-1);
    l_allocdata(vLineNo).lot_status := SUBSTR(vNewLine,c16+1,c17-c16-1);
    l_allocdata(vLineNo).trans_stat := SUBSTR(vNewLine,c17+1,c18-c17-1);
    l_allocdata(vLineNo).trans_um := SUBSTR(vNewLine,c18+1,c19-c18-1);
    l_allocdata(vLineNo).trans_um2 := SUBSTR(vNewLine,c19+1,c20-c19-1);
    l_allocdata(vLineNo).completed_ind := SUBSTR(vNewLine,c20+1,c21-c20-1);
    l_allocdata(vLineNo).staged_ind := SUBSTR(vNewLine,c21+1,c22-c21-1);
    l_allocdata(vLineNo).gl_posted_ind := SUBSTR(vNewLine,c22+1,c23-c22-1);
    l_allocdata(vLineNo).event_id := SUBSTR(vNewLine,c23+1,c24-c23-1);
    l_allocdata(vLineNo).text_code := SUBSTR(vNewLine,c24+1,c25-c24-1);
    l_allocdata(vLineNo).transaction_no := SUBSTR(vNewLine,c25+1,c26-c25-1);
    l_allocdata(vLineNo).action_code := SUBSTR(vNewLine,c26+1,c27-c26-1);
    l_allocdata(vLineNo).material_detail_id := SUBSTR(vNewLine,c27+1,c28-c27-1);
    l_allocdata(vLineNo).organization_id := SUBSTR(vNewLine,c28+1,c29-c28-1);
    l_allocdata(vLineNo).locator_id := SUBSTR(vNewLine,c29+1,c30-c29-1);
    l_allocdata(vLineNo).subinventory := SUBSTR(vNewLine,c30+1,c31-c30-1);
    l_allocdata(vLineNo).alloc_um := SUBSTR(vNewLine,c31+1,c32-c31-1);
    l_allocdata(vLineNo).alloc_qty := SUBSTR(vNewLine,c32+1,c33-c32-1);
    l_allocdata(vLineNo).def_trans_ind := SUBSTR(vNewLine,c33+1,c34-c33-1);
    vLineNo := vLineNo+1;
    END LOOP;
    utl_file.fclose(v_InHandle);
    FOR i IN 1..vLineNo-1 loop
    GME_API_PUB.insert_line_allocation (
         1,
         100,
         FALSE,
         True,
         l_allocdata(i),
         null,
         null,
         false,
         false,
         false,
         l_MtlDetailData,
         l_xtrandata,
         l_deftrandata,
         t_messagecount,
         t_messagelist,
         t_returnstatus);
    end loop;
         IF (t_returnstatus <> 'S') THEN
    for i IN 1 .. t_messagecount LOOP
    dbms_output.put_line('The text is '||FND_MSG_PUB.get(i,t_messagelist));
    END LOOP;
    END IF;
    -- COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE;
    END KIL_ProcessAlloc;
    ===============
    I get this
    Warning: Procedure created with compilation errors.
    SQL> sho err
    Errors for PROCEDURE GME.KIL_PROCESSALLOC:
    LINE/COL ERROR
    145/8 PLS-00306: wrong number or types of arguments in call to
    'INSERT_LINE_ALLOCATION'
    145/8 PL/SQL: Statement ignored
    =================
    The package specs of GME_API_PU is under:
    ===============
    PROCEDURE insert_line_allocation (
    p_api_version IN NUMBER := gme_api_pub.api_version
    ,p_validation_level IN NUMBER := gme_api_pub.max_errors
    ,p_init_msg_list IN BOOLEAN := FALSE
    ,p_commit IN BOOLEAN := FALSE
    ,p_tran_row IN gme_inventory_txns_gtmp%ROWTYPE
    ,p_lot_no      IN     VARCHAR2 DEFAULT NULL
    ,p_sublot_no      IN     VARCHAR2 DEFAULT NULL
    ,p_create_lot     IN BOOLEAN DEFAULT FALSE
    ,p_ignore_shortage     IN BOOLEAN DEFAULT FALSE
    ,p_scale_phantom     IN BOOLEAN DEFAULT FALSE
    ,x_material_detail     OUT gme_material_details%ROWTYPE
    ,x_tran_row     OUT gme_inventory_txns_gtmp%ROWTYPE
    ,x_def_tran_row     OUT gme_inventory_txns_gtmp%ROWTYPE
    ,x_message_count OUT NUMBER
    ,x_message_list OUT VARCHAR2
    ,x_return_status     OUT VARCHAR2);
    GME_API_PUB.insert_line_allocation
    ===========
    What am I doing wrong...why am I getting PLS-00306.
    Can someone help?
    Thank you
    Sundar
    [email protected]

    Hi John,
    Thanks a ton - a nice Christmas gift. Thank you for being a Santa :-).
    I used the same subscript as the one used for in parameter and the procedure compiled without errors.
    A corollary: If (any of the) Out parameter is null (all columns of the row/array), will the array row element still be stored ? May be I cross the bridge when I come to it.
    Merry Christmas.
    Sundar

  • Issue with proc-ora-06550 wrong number or types of arguments in call to

    Hi....
    When i am running the flollwing procedure as
    SQL> exec Prc_WA_Default_Currt_flag(15445);
    the following error is thrown.......could someone help me and please let me know how this can be corrected.
    BEGIN Prc_WA_Default_Currt_flag(15445); END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to
    'PRC_WA_DEFAULT_CURRT_FLAG'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    ***proc code****
    CREATE OR REPLACE procedure Prc_WA_Default_Currt_flag(Instance_Id_Upd_in in number,dummy1 out number) as
    Instance_Id_Upd1 number;
    dummy2 number;
    cursor c1 is select rwid from wa_temp_default;
    begin
    Instance_Id_Upd1:=Instance_Id_Upd_in;
    for i in c1 loop
    update default_event_log set current_flag=null,Instance_id_upd=Instance_Id_Upd1
    where rowid =i.rwid and load_date<(select currLoadtime from wa_batch where
    jobname='Default_event_log') and current_flag='Y';
    end loop;
    commit;
    for i in c1 loop
    update default_event_log set current_flag='Y'
    where load_date>=(select currLoadtime from wa_batch where
    jobname='Default_event_log') and rowid=i.rwid;
    end loop;
    commit;
    select to_number(Instance_Id_Upd1) into dummy1 from dual;
    end;
    /

    Hi,
    Since it contains an out parameter it has to run this way
    declare
    dummy_out number;
    begin
    prc_wa_default_currt_flag(15445,dummy_out);
    end;Regards
    Anurag

  • PLS-00306: wrong number or types of arguments in call in a for loop

    Dear all
    I recently put up another post about the same error message but as the message now relates to another part of my programme and, in my mind at least, a different conceptual idea, I thought I should start a new top. If that is not right thing to have done then please let me know. I am working in 10.2.
    I am trying to pass through multiple variables. When I run the code at the end of this question I get an error message:
    PLS-00306: wrong number or types of arguments in call to 'CUR_MAP_LIST'This relates to the line:
    FOR var_map_list IN cur_map_list (par_map_list (n))I think the reason the error message comes up is because par_map_list is a associate array / PL/SQL table and cur_map_list is based on %rowtype. Although I could be wrong. However I am not sure what I should be doing so that I don't get such an error message.
    I was reading through page 623 on Web Development 9i (by Brown; pub. McGrew-Hill) and pages 357-358 of Oracle Web Application Programming for PL/SQL Developers (by Boardman, Caffrey, Morse, Rosenzweig; pub. Prentice Hall), in order to try and write my code. As well as Oracle's Application Developer’s Guide - Fundamentals (Release 2), page 11-6. In particular the Web Development book uses the following:
    create or replace procedure query_department
    (in_dept_no owa_util.ident_arr)
    is
    cursor dept_cursor (nbt_dept_no emp.deptno%TYPE) is
    select empno, ename, mgr, sal, comm
    from scott.emp
    where deptno = nbt_dept_no;
    begin
      for x in 1 .. in_dept_no.count loop
        for dept_rec in dept_cursor(in_dept_no (x)) loop
        end loop;
      end loop;
    end;In that example the cursor selects empno, ename, mgr, sal and comm from emp. So if it is doing that the cursor must be of a VARCHAR2 and NUMBER data type. What I don't understand is the for dept_rec in part. For a start I am not sure where dept_rec comes from? If it is a NUMBER data type, how can the in_dept_no, which is a owa_util.ident_arr associate array / PL/SQL data type work with it. Unfortunately because the example is incomplete and doesn't include procedures relating to the in variables, I am unable to run it and try and learn from what it is doing, so that I can try and relate the concept to my own work.
    My programme is as follows. There may be other errors in the code not relating to this error. If so I hope to find these and resolve them once I understand what I should be doing here:
    --Global variables--
    gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
    gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
    gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
    --Main calling programming--
    PROCEDURE MAPS AS
    empty owa_util.ident_arr;
    var_xml_theme VARCHAR2(32767);
    BEGIN
    PROCMAPLIST (empty, var_xml_theme);
    END maps;
    --create checkboxes--
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT owa_util.ident_arr,
      par_xml_theme OUT VARCHAR2
      AS
       CURSOR cur_map_list IS
        SELECT MT.map_title
               MI.map_id
               OMSN.map_sheet_number_id
               WRMF.web_raster_map_id
         FROM MAP_TITLE MT
              MAP_INFO MI
              MAP_SHEET_NUMBER OMSN,
              WEB_RASTER_MAP_FILE WRMF,
          WHERE MI.map_title_id = MT.map_title_id
          AND   MI.map_id = OMSN.map_id
          AND   WRMF.map_id = MI.map_id
          AND   WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
        var_map_list cur_map_list%ROWTYPE;
        var_xml_theme VARCHAR2(32767);
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.headClose;
    htp.bodyOpen;
    htp.print('<FORM METHOD = "post"
                     ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
        htp.print('<FIELDSET>
                     <LEGEND> Select the maps you wish to display </LEGEND>');
      FOR n IN 1 .. par_map_list.COUNT
      LOOP
      FOR var_map_list IN cur_map_list (par_map_list (n))
      LOOP
    htp.print('       <UL>
                       <LI>
                        <LABEL FOR = "WRMF'||
                                      var_map_list.web_raster_map_id||'">
                         <INPUT type = "checkbox"
                                id = "WRMFB'||
                                      var_map_list.web_raster_map_id||'"
                                name = "WRMFB'||
                                        var_map_list.web_raster_map_id||'"
                                value = "'||var_map_list.web_raster_map_id||'"
                                />
                                 Map title: '|| var_map_list.map_title||'<BR>
                                 Sheet number: '||var_map_list.map_sheet_number||'');
                        htp.print('</LABEL>
                       </LI>
                      </UL>');
        END LOOP;
      END LOOP;
         htp.print('</FIELDSET>');
         htp.print('<p>
                     <INPUT TYPE = "submit"
                            NAME = "Display&nbspselected&nbspmaps"
                            VALUE = "Display selected maps" />
                      </FORM>');
    htp.bodyClose;
    END PROCCHECKLIST;Thank you for reading. Kind regards
    Tim

    Dear everyone
    I have now resolved the problems I was having with multiple values and checkboxes, thanks to comments in this thread, read large chucks of Oracle PL/SQL Programming by Steve Feuerstein and suddenly realising where I am going wrong in terms of thinking.
    For a start, I when I was dealing with the multiple values, I was trying to get PL/SQL to pass them out. Of course this is done by the action part of the input form. Although I have not done much web coding, I did know about this. However because I was so engrossed in trying to understand how multiple values work, I didn't relate the two ideas. I even mind mapping the problem and still didn't get it.
    I also did not think to change my the action from post command to get, so that I could see what was coming out. However that would not have made too much of a difference because the other problem I had was related to where sub programmes were declared. The function which received the values was privately declared, and not in the package spec. This meant the web browser could not find the function as that can only make use of the programmes declared publicly.
    Once I made these changes, as well as correcting other minor typing mistakes, the values passed through as expected. The only other mistake I made was to include the name option after the submit input type. In my case I did not need to submit the value of that button. The revised code is as follows. In this version I replaced the function with a procedure that simply prints the checkbox values to screen. I have also made the input form action get, instead of post, so that the values can be seen in the web browser address bar:
    create or replace
    PACKAGE MAPSITE AS
    PROCEDURE MAPS;
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT OWA_UTIL.IDENT_ARR
    PROCEDURE PROCDISPLAY
    (maplist IN OUT OWA_UTIL.IDENT_ARR);
    END MAPSITE;
    create or replace
    PACKAGE BODY MAPSITE AS
    --Global variables--
    gvar_mapviewer_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/mapviewer/omserver';
    gvar_proc_host VARCHAR2(56) := 'http://tiger.iso.port.ac.uk:7785/www/geg50160';
    gvar_xml_request VARCHAR2(100) :='?xml_request=<?xml version="1.0" standalone="yes"?>';
    --Main calling programming--
    PROCEDURE MAPS AS
    empty owa_util.ident_arr;
    BEGIN
    PROCCHECKLIST (empty);
    END MAPS;
    --create checkboxes--
    PROCEDURE PROCCHECKLIST
    (par_check_list IN OUT owa_util.ident_arr
      AS
       CURSOR cur_map_list IS
        SELECT MT.map_title,
               MI.map_id,
               OMSN.map_sheet_number_id,
               WRMF.web_raster_map_id
         FROM MAP_TITLE MT,
              MAP_INFO MI,
              MAP_SHEET_NUMBER OMSN,
              WEB_RASTER_MAP_FILE WRMF
          WHERE MI.map_title_id = MT.map_title_id
          AND   MI.map_id = OMSN.map_id
          AND   WRMF.map_id = MI.map_id
          AND   WRMF.map_sheet_number_id = OMSN.map_sheet_number_id;
    BEGIN
    htp.htmlOpen;
    htp.headOpen;
    htp.headClose;
    htp.bodyOpen;
    htp.print('<FORM METHOD = "post"
                     ACTION = "'||gvar_proc_host||'.mappackage.procdisplay">');
        htp.print('<FIELDSET>
                     <LEGEND> Select the maps you wish to display </LEGEND>');
      FOR var_map_list IN cur_map_list
      LOOP
    htp.print('       <UL>
                       <LI>
                        <LABEL FOR = "WRMF'||
                                      var_map_list.web_raster_map_id||'">
                         <INPUT type = "checkbox"
                                id = "WRMFB'||
                                      var_map_list.web_raster_map_id||'"
                                name = "maplist"
                                CHECKED = "' ||
                                           par_map_list ||'"
                                value = "'||var_map_list.web_raster_map_id||'"
                                />
                                 Map title: '|| var_map_list.map_title||'<BR>
                                 Sheet number: '||var_map_list.map_sheet_number||'');
                        htp.print('</LABEL>
                       </LI>
                      </UL>');
        END LOOP;
         htp.print('</FIELDSET>');
         htp.print('<p>
                     <INPUT TYPE = "submit"
                            VALUE = "Display selected maps" />
                      </FORM>');
    htp.bodyClose;
    END PROCCHECKLIST;
    ---PROCDISPLAY PROCEDURE---
    PROCEDURE PROCDISPLAY (maplist IN OUT owa_util.ident_arr)
    IS
    BEGIN
    FOR n IN 1..maplist.COUNT
    LOOP
      htp.print('Checkbox value i.e. var_map_list.web_raster_map_id is: ' ||maplist(n)||'
    <P>');
    END LOOP;
    END PROCDISPLAY;
    END MAPSITE;Kind regards
    Tim

  • PLS-00306 wrong number or types of arguments in call to 'PUT_LINE'

    Hi Guys,
    I'm practising the plsql workouts,during a anonymous PL/SQL block i got the below error,what the mistake i did ?
    declare
    v1 employee_290512%rowtype;
    cursor c1 is select * from employee_290512;
    begin
    open c1;
    loop
    fetch c1 into v1;
    exit when c1% notfound;
    dbms_output.put_line(v1);
    end loop;
    end;
    {/code}
    And i got the below error
    Error:
    ORA-06550: line 10, column 1:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 10, column 1:
    PL/SQL: Statement ignored
    /Error.
    Please help me on this.
    Regards
    Thelak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi there,
    i got the same error. kindly check what's wrong with my below coding;
    SQL> SET SERVEROUTPUT ON
    SQL> DECLARE
    2 TYPE Type_Tab_Data IS RECORD
    3 (
    4 ARMZIG_Q2SFX char(3),
    5 somme number(20,2),
    6 ARMZIG_Q2AN8 number(8),
    7 ARMZIG_Q2DOC number(8),
    8 ARMZIG_Q2DCT char(2),
    9 ARMZIG_Q2CO varchar2(15 char)
    10 );
    11 TYPE Tab_Data IS TABLE OF Type_Tab_Data INDEX BY BINARY_INTEGER ;
    12 t_flexnum5 Tab_Data;
    13 v_test pls_integer;
    14 v_text_erreur varchar2(200 char);
    15 BEGIN
    16 SELECT b.ARMZIG_Q2SFX,a.somme,a.ARMZIG_Q2AN8,a.ARMZIG_Q2DOC,a.ARMZIG_Q2DCT,a.ARMZIG_Q2CO
    17 BULK COLLECT INTO t_flexnum5
    18 from
    19 (
    20 SELECT sum(ARMZIG_Q2AAP/100)as somme,ARMZIG_Q2AN8,ARMZIG_Q2DOC,ARMZIG_Q2DCT,ARMZIG_Q2CO
    21 from ARMAST_ZIG_EUR
    22 where ENVZIG_ID = 'E'
    23 group by ARMZIG_Q2AN8,ARMZIG_Q2DOC,ARMZIG_Q2DCT,ARMZIG_Q2CO
    24 ) a, ARMAST_ZIG_EUR b
    25 where a.ARMZIG_Q2AN8 = b.ARMZIG_Q2AN8
    26 and a.ARMZIG_Q2DOC = b.ARMZIG_Q2DOC
    27 and a.ARMZIG_Q2DCT = b.ARMZIG_Q2DCT
    28 and a.ARMZIG_Q2CO = b.ARMZIG_Q2CO
    29 and b.ENVZIG_ID = 'E';
    30
    31 DBMS_OUTPUT.put_line(t_flexnum5);
    32
    33 END;
    34 /
    DBMS_OUTPUT.put_line(t_flexnum5);
    ERROR at line 31:
    ORA-06550: line 31, column 7:
    PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
    ORA-06550: line 31, column 7:
    PL/SQL: Statement ignored

  • Wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATU

    I have been strucK at a point in invoking the procedure which has a boolean parameter which when called from java program get error saying that "wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS'". the procedure is given below along with the calling java code , and the Errors.
    If i change the parameter data type to VARCHAR2 (the parameter hilighted in red) in the in the procedure and invoke it with the same method it works fine, even if i change the "callableStatement.setBoolean(1, true); to callableStatement.setInt(1, 1); it works fine.When i call it with setting the boolean to the procedure from my java i get a error. Im really confused whether is this a issue with oracle? or with java code.
    Please can any body suggest me any kind of solution! to over come this scenario.
    ///// java code
    public void testThePackage() throws ClassNotFoundException { Connection connection = null; connection = (Connection) getConnection(); CallableStatement callableStatement = null; try { callableStatement = connection .prepareCall("{call L_test.p_retrieve_oppty_order_status(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}"); callableStatement.setBoolean(1, true); // callableStatement.setString(1, "YES"); // callableStatement.setInt(1, 1); // callableStatement.setLong(1, 1L); callableStatement.setString(2, "SFA"); callableStatement.setString(3, "123421"); callableStatement.setLong(4, 1L); callableStatement.setLong(5, 123L); callableStatement.setLong(6, 345L); callableStatement.setInt(7, 10); callableStatement.setInt(8, 2435); callableStatement.setInt(9, 5675); callableStatement.registerOutParameter(10, Types.NUMERIC); // on_return_status callableStatement.registerOutParameter(11, Types.VARCHAR); // os_duns_no callableStatement.registerOutParameter(12, Types.VARCHAR); // os_hq_duns_no callableStatement.registerOutParameter(13, Types.NUMERIC); // on_approval_id callableStatement.registerOutParameter(14, Types.NUMERIC); // on_approval_amt callableStatement.registerOutParameter(15, Types.VARCHAR); // os_message callableStatement.registerOutParameter(16, Types.VARCHAR); // os_approval_cd callableStatement.registerOutParameter(17, Types.VARCHAR); // os_security_term_cd callableStatement.registerOutParameter(18, Types.VARCHAR); // action // code callableStatement.registerOutParameter(19, Types.VARCHAR); // action // message // txt callableStatement.execute(); connection.commit(); } catch (SQLException e) { System.out.println(e.getMessage()); } } [/code] /////procedure  CREATE OR REPLACE PACKAGE BODY cust.L_test IS  PROCEDURE p_retrieve_oppty_order_status          (isNonAttilaAttempt boolean          , is_system_cd VARCHAR2          , is_order_id VARCHAR2          , in_oppty_id NUMBER          , in_company_id VARCHAR2          , in_acct_id NUMBER          ,in_local_rev NUMBER          ,in_switched_rev NUMBER          ,in_dedicated_rev NUMBER          , on_return_status  OUT NUMBER          , os_duns_no OUT VARCHAR2          , os_hq_duns_no OUT VARCHAR2          , on_approval_id OUT NUMBER          , on_credit_balance OUT NUMBER            , os_message OUT VARCHAR2      , os_approval_cd OUT VARCHAR2      , os_security_term_cd OUT VARCHAR2      ,os_action_cd  OUT VARCHAR2      ,os_action_txt_msg OUT VARCHAR2) IS      io_return l_cdt_util.return_data_t;            action_cd VARCHAR2(20):= NULL;      flag boolean:=false;  BEGIN  if isNonAttilaAttempt =[color=red]true[/color]  then --'YES'  true  flag:=true;  end if;  insert into example (id,data,deleted) values(1,'Test','YES');        END p_retrieve_oppty_order_status;    END cust.L_test;      CREATE OR REPLACE PACKAGE BODY cust.L_test IS PROCEDURE p_retrieve_oppty_order_status         (isNonAttilaAttempt boolean         , is_system_cd VARCHAR2         , is_order_id VARCHAR2         , in_oppty_id NUMBER         , in_company_id VARCHAR2         , in_acct_id NUMBER         ,in_local_rev NUMBER         ,in_switched_rev NUMBER         ,in_dedicated_rev NUMBER         , on_return_status  OUT NUMBER         , os_duns_no OUT VARCHAR2         , os_hq_duns_no OUT VARCHAR2         , on_approval_id OUT NUMBER         , on_credit_balance OUT NUMBER         , os_message OUT VARCHAR2     , os_approval_cd OUT VARCHAR2     , os_security_term_cd OUT VARCHAR2     ,os_action_cd  OUT VARCHAR2     ,os_action_txt_msg OUT VARCHAR2) IS     io_return l_cdt_util.return_data_t;        action_cd VARCHAR2(20):= NULL;     flag boolean:=false; BEGIN if isNonAttilaAttempt =[color=red]true[/color]  then --'YES'  true flag:=true; end if; insert into example (id,data,deleted) values(1,'Test','YES');       END p_retrieve_oppty_order_status; END cust.L_test;    /////error ORA-06550: line 1, column 7:  wrong number or types of arguments in call to 'P_RETRIEVE_OPPTY_ORDER_STATUS'  line 1, column 7:  PL/SQL: Statement ignored                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi YoungWinston,
    I realy appriciate your comments on the standard of the code , i also accept procedure and code may not be readable,
    but the problem is not because of bloated call its just beacause of the Boolean parameter being passed throught the java code, and where as the SQL/PL does not allow BOOLEAN as paramater, please refer the below link for justification.
    what am expecting is , is there any solution to this problem (not a work arround solution).
    Please provide me with some sort of solution/hints or suggestions in achieving this solution,
    I would realy your effort
    Thanks
    ud
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/datatypes.htm#CJACJGBG
    Predefined PL/SQL BOOLEAN Data Type
    The BOOLEAN data type stores logical values, which you can use in logical operations. The logical values are the Boolean values TRUE and FALSE and the value NULL.
    The syntax for specifying an BOOLEAN data item is:
    BOOLEAN
    SQL has no data type equivalent to BOOLEAN; therefore you cannot use BOOLEAN variables or parameters in the following:
    SQL statements
    Built-in SQL functions (such as TO_CHAR)
    PL/SQL functions invoked from SQL statements
    You cannot insert the value TRUE or FALSE into a database column. You cannot retrieve the value of a database column into a BOOLEAN variable.
    To represent BOOLEAN values in output, use IF-THEN or CASE constructs to translate BOOLEAN values into another type (for example, 0 or 1, 'Y' or 'N', 'true' or 'false').

  • Getting issue while running the SP - wrong number or types of arguments in

    CREATE OR REPLACE PROCEDURE TestSPForOracle
    (cv_1 IN OUT SYS_REFCURSOR)
    AS
    BEGIN
    DELETE FROM tt_abc;
    INSERT INTO tt_abc (SELECT * FROM tblPrdCatMstr_TT);
         OPEN cv_1 FOR
    SELECT * FROM tt_abc;
    END;
    above mentioned sp code compile with warning, and when I try to run this SP getting below error -
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TESTSPFORORACLE'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Here I already created a temp table using below code -
    CREATE GLOBAL TEMPORARY TABLE tt_abc
    AS (
    SELECT *
    FROM tblPrdCatMstr_TT
    Any suggesstions?
    Edited by: 835891 on Feb 11, 2011 3:20 AM

    In that case we need to write all SPs again in the oracle mannerOf course, otherwise why do the migration.
    In my opinion, it's an utter waste of time and money migrating to Oracle if you're not going to accomodate the fundamental differences between different vendors and also play to their relative strengths.
    You can get what you've done to work.
    The issue is how you're calling it probably - you've not answered that question above.
    But it's crazy not to migrate away from temp table usage. It really is.
    Just do a search on the forum:
    http://forums.oracle.com/forums/search.jspa?threadID=&q=sql+server+temp+table&objID=f75&dateRange=lastyear&userID=&numResults=15&rankBy=10001

  • Wrong number or types of arguments

    Rearly need your help.
    I got error from run a package.procedure.
    SQL> exec pac_info.get_node_info;
    BEGIN pac_info.get_node_info; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_NODE_INFO'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    which is column 7? If I run this procedure in SQL Developer, I got no error.
    ================================================
    Below is my source:
    PROCEDURE get_node_info(p_insert OUT NUMBER, pUpdate OUT NUMBER)
    AS
    l_node pac_nodes.node_name%TYPE;
    l_insert NUMBER := 0;
    l_update NUMBER := 0;
    l_status VARCHAR2(200);
    BEGIN
    pac_util.register('pac_info','get_node_info');
    FOR tmp in (SELECT tmp.node_name
    , tmp.node_type
    , tmp.domain
    , tmp.vendor
    , tmp.tcp_ip
    , tmp.fixed_ip
    , tmp.model
    , tmp.os
    , tmp.os_version
    , tmp.memory_mb
    , tmp.cpu_total
    , tmp.cpu_db_total
    , tmp.environment
    , tmp.country
    , tmp.internet_exposed
    , tmp.database_server
    , tmp.dedicated_db_server
    FROM tmp_node_list tmp
    LOOP
    l_status := 'Node :'||tmp.node_name;
    l_node := pac_info.format_host_name(tmp.node_name);
    IF node_in_pac(l_node)
    THEN
    -- node exists
    pac_util.log_debug('Update',l_status);
    UPDATE pac_nodes
    SET node_type = nvl(node_type,tmp.node_type)
    , domain = nvl(domain,tmp.domain)
    , vendor = nvl(vendor,tmp.vendor)
    , tcp_ip = nvl(tcp_ip,tmp.tcp_ip)
    , fixed_ip = nvl(fixed_ip,tmp.fixed_ip)
    , model = nvl(model,tmp.model)
    , os = nvl(os,tmp.os)
    , os_version = nvl(os_version,tmp.os_version)
    , memory_mb = nvl(memory_mb,tmp.memory_mb)
    , cpu_total = nvl(cpu_total,tmp.cpu_total)
    , cpu_db_total = nvl(cpu_db_total,tmp.cpu_db_total)
    , environment = nvl(environment,tmp.environment)
    , country = nvl(country,tmp.country)
    , internet_exposed = nvl(internet_exposed,tmp.internet_exposed)
    , database_server = nvl(database_server,tmp.database_server)
    , dedicated_db_server = nvl(dedicated_db_server,tmp.dedicated_db_server)
    , update_user = 'pac_USER'
    WHERE node_name = l_node;
    l_update := l_update + 1;
    ELSE
    pac_util.log_debug('Insert',l_status);
    INSERT INTO pac_nodes
    ( id
    , node_name
    , node_type
    , domain
    , vendor
    , tcp_ip
    , fixed_ip
    , model
    , os
    , os_version
    , memory_mb
    , cpu_total
    , cpu_db_total
    , environment
    , country
    , internet_exposed
    , database_server
    , dedicated_db_server
    VALUES
    ( pac_create_id
    , l_node
    , tmp.node_type
    , tmp.domain
    , tmp.vendor
    , tmp.tcp_ip
    , tmp.fixed_ip
    , tmp.model
    , tmp.os
    , tmp.os_version
    , tmp.memory_mb
    , tmp.cpu_total
    , tmp.cpu_db_total
    , tmp.environment
    , tmp.country
    , tmp.internet_exposed
    , tmp.database_server
    , tmp.dedicated_db_server);
    l_insert := l_insert + 1;
    END IF;
    END LOOP;
    COMMIT;
    pac_util.log_info('Nodes Inserted:'||l_insert);
    pac_util.log_info('Nodes Updated :'||l_update);
    pac_util.unregister;
    p_insert := l_insert;
    pUpdate:=l_update;
    EXCEPTION
    WHEN OTHERS THEN
    pac_util.log_error(SQLERRM);
    RAISE_APPLICATION_ERROR(-20001,l_status||' '||SQLERRM);
    END ;
    ====================================================

    Hi,
    user318649 wrote:
    Rearly need your help.
    I got error from run a package.procedure.
    SQL> exec pac_info.get_node_info;
    BEGIN pac_info.get_node_info; END;
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'GET_NODE_INFO'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignoredPLS-00306 is one of those errors that actually means what it says.
    pac_info.get_node info is defined as taking 2 arguments, but you're trying to call it with 0 arguments. That's the wrong number.
    which is column 7? It's the column containing 'p' of pac_info; that's where the part causing the error begins.
    If I run this procedure in SQL Developer, I got no error. Show exactly what you do to run it in SQL Developer.
    Compare that to what you posted above.
    ================================================
    Below is my source:
    PROCEDURE get_node_info(p_insert OUT NUMBER, pUpdate OUT NUMBER)
    AS ...You can call it from SQL*lus like this:
    DECLARE
        my_p_insert     NUMBER;
        my_pupdate      NUMBER;
    BEGIN
        pac_info.get_node_info (my_p_insert, my_pupdate);
    END;
    /

  • PLS-00306: wrong number or types of arguments in call to 'SHOW'

    Statement : declare
    rc__ number;
    begin
    owa.init_cgi_env(:n__,:nm__,:v__);
    htp.HTBUF_LEN := 255;
    null;
    null;
    wwv_flow.show(p_request=>:p_request,p_instance=>:p_instance,p_flow_id=>:p_flow_id,p_flow_step_id=>:p_flow_step_id,p_arg_names=>:p_arg_names,p_arg_values=>:p_arg_values);
    if (wpg_docload.is_file_download) then
    rc__ := 1;
    wpg_docload.get_download_file(:doc_info);
    null;
    null;
    commit;
    else
    rc__ := 0;
    null;
    null;
    commit;
    owa.get_page(:data__,:ndata__);
    end if;
    :rc__ := rc__;
    end;
    Did someone ever see this ?
    My database throws it every time i use an ajax validation with javascript. The application is NOT affected in any way, means the validation is done correct:
    function validate(pNumber,i){
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=validate_number',100);
    get.add('F500_VALID_NUMBER', pNumber);
    gReturn = get.get();
    html_GetElement('err'+i).innerHTML=gReturn;
    The validate_number Application Process then uses a Stored Function for the "real" validation.
    Thanks for help,
    Jochen

    Jochen,
    yes when you trace modplsql, I can see this and I also have an error I don't know why.
    <360294694 ms>(wppr.c,497) Pl/sql block parsed...
    <360294694 ms>(wpdenv.c,1531) CGI Environment has 31 vars. Max name len 128, Max Value Len 128
    <360294694 ms> PLSQL_GATEWAY(14)=(6)WebDb
    <360294694 ms> GATEWAY_IVERSION(17)=(2)2
    <360294694 ms> SERVER_SOFTWARE(16)=(60)Oracle-Application-Server-10g/10.1.2.2.0 Oracle-HTTP-Server
    <360294694 ms> GATEWAY_INTERFACE(18)=(8)CGI/1.1
    <360294694 ms> SERVER_PORT(12)=(5)7779
    <360294694 ms> SERVER_NAME(12)=(10)net-srv05
    <360294694 ms> REQUEST_METHOD(15)=(5)POST
    <360294694 ms> PATH_INFO(10)=(15)/wwv_flow.show
    <360294694 ms> SCRIPT_NAME(12)=(10)/pls/apex
    <360294694 ms> REMOTE_ADDR(12)=(14)172.20.100.77
    <360294694 ms> SERVER_PROTOCOL(16)=(9)HTTP/1.1
    <360294694 ms> REQUEST_PROTOCOL(17)=(5)HTTP
    <360294694 ms> REMOTE_USER(12)=(17)APEX_PUBLIC_USER
    <360294694 ms> HTTP_CONTENT_LENGTH(20)=(4)149
    <360294694 ms> HTTP_CONTENT_TYPE(18)=(34)application/x-www-form-urlencoded
    <360294694 ms> HTTP_USER_AGENT(16)=(51)Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)
    <360294694 ms> HTTP_HOST(10)=(11)172.18.2.5
    <360294694 ms> HTTP_ACCEPT(12)=(4)*/*
    <360294694 ms> HTTP_ACCEPT_LANGUAGE(21)=(18)en-us,ar-lb;q=0.5
    <360294694 ms> HTTP_COOKIE(12)=(105)LOGIN_USERNAME_COOKIE=usr1234; WWV_CUSTOM-F_941322186522444_101=725E6950E8DF04E5; oracle.uix=0^^GMT+2:00
    <360294694 ms> HTTP_REFERER(13)=(53)http://172.18.2.5/pls/apex/f?p=101:1:950664913516045
    <360294694 ms> HTTP_ORACLE_ECID(17)=(14)89781163291,1
    <360294694 ms> HTTP_ORACLE_CACHE_VERSION(26)=(7)10.1.2
    <360294694 ms> WEB_AUTHENT_PREFIX(19)=(1)
    <360294694 ms> DAD_NAME(9)=(5)apex
    <360294694 ms> DOC_ACCESS_PATH(16)=(5)docs
    <360294694 ms> DOCUMENT_TABLE(15)=(23)wwv_flow_file_objects$
    <360294694 ms> PATH_ALIAS(11)=(1)
    <360294694 ms> REQUEST_CHARSET(16)=(9)AL32UTF8
    <360294694 ms> REQUEST_IANA_CHARSET(21)=(6)UTF-8
    <360294694 ms> SCRIPT_PREFIX(14)=(5)/pls
    <360294694 ms>StrArrPosBind pos 2 Charset Id : 873
    <360294694 ms>StrArrPosBind pos 3 Charset Id : 873
    <360294694 ms>StrArrPosBind pos 11 Charset Id : 873
    <360294704 ms>Execute: ORA-06550: line 33, column 3:
    PLS-00306: wrong number or types of arguments in call to 'SHOW'
    ORA-06550: line 33, column 3:
    PLS-00306: wrong number or types of arguments in call to 'SHOW'
    ORA-06550: line 33, column 3:
    PL/SQL: Statement ignored
    apex team comments are highly appreciated.
    one more thing I can see for each ajax request I have in my page a hard parse is happening .
    Omar

  • Error 306, wrong number or types of argument in call to ADD_OBJECT_ARG

    Hello all,
    I am trying to install Webutil to Forms 9i, but when compiling the webutil.pll, I am getting the compilation error 306, wrong number or types of argument in call to ADD_OBJECT_ARG(args, a0, 'java/lang/Object').
    The problems are in the body of Package Jave_System when some methods of JNI are called.
    What is JNI and how i can fix this problem?

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Instructor:
    The procedure most likely requires an argument when executed.
    To specify the argument in forms, you need to go to BLOCK property QUERY DATA SOURCE ARGUMENTS and if performing DML...use INSERT PROCEDURE ARGUMENTS, UPDATE PROCEDURE ARGUMENTS, and DELETE PROCEDURE ARGUMENTS.
    Hope this helps.<HR></BLOCKQUOTE>
    thanks, I will check it out !
    null

  • PLS-00306: wrong number or types of arguments in call

    Hi,
    Oracle9i
    created a procedure which will retrieve the records.
    As the procedure is to only retrieve the records so it does not have any IN parameters
    But on executing the procedure gets the below error:
    PLS-00306: wrong number or types of arguments in call to 'GET_PRODUCT_DETAILS'
    I have called the procedure as below:
    =======================
    Declare
    v_cur ...%type;
    BEGIN
    Package_name.GET_PRODUCT_DETAILS(v_cur);
    END;
    Procedure Body
    ==========
    create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT      Cursor)
    is
    begin
    end;
    /

    Try creating the procedure with the out parameter as sys_refcursor.
    create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT sys_refCursor)
    And declare the variable in your outer block also as sys_refcursor.
    Declare
    v_cur sys_refcursor;
    BEGIN
    Package_name.GET_PRODUCT_DETAILS(v_cur);
    END;
    Of course this would require that your actual procedure GET_PRODUCT_DETAILS should have a statement like
    " open V_cur for some select statement that you use to retrieve the records".
    You could also create GET_PRODUCT_DETAILS with the same %type decalration which you use in the outer block
    eg
    create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT x.y%type)
    Declare
    v_cur x.y%type;
    BEGIN
    Package_name.GET_PRODUCT_DETAILS(v_cur);
    END;
    /

Maybe you are looking for