Endoscopic retrograde cholangiopancreatography, or ERCP, is a technique that helps examine the liver or pancreas drainage systems. ERCP may be used during a sphincterotomy.