Throttle position sensor, look for the wiring plug going to a sensor on the side of the throttle body. Get a multimeter and test it out. BMW wants it to be 0.6VDC idle and 4.2v wide open. Not sure how I'd test it with the power on though. Here's another test. At 70degF, the resistance should be 3-5 K-ohms at idle and about 1 K-ohm at wide open throttle.
Strangely, BMW requires that the DME be unplugged for at least ten seconds if you replace the TPS. Not sure why, I'd expect the computer "learns" the new part.
It's adjustable too, loosen the two screws slightly and twist it to get the wide-open-throttle setting just right.
If you don't know how to use a multi-meter well, I'd highly recommend learning. It'll save you a lot of time & money fixing old BMWs. I don't mean to brag, but I bought an e30 318i that wasn't running. That made for a heck of a deal...after we agreed on a price I had it towed to my house & fixed it with a multi-meter and a paper shop towel.