The brief
The 640i was leaking transmission fluid, a reddish film building up under the gearbox and the odd drop on the floor. He brought it in, which is the right call, a leaking gearbox loses fluid, and a gearbox low on fluid overheats and damages itself. The trail pointed at the transmission oil pan. The pan bolts to the bottom of the gearbox and holds the fluid that does the lubricating, cooling and hydraulic work in there, and on this ZF eight-speed the filter is built into the pan. The pan seals with a gasket, and over the years heat cycles, temperature swings and the odd knock from road debris harden the gasket or distort the pan, so fluid weeps out the join. A leaking pan doesn't reseal, and on these you replace the pan-and-filter assembly anyway, so it needed doing, with a fresh fill and the level set properly.
The diagnosis
With the gearbox cleaned off, the leak traced to the transmission pan, fluid weeping from the gasket seam, not from a line or a seal higher up. The gearbox itself was shifting fine, no slipping, no fault codes, it was purely the pan leaking. That's a pan replacement, the filter's integral to it, so the call was a complete pan-and-filter assembly with a fresh gasket, refilled with the exact ZF-spec fluid and the level set at temperature.
The work
The old transmission fluid was drained, the pan dropped and the pan-and-filter assembly replaced with a new genuine ZF unit and a fresh gasket, the magnets cleaned off and both faces cleaned up. The gearbox was refilled with the exact ZF-spec fluid, then brought up to the specified temperature and the level set precisely the way the procedure calls for, with the fill plug torqued to spec. A road test confirmed clean, crisp shifts through the range, no flare, and the pan dry.
The outcome
No more transmission fluid under the car, the pan sealed and dry, crisp shifts, and the gearbox running on fresh fluid at the right level. The 640i went home with the leak sorted at its source. A leaking pan only worsens and quietly drops the fluid the gearbox depends on, so replacing the pan-and-filter assembly, refilling and setting the level right stopped the leak and refreshed the gearbox in one job.