The pancreas has dual roles - it is an organ of the digestive system and of the endocrine system. Food does not pass through this organs but is essential or digestion.
Accessory organs of digestion are organs that secrete substances needed for the chemical digestion of food but through which food does not actually pass as it is digested. Besides the liver, the major accessory organs of digestion are the gallbladder and pancreas.
The liver (under the ribcage in the right upper part of the abdomen), the gallbladder (hidden just below the liver), and the pancreas (beneath the stomach) are not part of the alimentary canal, but these organs are essential to digestion.