It's been in force here in Ireland for some time now, with very few difficulties. The enforcement is done by the health board, not the police. If a person lights up, they are fined, as is the landlord if they haven't taken reasonable steps to deal with any issues.
The crux of our law is this: it's not a public health issue as such, but a workplace issue. Therefore, smoking is banned in any enclosed area where people work, including pubs, concert venues etc. It is not banned outdoors, including pub beer gardens. There's been a huge amount of inventiveness here - you should see some of the smoking shelters. Patio heaters etc. And the public perception has changed - you would be ostracised for lighting up indoors here now, as most people see the obvious advantages.
I would imagine it'll be the same in Scotland.