There is, interestingly, a modifier for this... The defender who is involved in Melee has a -3 modifier to their defense roll. This can be found in the "Defense Modifiers Table" on page 159 SR4A.
In addition to the above, make sure to keep in mind that defenders accumulate -1 modifiers for each attack against them in between their actions, so if the attack described above is the first attack against the defender, then the modifier will only be -3 to defend against the shot. If, however, the attack is the 2nd, the modifier would be -3-1 = -4, and it gets worse from there.
Of course, this doesn't take in to account "Cover" as mentioned. If you're trying to shoot past your teammate, the defender might have either partial cover (+2 defense) or good cover (+4 defense), depending on the ruling by the GM.