Hello Folks
I have a simple query. I am getting 4 different costing codes as input, which I need to return as a record. I created the type as record, then used that as a return in my function. Function got compiled but is not returning me anything when I run. Am I missing out on something?
Following is the code that I have used
TYPE gt_cost IS RECORD
(CC1 VARCHAR2(100),
CC2 VARCHAR2(100),
CC3 VARCHAR2(100),
CC4 VARCHAR2(100));
FUNCTION T_GET_COST (CC1 IN VARCHAR2,
CC2 IN VARCHAR2,
CC3 IN VARCHAR2,
CC4 IN VARCHAR2) RETURN gt_cost IS
return_val gt_cost;
BEGIN
return_val.CC1 := UPPER(CC1);
return_val.CC2 := UPPER(CC2);
return_val.CC33 := UPPER(CC3);
return_val.CC4 := UPPER(CC4);
DBMS_OUTPUT.PUT_LINE('return_val IS ' || return_val.CC1);
RETURN(return_val);
END T_GET_COST;
The DBMS_OUTPUT is returning correct value, but why I cannot see the return when I run this function?
Please advise.
Thanks
Jade