The invention relates to a valve for controlling fluids, having a piezoelectric unit (4) for actuating a valve member (3), with which a valve closing member (12) is associated that divides a low-pressure region (16) at system pressure from a high-pressure region (17). The valve member (3) has at least one first piston (9) and one second piston (11), between which a hydraulic chamber (13) is embodied. To compensate for leakage losses, a filling device (23) is used, which can communicate with the high-pressure region (17) and which has at least one channel-like hollow chamber (24), in which a solid body (25) is disposed, with a gap surrounding it, in such a way that on one end (25A) of the solid body (25), a line (26) branching off from the high-pressure region (17), and on its opposite end (25B) a leakage line (27) discharges into the hollow chamber (24), and that a line (29) leading to the hydraulic chamber (13) branches off along the length of the solid body (25), and the system pressure (p_sys) in the hydraulic chamber (13) is adjustable by geometric definition of the branching point (28) (FIG. 1).