Hiten

You can put the following check condition in your procedure.

select status from v$session;

if the status returned <> 'ACTIVE' then there are no active sessions.

You can incorporate this check in addition to the others that are already present in your proc.

Regards

Barun