End dating users in bulk.
Hi,
I have to end date bulk user accounts (1000+) from fnd_user table and I have got the following code
DECLARE
CURSOR usercur
IS
SELECT fu.user_name
FROM apps.fnd_user fu
WHERE user_name = 'TESTACCOUNT';
BEGIN
FOR myuser IN usercur
LOOP
fnd_user_pkg.updateuser(
x_user_name => myuser.user_name
, x_owner => 'CUST'
, x_end_date => SYSDATE
);
END LOOP;
END;
COMMIT;
that works for a single user with a user_name.
Please suggest what modifications do I need to make to that the code so that it runs recursively and end dates every user at one go.