Oracle Message ORA-01016 - This function can be called only after a fetch

ERRORThis function can be called only after a fetch
CAUSECursor in an invalid state.
ACTIONMake sure that the oci/upi function is called after fetch.