Flash memory technology for enterprise storage systems requires a larger number of lifetime writes than currently available. The proposed approach in this work for alleviating this problem consists of the efficient integration of two key ideas: (i) improving reliability and endurance by representing the information using relative values via the rank modulation scheme and (ii) increasing the overall (lifetime) capacity of the flash device via rewriting codes, namely, performing multiple writes per cell before erasure. This work presents a new coding scheme that combines rank modulation with rewriting. The proposed scheme obtains the capacity of the model.