The machine has a control unit (25) with two control loops (15,17). One control loop generates a height correction signal (h-korr) on basis of the detected actual cutting height (h-ist) of a header and a setpoint cutting height (h-soll). The other control loop regulates the pressure of a hydraulic adjusting mechanism (5) for adjusting the cutting height. The setpoint of the pressure follows changes in the height correction signal. An independent claim is also included for a method for controlling a header of a self-propelled harvesting machine.