Endoscopic retrogade cholongiopancreatography (commonly known as ERCP) is a form of investigation, which is used to examine the bile ducts that connect the liver and the small intestine and the pancreas. The ERCP may be recommended if you have experienced abdominal pain, you are jaundice or your doctor suspects that the bile ducts may be blocked due to an obstruction such as gallstones.