Hi,
System uses number range which we have assigned to partner type to define the business partner number . When we press enter then the system get a number which lies between the number range and next to the previously defined BP. The number once used is not used again even if we do not save the account.
there is a event in the view as given below and the method create_partner is responsible for the auto set the account number on pressing enter.
Thanks
Kumar Gaurav