A theoretical approach is presented to analyze the local transport field (LTF) and the voltage measured by the scanning tunneling microscope (STM) in a current-carrying mesoscopic system. The phase coherence between an electron wave reflected from a defect and the incident-electron wave leads to Friedel-like oscillations in both the LTF and STM voltage (VSTM). To study this phase-sensitive feature in scanning tunneling potentiometry, we calculate the spatial profile of LTF and VSTM for the case of grain boundaries in a thin film and for the case of an impurity near a surface. For the case of a thin film containing grain boundaries within the jellium model, we find that LTF and VSTM differ in their spatial variation, but their drops across a grain boundary are of the same order of magnitude. In general, the VSTM fluctuates on a larger length scale than the LTF. For the case of a scatterer on a metal surface, the short-range variations of both VSTM and the LTF near a surface scatterer are on the order of 1 V when the current density is on the order of 107 A/cm2 and the distance d between the STM tip and the metal surface is about 3. Observation of the long-range variation in VSTM away from an impurity requires submicrovolt resolution and smaller values of d.