character string buffer too small error in function [message #648614] |
Sat, 27 February 2016 03:08 |
|
amar.podaralla@gmail.com
Messages: 3 Registered: February 2016 Location: kuwait
|
Junior Member |
|
|
Dear All,
When i am executing the following function i am getting the following error
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "APPS.XX_TEST", line 26
create or replace function XX_TEST return varchar2 is
v_dtno varchar2(10000);
begin
V_DTNO := NULL;
for rec1 in (select
rct.ATTRIBUTE2||rct.ATTRIBUTE10||rct.ATTRIBUTE11 DTNO
FROM ra_customer_trx_all rtl,
oe_order_headers mm,
ar_customers ac,
ra_customer_trx_lines_all rct,
ra_cust_trx_line_gl_dist_all rgd
WHERE ac.customer_id = rtl.bill_to_customer_id
AND to_char(mm.order_number(+))= rtl.interface_header_attribute1
AND rct.customer_trx_id = rtl.customer_trx_id
AND rct.customer_trx_line_id = rgd.customer_trx_line_id
AND rgd.customer_trx_id=41678
and rct.inventory_item_id =413
group by rct.INVENTORY_ITEM_ID , rct.ATTRIBUTE2||rct.ATTRIBUTE10||rct.ATTRIBUTE11
)
Loop
V_DTNO := V_DTNO ||'-'||REC1.DTNO;
End loop;
dbms_output.put_line(' dt no is '||v_dtno);
return v_dtno;
end;
Can any one please help me how to solve the above issue..
Thanks in advance.
Best Regards
*BlackSwan added {code} tags. Please do so yourself in the future.
[Updated on: Sat, 27 February 2016 09:07] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|