Sharma scored 119 while Raina blasted 135 as the two overnight batsmen ripped apart the home bowling attack on the second day of the match. (Agencies)
India skipper Cheteshwar Pujara had struck 137 to put his side in a strong position.
Sharma and Raina shared a 106-run partnership for the fourth wicket, which was broken when the former was caught by Temba Bavuma off JP Duminy at the far end of the morning session.
India had resumed the innings at 281 for three and declared after rattling up a huge 582 for nine as Proteas failed to break the last-wicket stand between Shahbaz Nadeem (46) and Jaydev Unadkat (31).
The two batsmen added 82 runs for the last wicket. South Africa were 20 for one in reply as Unadkat had opener Reeza Hendricks (10) caught behind. Dean Elgar and Simon Harmer were at the crease when stumps were drawn for the day.
Rohit added another 49 runs to his overnight score before being dismissed, but not before tormenting Protea bowlers with 14 boundaries and two sixes.
It was Duminy who got the first breakthrough of the day when he had Rohit caught at the short leg by Temba Bavuma.
Joined by Ajinkya Rahane (10) in the middle, Riana continued to play his strokes, even as the former got out cheaply when Duminy added another wicket to his kitty.
Sharma scored 119 while Raina blasted 135 as the two overnight batsmen ripped apart the home bowling attack on the second day of the match.