Duminy shared successive stands of 49 for the second wicket with Alviro Petersen, 70 for the third with AB de Villiers and 82 for the fourth with Francois du Plessis to help South Africa to 271 for six in their 50 overs.
New Proteas coach Russell Domingo sees Duminy's future at number three position in the one-day side. The 29-year-old fell eight runs short of his century after facing 100 balls.
The pitch was a slow seamer but the Proteas' non-pace trio of Duminy, Aaron Phangiso and Robyn Peterson took seven wickets between them. The impressive Chris Morris took the other three, for 27 runs, as the home side were dismissed for 198.
South Africa start their five-match one-day series against Sri Lanka in Colombo on Saturday. They also play three T20 internationals.