Each province or municipality might have its own legislation and/or by-laws that regulate drinking in public.
For example, the Gauteng Liquor Act 2 of 2003 states that no person may consume alcohol in or near any public place, this includes a vehicle driven on a public road or parked in a public area. A fine of R300 will be issued if a person is caught.
Be careful and think twice when you want to consume alcohol in a public space that is not licensed accordingly, like a beach or a park, as you can be guilty of an offence and be fined.