The system has a base unit for supporting the body of a patient, and an insertion device coupled to the base unit. The insertion device has an insertion needle holder (7) to hold an insertion needle (8), and a drive mechanism for linearly moving the insertion needle holder in stitching direction. The insertion device has a locking mechanism (10) to lock the drive mechanism, when the locking mechanism is in an active condition. The locking mechanism unlocks the drive mechanism in an inactive condition, when the insertion device is coupled to the base unit.