If your VW Beetle Cabriolet is having problems with the roof either not locking in the fully open or fully closed positions it could be that the roof position switch is faulty.
On my friends car the roof would power down but would not lock. Most of the time it would not power up again and we had to release the hydraulics to lift it up manually.
The switch assembly is located behind the Drivers side (RHD) in the wing below the rear passenger glass. It's a bit of a PITA to get to if you have anything other than small hands. Also you will need to remove the back set and the two side trim panels. one side panel to unplug the lead from the roof position switch and the other to check the operation of the locking solenoids (one each side)
Getting to the roof position switch assembly is a pain but it just clips around the hydraulic ram that operates the hood. It may need a bit of brute force to unclip it.
A replacement assembly (you can't get to the switches to replace them individually) cost about 60 GBP. Once we had found the issue it was a relatively cheap fix.
The car we were working on was a 2004 UK spec car.