Troops engaged in hand-to-hand fighting are far too busy to use missile weapons and therefore may not shoot.
Other troops may wish to shoot at targets engaged in hand-to-hand combat. This is possible but not necessarily a good idea as you are likely to hit the wrong target and kill a friend rather than an enemy. Troops in hand-to-hand combat are taking part in a vast swirling melee, and under the circumstances it is virtually impossible to tell friend from foe or get a clear view of your target. You can shoot into combat if you wish but if you do so then hits must be divided equally between both sides. Odd hits can be allotted to either side in some random fashion such as by rolling a D6: a score of 1-3 = a hit on your side, while 4-6 = a hit on your enemy. On the whole, it is not a good idea to shoot into hand-to-hand combat.