Rami has accepted a big pay-cut to make the move happen.
"The player will be at Milanello with the rest of the squad tomorrow," CEO Galliani told SportItalia.
"We don't have the signature yet, as the President is busy, but the agreement is very close to completion.
"We improved our offer to Valencia, as the difference was made by the player to ensure the transfer. He deserves a lot of credit for that."
For the big stories and the banter follow us on Twitter: @tribalfootball