For the Kadomtsev-Petviashvili (KP) hierarchy constructed in terms of the famous Sato theory, a "k constraint" is proposed that leads the hierarchy to the nonlinear system involving a finite number of dynamical coordinates. The eigenvalue problem of the k-constrained system is naturally obtained form the linear system of the KP hierarchy, which takes the form of kth-order polynomial coupled with a first-order one, thus we are able to derive the correspondent Lax pair, recursion operator, bi-Hamiltonian structures, and conserved quantities. The constraints for the BKP hierarchy are also sketched.