Pancreatitis occurs when digestive enzymes become activated while still in the pancreas, irritating the cells of your pancreas and causing inflammation. ... Scar tissue may form in the pancreas, causing loss of function. A poorly functioning pancreas can cause digestion problems and diabetes.