Morphogenesis of the pancreas. Morphogenesis is the process in which anatomical structures are generated and organized.