Home » SQL & PL/SQL » SQL & PL/SQL » ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type (Oracle)
ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type [message #360011] Wed, 19 November 2008 03:46 Go to next message
Messages: 1
Registered: November 2008
Junior Member
i have changed the proc to declare Pl/SQL
it is trowing a error ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type
Please find the code below
  TYPE tax_loc_record IS RECORD
    tax_loc_id tax_locations.tax_loc_id%TYPE,
    tax_loc_order country_tax_loc_levels.country_tax_loc_level_order%TYPE
TYPE tax_location_id_cursor IS REF CURSOR RETURN tax_loc_record;                                  
--declare variables
tm_process_status_id unit_proc_status_assign.process_status_id%TYPE;
tm_eff_start_date unit_proc_status_assign.process_status_eff_start_date%TYPE;
tm_modify_userid unit_proc_status_assign.modify_userid%TYPE;
tm_renewal_cycle_no unit_proc_status_assign.renewal_cycle_no%TYPE;
tm_payment_vendor_id unit_process_payment.payment_vendor_id%TYPE;
tm_payment_method payment_method.payment_method%TYPE;
tm_payment_in_advance supplier_attribute_value.supplier_attribute_value%TYPE;
tm_payment_method_id payment_method.payment_method_id%TYPE;
tm_exception EXCEPTION;
tm_is_batch unit_process_payment.is_batch_sw%TYPE;

--temp  VARCHAR2(50);
tm_tax_loc_id tax_location_id_cursor;
temp_tax_loc_cursor tax_loc_record;

        tm_payment_vendor_id := -1;
        tm_tax_loc_id := opnsutil.st_common.sf_get_tax_loc_id(i_unit_id,i_process_sub_process_id, i_process_status_id);
            FETCH tm_tax_loc_id INTO temp_tax_loc_cursor;
            EXIT WHEN tm_tax_loc_id%NOTFOUND;
            IF(temp_tax_loc_cursor.tax_loc_order <= 4) THEN
                     SELECT slo.supplier_id INTO tm_payment_vendor_id FROM
                      (   SELECT sl.supplier_id
                          FROM  supplier_list  sl
                               , supplier_tax_location  stl
                                (stl.effective_end_date is NULL OR stl.effective_end_date > SYSDATE)
                                AND stl.tax_loc_id = temp_tax_loc_cursor.tax_loc_id
                                AND sl.supplier_id = stl.supplier_id
                                AND stl.prefered_supplier_sw = 'Y'
                                AND stl.process_sub_process_id=i_process_sub_process_id
                          GROUP BY sl.supplier_id
                       WHERE rownum <2
                       GROUP BY slo.supplier_id;
                    WHEN NO_DATA_FOUND THEN
             END IF;
             IF(tm_payment_vendor_id != -1) THEN
             END IF;
        END LOOP;
        IF(temp_tax_loc_cursor.tax_loc_order=1 AND tm_payment_vendor_id = -1)THEN
             tm_payment_vendor_id := NULL;
        END IF;
        IF(tm_tax_loc_id%ISOPEN) THEN
           CLOSE tm_tax_loc_id;
        END IF;
           o_st_error_msg := 'error in fetching payment vendor';
           RAISE tm_exception;

it is throwing error at

tm_tax_loc_id := opnsutil.st_common.sf_get_tax_loc_id(i_unit_id,i_process_sub_process_id, i_process_status_id);

please reply soon

[EDITED by LF: applied [code] tags]

[Updated on: Wed, 19 November 2008 05:32] by Moderator

Report message to a moderator

Re: ORA-06552: PL/SQL: Statement ignored ORA-06553: PLS-382: expression is of wrong type [message #360019 is a reply to message #360011] Wed, 19 November 2008 04:34 Go to previous message
Messages: 12820
Registered: September 2008
Location: Rainy Manchester
Senior Member
1. Can you please follow the orafaq forum guide and format your post properly.
2. If your code is complaining about a call to a function then at a bare minimum we're going to need to see the definition of that function in order to be able to help you.
Previous Topic: Query with NOT IN
Next Topic: balance calculation
Goto Forum:

Current Time: Sun Aug 20 21:51:58 CDT 2017

Total time taken to generate the page: 0.07913 seconds