NBC let the cast and crew know fairly early in the 8th season that it would be the final lap for the show. The main reason for this is that the network had filmed a pilot that they felt would be a perfect fit for the Thursday-10PM EST timeslot. That show was "ER".
For what he somewhat sarcastically called an "exclusive," Corbin Bersen called Howard Stern's Radio Show literally 20-minutes before the cast filmed their very last scene of the series. Stern then talked to Larry Drake, and after some ribbing from Howard, Drake joked that "no one has read your book except a few park rangers" to Howard. Then, when Corben got back on, Debi Mazar could be heard in the background, "They're ready for us!"