Maphaka has played three Twenty20 Internationals but has yet to feature in a test and will vie with experienced seamer Dane Paterson and spinner Senuran Muthusamy to replace Coetzee in the side.
South Africa won the first test in Durban by 233 runs, a fourth victory in a row to keep them in contention for a place in the ICC Test World Championship final at Lord’s in June.
If they beat Sri Lanka in Gqeberha, and are victorious in a two-test home series against Pakistan starting this month, they are guaranteed a place in the final.
South Africa Squad for second test
Temba Bavuma (captain), David Bedingham, Matthew Breetzke, Tony de Zorzi, Marco Jansen, Keshav Maharaj, Kwena Maphaka, Aiden Markram, Senuran Muthusamy, Dane Paterson, Kagiso Rabada, Tristan Stubbs, Ryan Rickelton and Kyle Verreynne.