Test Script for Function with IN Param as Record Type

RV1

Member
Hi All,
How do I test a Function within Package having an IN parameter as record type? Please help with the script.
Below is my Function
t_record Declaration
TYPE t_record IS RECORD(
empNumber varchar(10),
orderNumber varchar(9),
actDateTime varchar(15),
actMet varchar(4),
errorCode varchar(10));

FUNCTION ProcessRequest(p_record IN t_record,
xmlString IN t_xml_string) RETURN NUMBER;
 
You can use a script like this:

Code:
declare
  -- Non-scalar parameters require additional processing
  p_record test_package.t_record;
begin
  -- Set record values
  p_record.empNumber := 10;
  p_record.orderNumber := 20;
  ...
  -- Call the function
  :result := test_package.processrequest(p_record => p_record,
                                         xmlstring => :xmlstring);
end;
 
Back
Top