Please help solve the problem error: PLS-00306: wrong number or types of a

Hello

Please see my statement of types and the procedure. Object and the nested table that is declared at the schema level

I'm using the oracle version 11.2
CREATE OR REPLACE TYPE T_COPY_EVNT_DTL IS OBJECT

( 

eventId varchar2(100),

eventDescription varchar2(100),

promoMonthDescription varchar2(100),

promoStartDate varchar2(100),

promoEndDate varchar2(100),

PROMOCOSTSTARTDATE varchar2(100)

);


CREATE OR REPLACE TYPE T_EVENT_TABLE IS TABLE OF T_COPY_EVNT_DTL;

create or replace PROCEDURE Pr_Event_Details_new(ip_xml          CLOB,
                                                                                                                                                 op_sections_xml OUT XMLTYPE) AS
     
     event_list     t_copy_evnt_dtl;
     event_data_sec t_event_table := t_event_table();
     
     
     CURSOR get_event_cur IS
          SELECT cast(collect(t_copy_evnt_dtl(evnt.event,                                                                                                                    evnt.event_desc,
                    mth.promo_month_desc,
                    TO_CHAR(evnt.start_date,
                    'DD/MM/YYYY'),
                    TO_CHAR(evnt.end_date,
                    'DD/MM/YYYY'),
                    TO_CHAR((evnt.start_date - 21),
                    'DD/MM/YYYY'))) as
                    t_event_table)
               FROM RETEK_PROMO_EVENT_MST evnt
           INNER JOIN  .....
           WHERE ... 
           ORDER BY evnt.event_desc,
                                   mth.promo_month_desc,
                                   dtl.promo_start_date,
                                   dtl.promo_end_date,
                                   dtl.promo_cost_start_date;

     type get_event_tab is table of get_event_cur%rowtype index by Binary_Integer;
     l_get_event_tab get_event_tab;
BEGIN

     ....
     
     
          OPEN get_event_cur;
          fetch get_event_cur
               into event_data_sec;
     
          event_data_sec := set(event_data_sec);
          ...
          
          
          
EXCEPTION
          --log_errors...                                                                 
          Raise;
END Pr_Event_Details_new;
Error: PLS-00306: wrong number or types of arguments in the call to 'SET '.
Online: 117
Text: event_data_sec: = set (event_data_sec);

Error: PL/SQL: statement ignored
Online: 117
Text: event_data_sec: = set (event_data_sec);

You will raise a wrong number or types of argument error, or an exception of PLS-00306, if you use the fixed operator with the collection of user-defined object types.

The collection must contain SQL scalar data types - single values without internal components...

Numeric values, on which you can perform arithmetic operations.
Alphanumeric values that represent individual or strings of characters, characters that you can manipulate.
Logical values, on which you can perform logical operations.
Dates and times, you can manipulate.
Time intervals, you can handle.

Published by: stefan nebesnak on January 24, 2013 13:22

Tags: Database

Similar Questions

  • Error: PLS-00306: wrong number or types of arguments

    Hello

    I created a function:

    create or replace procedure AS Test11
    x Test.Emp_No%Type;
    Begin
    Select emp_no in x from Test whose name = 'South '.
    x: = x + 1;
    Update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;

    It has compiled with success in PL/SQL Developer. Now, I created an executable of this procedure in front-end - 11i. And then I created a program of this executable. Then I added this program to a group of application.

    Now that I run this query and I get this error in the log:

    Error ORACLE 6550 in FDPSTP

    Cause: FDPSTP failed due to the ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'TEST11 '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    .

    Hello
    Whenever you save a function, or a PL/SQL procedure as a simultaneous program to apps, you must
    to add two parameters of type varchar2 (errbuf and retcode) Moreover to your settings.
    If you change procedure as follows:

    create or replace procedure Test11(errbuf   out varchar2,
                                       retcode out varchar2) AS
    x Test.Emp_No%Type;
    Begin
    select emp_no into x from Test where name = 'Sud';
    x := x + 1;
    update Test set emp_no = x where emp_no < 100;
    commit;
    end Test11;
    

    Published by: Anthony Alix on December 3, 2008 05:20

    Published by: Anthony Alix on December 3, 2008 05:25

    Published by: Anthony Alix on December 3, 2008 05:35

  • PLS-00306: wrong number or types of arguments in the call to "TO_CHAR.

    Hi guys, I learn Pl/SQL. Writing a simple function which allows to calculate dates. It takes contract_date and determines the date of the following Sunday.

    My current code has the compile error: PLS-00306: wrong number or types of arguments in the call to 'TO_CHAR' which I believe has to do with the to_char (trunc(contract_date,'D')): = contract_weekday;

    I don't understand what the problem with my return it...

    Here is my code: thanks for any help!

    display errors

    create or replace FUNCTION
    contract_dates(contract_date in date)
    DATE OF RETURN
    IS

    starting_sunday DATE;
    -DATE of ending_saturday: = starting_sunday + 6;
    contract_weekday varchar (32);
    days_add NUMBER;

    BEGIN

    TO_CHAR (trunc(contract_date,'D')): = contract_weekday;

    case contract_weekday
    When 1 then days_add: = 6;
    When 2 then days_add: = 5;
    When 3 then days_add: = 4;
    When 4 then days_add: = 3;
    When 5 then days_add: = 2;
    When 6 then days_add: = 1;
    Another days_add: = 7;

    end case;


    starting_sunday: = contract_date + days_add;

    To_date (starting_sunday) RETURN;

    END;

    It is the reverse:

    CREATE OR REPLACE FUNCTION
    contract_dates(contract_date IN DATE)
    RETURN DATE
    IS
    
    starting_sunday DATE;
    --ending_saturday DATE := starting_sunday + 6;
    contract_weekday varchar(1);
    days_add NUMBER;
    
    BEGIN
    
     contract_weekday := to_char(trunc(contract_date,'D'));
    
    case contract_weekday
    when 1 then days_add := 6;
    when 2 then days_add := 5;
    when 3 then days_add := 4;
    when 4 then days_add := 3;
    when 5 then days_add := 2;
    when 6 then days_add := 1;
    else days_add := 7;
    
    end case;
    
    starting_sunday := contract_date + days_add;
    
    RETURN to_date(starting_sunday);
    
    END;
    
  • Can't get the procedure to update - PLS - 00306:Wrong number or types of arguments

    I'm in a situation where I think that despite the correct number of parameters by the way my local procedure (which has been "forward declarations" in addition to logical writing for her; I use all this in a package) fails to compile in SQL * faster due to the error PLS - 00306:Wrong number or types of arguments in the call to P_SENDMAIL.


    I'm passing 5 parameters in the area of forward declarations and also in the logic/header inside in addition to calling the procedure in the package. Can one of you help mewith this and tell me where exactly the error might be. Here is the code:


    [code]

    -Local variable

    CRLF VARCHAR2 (2) CONSTANT: = CHR (13) | CHR (10);

    -- --------------------------------------------------------------------------------

    -FORWARD DECLARATIONS

    -- -----------------------------------------------------------------------------

    PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,

    P_FROM IN VARCHAR2,

    p_to IN VARCHAR2,

    msg_subject IN VARCHAR2 DEFAULT NULL,

    p_msg_body IN LONG DEFAULT NULL);

    [/ code]


    The procedure itself:


    [code]


    PROCEDURE p_sendmail (p_sender_email IN VARCHAR2,

    P_FROM IN VARCHAR2,

    p_to IN VARCHAR2,

    msg_subject IN VARCHAR2 DEFAULT NULL,

    p_msg_body IN LONG DEFAULT NULL) is

    LONG v_to_list;

    LONG v_cc_list;

    LONG v_bcc_list;

    T_DATE VARCHAR2 (255) DEFAULT TO_CHAR(SYSDATE, 'DD MON YYYY HH24:MI:SS PM');

    g_mail_conn UTL_SMTP. CONNECTION;

    SMTP_HOST CONSTANT VARCHAR2 (256): ='smtp - abc.defg.ca';

    SMTP_PORT CONSTANT PLS_INTEGER: = 25;

    BEGIN

    g_mail_conn: = UTL_SMTP. OPEN_CONNECTION (SMTP_HOST, SMTP_PORT);

    UTL_SMTP. HELO (g_mail_conn, SMTP_HOST);

    UTL_SMTP.mail (g_mail_conn, p_sender_email);

    UTL_SMTP. RCPT (g_mail_conn, p_to);

    UTL_SMTP.open_data (g_mail_conn);

    UTL_SMTP.write_data (g_mail_conn, "|) CRLF);

    UTL_SMTP.write_data (g_mail_conn, p_msg_body);

    UTL_SMTP.close_data (g_mail_conn);

    UTL_SMTP. Quit (g_mail_conn);

    EXCEPTION

    WHEN utl_smtp.transient_error THEN

    Dbms_output.put_line ('TransientError: invalid operation in the service may not be available.) ") ;

    WHEN utl_smtp.permanent_error THEN

    Dbms_output.put_line (' permanent error: the entered email is invalid or recepients mailbox is full.) ») ;

    WHILE others THEN

    Dbms_output.put_line ('Unable to send an email' |') '|| SQLERRM);

    END p_sendmail;

    [/ code]

    Now by calling the procedure to send an email:

    [code]

    p_sendmail (p_sender_email = > ' [email protected]'-, send an E-mail to the donor )

    p_from = > ' ADS < [email protected] > ',

    p_to = > v_store_email_address,

    p_msg_subject = > 'anonymous user ',.

    p_msg_body = > 'thank you ' |

    CRLF.

    "Email confirms that we have received your promise |

    CRLF.

    CRLF.

    ' Name: '. v_full_name |

    CRLF.

    ' Temporary ID: ' | v_azbwccp_id |

    CRLF.

    "Reference number: ' |" MTID |

    CRLF.

    "Amount: ' | '. TO_NUMBER (campaign_desg_amt1) |

    CRLF.

    "Campaign: ' | '. campaign |

    CRLF.

    ' Description: ' | '. adbdesg_rec.adbdesg_name |

    CRLF.

    ' Type: ' | atvpldg_rec.atvpldg_desc |

    CRLF.

    ' Duration: ' | '. atvpdur_rec.atvpdur_desc |

    CRLF.

    "Frequency: ' | '. atvfreq_rec.atvfreq_desc |

    CRLF.

    "Start date: ' | '. bill_date2 |

    CRLF.

    CRLF.

    'Your commitment is processed.' |

    CRLF.

    "At the same time, if you want to change this transaction, please contact us.

    CRLF.

    CRLF.

    "Thank you for your support." |

    CRLF.

    CRLF.

    CRLF.

    CRLF.

    ' * This is an automated message system. Please, do not respond to this email. *** ') ;

    [/ code]


    I've also attached a screenshot of the error message below:

    ScreenHunter_15 Nov. 27 09.35.jpg

    Please help me if you can. I just can't understand the question.


    Thanks in advance

    Sandeep

    In the header of the procedure, I spent my parameter as msg_subject and during the call, he was p_msg_subject. The minute that I corrected the error, I was able to correctly compile the whole package body.

    The question can be now closed.

  • Error 213:10 on windows 10. Please help solve the problem

    Error 213:10 on windows 10. Please help solve the problem

    Different code, but can help - error 213:19 license https://forums.adobe.com/thread/1907953 because of write permissions

    Run all programs as Administrator http://forums.adobe.com/thread/969395 to assign FULL... Permissions said yet, but it is sometimes necessary for Adobe

  • Hello! A few days ago, I, disabled Photoshop subscription (CC of Lightroom and Photoshop CC) Act in accordance with your instructions, I have not be enabled. Please help solve the problem.

    Hello! A few days ago, I, disabled Photoshop subscription (CC of Lightroom and Photoshop CC) Act in accordance with your instructions, I have not be enabled. Please help solve the problem?

    Contact support - for the link below, click on the still need help? option in the blue box below and choose the option to chat or by phone...

    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html ( http://adobe.ly/19llvMN )

  • PLS-00306: wrong number or types of arguments in the call to 'UPDATE_ORDER_NUMBER_SEQUENCE '.

    Hi Please help me solve the error given by this procedure

    TEXT

    --------------------------------------------------------------------------------

    PROCEDURE UPDATE_ORDER_NUMBER_SEQUENCE)

    sequenceName IN VARCHAR2,

    Inc. in full)

    AS

    stmt VARCHAR2 (2000);

    number of l_n;

    Start

    BEGIN

    -change the increment to Inc.

    stmt: = 'ALTER SEQUENCE | sequenceName | ' INCREMENT ' |

    Inc.;

    TEXT

    --------------------------------------------------------------------------------

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt;

    -Read the following value

    stmt: = "SELECT" | sequenceName | '. DOUBLE NEXTVAL ';

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt in l_n;

    -change the increment of 1

    stmt: = 'ALTER SEQUENCE | sequenceName | ' INCREMENT OF 1';

    dbms_output.put_line (' execution "' | stmt |) '''');

    EXECUTE IMMEDIATE stmt;

    EXCEPTION

    TEXT

    --------------------------------------------------------------------------------

    While some OTHER THEN dbms_output.put_line (SQLERRM);

    END;

    end UPDATE_ORDER_NUMBER_SEQUENCE;

    following error please help me solve this error

    ERROR on line 1:

    ORA-06550: line 1, column 7:

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

    'UPDATE_ORDER_NUMBER_SEQUENCE '.

    ORA-06550: line 1, column 7:

    PL/SQL: Statement ignored

    Well, the error message is pretty self-explanatory, isn't it? What you use

    to call this procedure actually raises this error.

    However, you have not posted the SQL that actually calls this procedure

    so please post that.

    That said, the whole procedure seems wrong - what business requirement is there for

    edit sequences? This isn't normally how they should be used.

  • PLS-00306: wrong number or types of arguments in the call to 'PAYROLL_MAIN '.

    Hi all

    I created under the package to extract data from people. I call below package throug CP (parameter are form_date and to_date) but
    get the error as PLS-00306: wrong number or types of arguments in the call to 'PAYROLL_MAIN '.

    I called the main procedure: PER_PAYROLL_XIR_PKG. PAYROLL_MAIN (form_date, to_date)

    Please help me solve error below

    -PER_PAYROLL_XIR_PKG. PAYROLL_MAIN: =.


    CREATE OR REPLACE PACKAGE BODY APPS. "" PER_PAYROLL_XIR_PKG ".
    AS


    procedure payroll_main (in_from_date IN date, date of IN in_to_date out_err_msg OUT varchar2) is

    /

    Thank you

    Published by: 981527 on February 9, 2013 02:35

    Published by: 981527 on February 9, 2013 02:35

    Published by: 981527 on February 11, 2013 21:14

    Hello

    Your package procedure has 3 parameters (2, 1 output), but your appeal involves only 2 parameters

    I think it is always best to use the "named notation" to specify the values of the parameters, for example package.procedure (param1-online value1-value2 online param2, param3-online value3);

    In this way, you can be sure what values are what settings

    Clive

  • ORA-06550, PLS-00306: wrong number or types of arguments in the call to ' |'

    Hi all

    Please help me about this error, if I comment the threshold (in the color of the thickness)

    ERROR on line 19:

    ORA-06550: line 19, column 25:

    PLS-00306: wrong number or types of arguments in the call to ' |'

    ORA-06550: line 19, column 3:

    PL/SQL: Statement ignored

    DECLARE

        TYPE nametable IS TABLE OF CHAR(10) INDEX BY BINARY_INTEGER;

        vname NAMETABLE

        CURSOR cf

        IS

          SELECT ename

            FROM emp;

        i     NUMBER;

    START

        OPEN cf;

        i := 1;

        LOOP

            FETCH cf INTO Vname (i);

            EXIT WHEN cf%NOTFOUND;

            i := i + 1;

        END LOOP;

        CLOSE cf;

    dbms_output. Put_line ('Name is ' || VNAME );

        FOR n IN 1.. VNAME . County LOOP

    dbms_output. Put_line ('Name is ' || VNAME (n));

        END LOOP;

    END ;


    Thank you

    VNAME is an associative array. You can not use in DBMS_OUTPUT. Put_line as such. You need to loop through what you did in the code after the DBMS_OUTPUT and print each element of the array individually.

  • PLS-00306. wrong number or types of arguments in the call to the 'procedure '.

    now I'm on oracle10g xe, I get the following error

    create or replace procedure proc_name (slno_in in number,
    name_out out varchar2, fee_out certain number)
    is
    v_Name student.name%type;
    v_fee student.fee%type;
    Start
    Select name, cool in v_name, v_fee of
    student where slno = slno_in;
    name_out: = v_name;
    fee_out: = v_fee;
    end proc_ref;

    Created procedure.

    SQL > exec proc_name (1);
    BEGIN proc_ref (1); END;

    *
    ERROR on line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in the call to 'PROC_REF '.
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored





    Please help me
    DECLARE
     p_name VARCHAR2(50);
     p_fee NUMBER;
    BEGIN
     proc_name(1,p_name,p_fee);
     DBMS_OUTPUT.PUT_LINE(p_name||'--'||p_fee);
    END;
    
  • PLS-00306: wrong number or types of arguments in the call to 'proc1 '.

    Hi all

    I pass parameter values to .NET as below proc.

    PROCEDURE PROC1
    ( 
         in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
         result_site_name         OUT     SYS_REFCURSOR,
         result                   OUT     SYS_REFCURSOR
    )
    AS
    
              
      my_site_id sites.site_id%TYPE;       
     
      my_lane_numbers_string VARCHAR(100);
      
      
      my_site_name sites.short_name%TYPE;
         
       
        
    BEGIN
                 
      my_site_id := get_site_id(in_report_parameter_id);
      
      
      
      SELECT short_name
         INTO my_site_name
         FROM sites
         WHERE site_id = my_site_id;
      
         
            OPEN result_site_name FOR
          SELECT my_site_name site_name
            FROM sys.dual;
          
         
               OPEN result FOR       
              SELECT site_direction_id,
                      site_lane_id
                FROM site_lanes
                JOIN report_parameters 
                   ON site_lane_id = CAST(report_parameters.report_parameter_value AS NUMBER)
               WHERE site_id = my_site_id
                 AND report_parameters.report_parameter_id = in_report_parameter_id 
                 AND report_parameters.report_parameter_group = 'LANE'
                 AND report_parameters.report_parameter_name = 'LANE'
           ORDER BY site_direction_id ASC, site_lane_id ASC;
              --   FROM SYS.DUAL;   
           
    END PROC1;
    During execution, it throws me the following error
    PLS-00306: wrong number or types of arguments in call to 'proc1'
    How could I solve this problem?

    Thanks in advance.

    Kind regards
    Sollier

    Hello

    user10641405 wrote:
    ...
    If I use site.short_name%TYPE in OUTPUT parameter, how could I go to the .NET instead of results OPEN TO. ?

    Change the second argument:

    PROCEDURE PROC1
    (
         in_report_parameter_id   IN      report_tasks.report_task_id%TYPE,
         result_site_name         OUT     sites.short_name%TYPE,
         result                   OUT     SYS_REFCURSOR
    )
    AS ...
    

    and SELECT in IT:

      SELECT short_name
         INTO result_site_name
         FROM sites
         WHERE site_id = my_site_id;
    
  • PLS-00306: wrong number or types of arguments in the call to PUT_LINE

    Hi all

    I m new to the pl sql, when I run the below block I get errors.

    kindly help me on this.

    DECLARE

    Siva ARRAY TYPE IS VARCHAR2 (100);

    s siva;

    Cur_i IS SELECT name FROM employee of CURSOR;

    BEGIN

    OPEN cur_i.

    LOOP

    SEEK cur_i s INTO;

    EXIT WHEN cur_i % NOTFOUND;

    DBMS_OUTPUT. Put_line (s);

    END LOOP;

    CLOSE Cur_i;

    END;


    I m getting the error below:

    PLS-00597: expression' in the INTO list has the wrong type

    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.



    Hello

    I think that you are learning/exercises PL/SQL. See below the approach.

    declare

    siva type is table of the varchar2 (100);

    s siva;

    cursor cur_i is
    Select first_name from employees;

    Start

    Open cur_i;

    loop
    collect fetch cur_i in bulk
    s;
    When the output cur_i % notfound;
    end loop;

    close cur_i;

    -Printing values in the collection

    because me s.first... loop of s.Last
    dbms_output.put_line (s (i));
    end loop;

    end;

    Thank you

    Suri

    Post edited by: Suri

    Simple loop removed and exit when collecting conditions because we fetch all the records of a sudden in the collection using the bulk.

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

    Hello

    I get this error when I run the script to test below:
    < font color = "red" >
    PLS-00306: wrong number or types of arguments in the call to 'SPLIT_AMOUNT '.
    < / make >

    This script is to test that the package below that I wrote. It seems to use the same 9 parameters of the same type:

    TEST SCRIPT+ *.
    declare
      TYPE g_table_number  IS TABLE OF  NUMBER INDEX BY BINARY_INTEGER;
      p_customer_trx_ids        g_table_number;
      p_total_amount_to_apply   NUMBER := 10;
      p_total_amount_to_adjust  NUMBER;  
       --
      p_result                  NUMBER;
      p_message                 VARCHAR2(200);
      p_payment_schedule_ids    g_table_number;
      p_terms_sequence_numbers  g_table_number;
      p_apply_amounts           g_table_number;
      p_adjust_amounts          g_table_number;
    begin
      p_customer_trx_ids(1)        := 23613;
      p_customer_trx_ids(2)        := 23614;
     hirap.split_amount
      (
       p_customer_trx_ids        
      ,p_total_amount_to_apply   
      ,p_total_amount_to_adjust 
      ,p_result                  
      ,p_message                
      ,p_payment_schedule_ids   
      ,p_terms_sequence_numbers 
      ,p_apply_amounts          
      ,p_adjust_amounts         
      );
      for i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        dbms_output.put_line( 
        i || ' p_customer_trx_id: ' || p_customer_trx_ids (i) || ' p_apply_amounts(i): ' ||
         p_apply_amounts(i) || ' p_adjust_amounts: ' || p_adjust_amounts(i) );
      END LOOP;
    end;
    /
    PACKAGE+ *.
    CREATE OR REPLACE PACKAGE hirap
    AS
    TYPE g_table_number  IS TABLE OF  NUMBER INDEX BY BINARY_INTEGER;
    
    PROCEDURE split_amount
      (
       p_customer_trx_ids        IN   g_table_number
      ,p_total_amount_to_apply   IN   NUMBER
      ,p_total_amount_to_adjust  IN   NUMBER
       --
      ,p_result                  OUT  NUMBER
      ,p_message                 OUT  VARCHAR2
      ,p_payment_schedule_ids    OUT  g_table_number
      ,p_terms_sequence_numbers  OUT  g_table_number
      ,p_apply_amounts           OUT  g_table_number
      ,p_adjust_amounts          OUT  g_table_number
      );
    
    END hirap;
    /
    
    CREATE OR REPLACE PACKAGE BODY hirap
    AS
    PROCEDURE split_amount
      (
       p_customer_trx_ids        IN   g_table_number
      ,p_total_amount_to_apply   IN   NUMBER
      ,p_total_amount_to_adjust  IN   NUMBER
       --
      ,p_result                  OUT  NUMBER
      ,p_message                 OUT  VARCHAR2
      ,p_payment_schedule_ids    OUT  g_table_number
      ,p_terms_sequence_numbers  OUT  g_table_number
      ,p_apply_amounts           OUT  g_table_number
      ,p_adjust_amounts          OUT  g_table_number
      )
    IS
      l_total_pay_sched_amount   NUMBER;
      l_customer_trx_id          NUMBER;
      l_amount_due_remainings    g_table_number;
    
      CURSOR pay is
            SELECT p.payment_schedule_id
                  ,p.terms_sequence_number
                  ,p.amount_due_remaining
            FROM   ar_payment_schedules_all p
            WHERE  customer_trx_id = l_customer_trx_id
            AND    p.terms_sequence_number =
                  (SELECT  min(p1.terms_sequence_number)
                   FROM    ar_payment_schedules_all p1
                   WHERE   p1.customer_trx_id = l_customer_trx_id
                   AND     p1.status          = 'OP'
                  );
    
    
    BEGIN
      p_result := 0; -- means OK
    
      -- read the payment schedule for each transaction and store values and totals:
      FOR i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        l_customer_trx_id          := p_customer_trx_ids(i);
        l_total_pay_sched_amount   := 0;
          BEGIN
            OPEN  pay;
            FETCH pay INTO
                   p_payment_schedule_ids(i)
                  ,p_terms_sequence_numbers(i)
                  ,l_amount_due_remainings(i);
    
            CLOSE pay;
            l_total_pay_sched_amount   := l_total_pay_sched_amount + l_amount_due_remainings(i);
         
          EXCEPTION WHEN NO_DATA_FOUND THEN
            fnd_file.put_line(fnd_file.LOG, 'Transaction does not exist for CUSTOMER_TRX_ID: ' ||
                              p_customer_trx_ids(i) );
            RAISE;
          WHEN OTHERS THEN
              RAISE;
          END;
      END LOOP;
    
      -- save values for each payment schedule based on total
      FOR i IN p_customer_trx_ids.FIRST .. p_customer_trx_ids.LAST LOOP
        p_apply_amounts(i)         := round
                                        (
                                         l_amount_due_remainings(i) / l_total_pay_sched_amount
                                         * (p_total_amount_to_apply + p_total_amount_to_adjust)
                                         , 2
                                        );
        p_adjust_amounts(i)        := l_amount_due_remainings(i) - p_apply_amounts(i);
    
      END LOOP;
    
    EXCEPTION
      WHEN OTHERS THEN
        p_result := 2;
        p_message := 'SQLCODE= ' || SQLCODE || ', SQLERRM = ' || SQLERRM;
        fnd_file.put_line( fnd_file.LOG , TO_CHAR(SYSDATE, 'HH24:MI:SS') || ' - ' || p_message );
    END;
    --
    END hirap;
    /
    Does anyone know what is the problem?

    Thank you
    Steve

    Hi, Steve,.

    The package contains a data type called g_table_number and also a procedure called split_amount.
    That does not create another data type (different), also called g_table_number, outside of the package, any more that it prevents you from creating another procedure, also called split_amount, also. When you want to reference the data type or the procedure outside the package from the package, then you must prefix the name with the name of the package. You do this correctly when you reference the name of the procedure of your anonymous block:

     hirap.split_amount
      (
       p_customer_trx_ids     ...
    

    Now you must do the same when you reference the data type:

    declare
      p_customer_trx_ids        hirap.g_table_number;
      p_total_amount_to_apply   NUMBER := 10;
      p_total_amount_to_adjust  NUMBER;
       --
      p_result                  NUMBER;
      p_message                 VARCHAR2(200);
      p_payment_schedule_ids    hirap.g_table_number;
      p_terms_sequence_numbers  hirap.g_table_number;
      p_apply_amounts           hirap.g_table_number;
      p_adjust_amounts          hirap.g_table_number;
    begin ...
    

    If you do not create another type of (different) data outside of the package, it will be the same as the type of data inside the packaging, even if the name is the same and they are defined in the same way. The package expects the arguments of the type hirap.g_table_number, so you have to give the hirap.g_table_number of type arguments.

  • PLS-00306: wrong number or types of arguments in the call to 'XXC_AMOUNT' ORA-06550

    Hi all

    CREATE OR replace PROCEDURE Xxc_amount (v_item_id IN NUMBER,

                                             v_amount  OUT NUMBER,

                                             v_size    OUT NUMBER)

    IS

      v_size   NUMBER := NULL;

    v_amount NOMBRE;

    START

        BEGIN

    CHOOSE conversion_rate

            INTO   v_size

    FROM mtl_uom_class_conversions

            WHERE  inventory_item_id = v_item_id -- 2289;

            v_amount := Nvl (Trunc (v_size), 0);

    -RETURN (cp_cartons);

        EXCEPTION

            WHEN OTHERS THEN

              v_size := 0;

              dbms_output . Put_line ()' Error getting Item Id:'| V_ITEM_ID );

        END ;

    dbms_output. Put_line ('Qty-->' || v_amount );

    dbms_output. Put_line ('Qty1-->'|| v_size );

    END ;

    DECLARE

        amount NUMBER;

        v_size NUMBER;

    START

        Xxc_amount (2289, amount, v_size);

    dbms_output. Put_line (amount || '--' || v_size );

    END ;

    ORA-06550: line 5, column 5:

    PLS-00306: wrong number or types of arguments in the call to 'XXC_AMOUNT '.

    ORA-06550: line 5, column 5:

    PL/SQL: Statement ignored

    Thank you

    Post edited by: 994122 changed the name of the procedure to Xxc_amount Xxc_amount1

    Simply remove the declarations of the v_size and v_amount and it should work.

    The following text compiles and works for me when I call:

    CREATE OR replace PROCEDURE Xxc_amount (v_item_id IN NUMBER,
                                            v_amount  OUT NUMBER,
                                            v_size    OUT NUMBER)
    IS
    BEGIN
        BEGIN
            SELECT conversion_rate
            INTO  v_size
            FROM  mtl_uom_class_conversions
            WHERE  inventory_item_id = v_item_id; -- 2289;
            v_amount := Nvl (Trunc (v_size), 0);
        --RETURN (cp_cartons);
        EXCEPTION
            WHEN OTHERS THEN
              v_size := 0;
              dbms_output.Put_line ('Error in Getting for Item Id :'|| v_item_id);
        END;
        dbms_output.Put_line ('Qty-->' || v_amount);
        dbms_output.Put_line ('Qty1-->'|| v_size);
    END;
    
    DECLARE
        amount NUMBER;
        v_size NUMBER;
    BEGIN
        Xxc_amount (2289, amount, v_size);
        dbms_output.Put_line (amount || '--' || v_size);
    END;
    
  • Iterating through a collection of cursor type give PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    I wrote the following anonymous block. He has a slider ""cur_total_tckt "who choose 6 columns."  A nested table 'total_tckt_colcn' is declared of type ""cur_total_tckt "."  In the dbms_output.put_line I want to print each item in my collection. It gives me the following error:

    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    ORA-06550: line 29, column 2:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    I want to print all 6 columns of an element for 366 these elements.

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    DECLARE
    CURSOR cur_total_tckt    
      is
      select t.ticket_id ticket_id, t.created_date created_date, t.created_by created_by, t.ticket_status ticket_status,
      t.last_changed last_changed, h.created_date closed_date
      from n01.cc_ticket_info t
      inner join n01.cc_ticket_status_history h
      on (t.ticket_id = h.ticket_id)
      where t.last_changed >= '6/28/2012 17:28:59' and t.last_changed < (sysdate + interval '1' day);

    type total_tckt_colcn
    is
      TABLE OF cur_total_tckt%rowtype;
      total_tckt_col total_tckt_colcn;
      total_coach_col total_tckt_colcn;
    begin
    total_tckt_col := total_tckt_colcn ();
    total_coach_col := total_tckt_colcn ();
      OPEN cur_total_tckt;
      loop
      fetch cur_total_tckt bulk collect into total_tckt_col limit 100;

      dbms_output.put_line(total_tckt_col.last);

      FOR i IN total_tckt_col.first..total_tckt_col.last
      loop

      -- dbms_output.put_line(total_tckt_col(i).ticket_id);          -- this line works
      dbms_output.put_line(total_tckt_col(i));                       -- this line gives error

      END LOOP;

      exit
      WHEN (cur_total_tckt%NOTFOUND);

      END LOOP ;
      CLOSE cur_total_tckt; 




    end;

    making reference to an element differs from the reference to a field in the record that is part of the collection.

    'dbms_output.put_line (total_tckt_col (i))' works if there is only a single element.

    will not work if this element has subcomponents. in your case it has subcomponents as fields in a record.

Maybe you are looking for

  • HP-14: power password

    Hi, I have the power on password, I have a laptop HP-14 S/N.-[personal information deleted] After enterint 3 times the wrong password, I get the code. -64491888 Can you guys help me? Thanks in advance.

  • Windows media center, internet-tv "blockages" units.

    I have experience of random blocks, watch TV on the internet. I'm looking for the download, or the 'good' solution for this problem. LV

  • Cannot run Cisco ACS Patch 5-7-0-15 - 1.tar.gpg

    Has anyone downloaded and installed the new Patch GBA? When installing, I get the following error: '% internal error when executing command '. I tried to download a few times with the same result. Open TAC - on hold. Doug.

  • Select the XML data

    Dear all,Please find a list of the steps done to read the date of conversion of currency by the last final query, that I can be able to obtain the release of the name of the Bank as the Central Bank, but impossible to extract the time, rates, currenc

  • How to reinstall LR correctly?

    I have installed a licensed copy of a purchase on Adobe.com Internet LR6, last spring to upgrade the previous version and complete CS6.The installation went with a trial version of Adobe CC. The CC evaluation is now long over, and the copy of LR is s