Postoperative pulmonary complications are a major problem after upper abdominal or thoracoabdominal surgery. They lead to a prolonged ICU stay as well as increased costs and are one of the main causes of early postoperative mortality. Even after uncomplicated operations, postoperative hypoxemia occurs in 30-50% of patients. Acute respiratory failure involves a disturbance in gas exchange. The mortality ranges from 10 to 60% according to the severity of respiratory failure. The most important complications are interstitial and alveolar pulmonary edema, atelectasis, postoperative pneumonia, hypoventilation, and aspiration. Preoperative optimization, postoperative prophylaxis according to a stepwise approach, and early mobilization decrease the rate of complications.