The throttle positioning sensor is used to determine the exact position of the throttle shaft. This information is sent to the DME which tells the engine whether to run in idle mode or one of the other settings determined by the host of other sensors on the vehicle. If you have disconnected the battery or the DME and are getting an error code for the throttle position sensor you will want to start the engine with the throttle housing fully closed. The DME will use the smallest opening angle to set the idle position and switch off from the idle setting when the throttle opens to an angle of 1 degree.
If this does not fix the problem it could be electrical and you will need a VW1501 test lead between the throttle potentiometer and disconnected electrical connection, or you have a bad throttle positioning sensor.
Changing the sensor on a non-Varioram engine is quick and simple just make sure you do not drop the two small screws down into the engine.
On the non-Varioram engine the throttle positioning sensor is located on the throttle body housing at the rear of the intake manifold (red arrow)
I have moved a few other wiring connections out of the way for photographic purposes but you do not need to unless you want more room. Here you can see the sensor attached to the housing (red arrow) and the wiring connection attached to the sensor. Push in the metal clip on the connection (yellow arrow) and pull the connection off.
Next use a Philips head screwdriver to remove the two small Philips screws holding the sensor to the housing (red arrows). Make sure you do NOT drop these small screws down into the back of the engine.
With the screws removed you can slide the sensor off the throttle shaft. Make sure to remove the old O-ring and replace it with the new one that comes with the sensor (red arrow). Installation is the reverse of removal.