Ryan Rickelton's century and an excellent all-round effort by Kagiso Rabada helped South Africa take charge of the first cricket test against Bangladesh on Day 4 at the Wanderers on Wednesday.