This paper deals with a periodic review inventory system serving multiple demand classes that are differentiated by the treatment for shortages. Shortages of some classes were treated according to lost- sales, while those of the others were backlogged. In each period, both replenishment decisions of inventory and allocation for all classes were made by a setup cost for each replenishment. By using the approach of stochastic dynamic programming formulation, the optimal replenishment policy is a state-dependent ( s, S) policy, and the optimal allocation decision follows a state-dependent prioritization policy.