I had the same problem with my car... After opening the door, the u-shaped 'thingie' on the body of the car that's part of the locking system,well on its inside against the body you'll find a little plastic button that goes into the body when the door is shutt.now that acts as a sensor for the sentral locking system and it usually wears out. I fixed mine by filling up the gap(or that part that's worn out) by melting on a little piece of plastic.
I hope this solves your problem
Geraldf