(a) If I run over a dog accidentally, do I have to suffer the kammic consequences?
(b) I had to put down my dog as a result of a severe illness, will I suffer from bad kamma as a result?
In the first instance, there was no intention to run over the dog, hence it would not produce unwholesome kamma.
In the second case, there was a definite intention to kill the animal, hence it is an unwholesome action. However, if the action was motivated by compassion, and not to get rid of a troublesome pet, the resultant unwholesome kamma may be lessened due to the thoughts of compassion.
A similar situation is when a doctor or a relative of a terminally ill patient has to make a decision to switch off the life support system. In this case, one could say that the patient was being prevented from undergoing the natural and inevitable process of death by maintaining the life support system. Therefore it is probable that no unwholesome kamma would result by letting the natural process take its due course.
It is the intent of the action that determines appropriate results.
The Buddha said: 'Volition, O monks, I declare is kamma'
(Cetanadham bhikkhave kammam vadami)