Francisco,
But are you sending 19 different serial values? Or are you sending One value that can be up to 19 characters long?
If the function is altering a parameter it needs to be send by reference. So you use @ in the DECLARE command, check the help file.
>In the first array wserie (19) the serial is sent; the function returned a id regitro inside the second array