David Beckham sent a congratulatory message to former Real Madrid team-mate Sergio Ramos after the centre-back became Spain's most-capped player with 168 appearances.