Marques Ackerman hit a dazzling 150 as South Africa batted themselves into a powerful position on the second day of the second Test against Bangladesh on Tuesday.