Acoording to the Bentley manual, up to 12/1996 the A5S 560Z transmission was used in the e38. The e39 540i used this same transmission up to 1/1997. Now I was told by an Indy shop that the later model A5S 440Z transmssion will also work with no modifications. However, there is no documentation to support this.
1997 528iA: Silver/Grey, Rear Fold Down Seats, 18" Staggered M Parallels
1997 540iA: Silver/Grey, Premium Sound, Cold Weather Pkg, Rear Fold Down Seats
2000 740i: Black/Tan, Sport Pkg, Navigation, Sun Shades
2001 740i: Sport Pkg, Navigation, Heated Front Seats